Before starting, ensure you have installed:
- Node.js 20+ - Download
- PostgreSQL 15+ - Download
- Git - Download
- Phantom Wallet (for testing) - Install
Optional:
- Docker & Docker Compose - For containerized database
git clone https://github.com/MixasV/agentforge.git
cd agentforgeOption A: Docker (Recommended)
docker-compose up -dOption B: Local PostgreSQL
# Create database
createdb agentforge
# Or via psql
psql -U postgres
CREATE DATABASE agentforge;
\qcd backend
npm install
# Copy environment file
cp .env.example .env
# Edit .env with your settings
# DATABASE_URL=postgresql://postgres:postgres@localhost:5432/agentforge
# Generate Prisma client and push schema
npm run db:generate
npm run db:push
# Start backend server
npm run devBackend will start on http://localhost:3001
cd frontend
npm install
# Start frontend development server
npm run devFrontend will start on http://localhost:3000
Open http://localhost:3000 in your browser and connect with Phantom wallet.
Edit backend/.env:
# Database
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/agentforge?schema=public"
# Server
PORT=3001
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
# JWT (change in production!)
JWT_SECRET=your-super-secret-jwt-key-change-this-in-production
# Solana
SOLANA_RPC_ENDPOINT=https://api.devnet.solana.com
SOLANA_NETWORK=devnet
# x402 (Optional - for production)
COINBASE_API_KEY=your-coinbase-api-key
AGENTFORGE_PAYMENT_WALLET=your-solana-wallet-address
# Telegram (Optional - for bot deployment)
TELEGRAM_BOT_TOKEN=your-telegram-bot-tokenCreate frontend/.env:
VITE_API_URL=http://localhost:3001cd backend
# Generate Prisma client
npm run db:generate
# Push schema to database
npm run db:push
# Open Prisma Studio (GUI for database)
npm run db:studioTerminal 1 - Backend:
cd backend
npm run devTerminal 2 - Frontend:
cd frontend
npm run devTerminal 3 - Database (if using Docker):
docker-compose upBackend:
cd backend
npm run lint # ESLint
npm run typecheck # TypeScript check
npm test # Jest testsFrontend:
cd frontend
npm run lint # ESLint
npm run typecheck # TypeScript check
npm run build # Vite build- Install Phantom Wallet browser extension
- Create or import a wallet
- Switch to Devnet in Phantom settings
- Visit http://localhost:3000
- Click "Connect with Phantom"
- Approve connection and signature request
In development mode, payments are simulated:
- Go to Billing page
- Click "Add Credits"
- Select amount (e.g., $50)
- Click "Proceed with Payment"
- Wait 2 seconds for simulation
- Credits will be added automatically
Note: In production, this would trigger real Phantom wallet transaction.
Solution:
# Check PostgreSQL is running
pg_isready
# If using Docker:
docker-compose ps
# Restart PostgreSQL
docker-compose restart postgresSolution:
# Find process using port
lsof -ti:3001
# Kill process
kill -9 $(lsof -ti:3001)
# Or change port in backend/.env
PORT=3002Solution:
cd backend
npm run db:generateSolution:
# Check backend is running
curl http://localhost:3001/health
# Check CORS settings in backend/src/app.ts
# Ensure FRONTEND_URL matches your frontend URLagentforge/
├── backend/ # Node.js + Express backend
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ ├── services/ # Business logic
│ │ ├── middleware/ # Auth, error handling
│ │ ├── utils/ # Helpers, logger
│ │ └── types/ # TypeScript types
│ ├── prisma/
│ │ └── schema.prisma # Database schema
│ └── package.json
│
├── frontend/ # React + TypeScript frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom React hooks
│ │ ├── store/ # Zustand stores
│ │ └── services/ # API client
│ └── package.json
│
├── docker-compose.yml # Docker services
├── README.md
└── SETUP.md (this file)
- Explore the Dashboard - See your workflows and credits
- Create a Workflow - Use drag-and-drop canvas
- Add Credits - Test prepayment system
- Run a Workflow - Execute and see logs
- Read API Docs - See
API.mdfor endpoint details
See DEPLOYMENT.md for production setup:
- Environment variables for production
- Database migration strategy
- SSL/TLS configuration
- Monitoring and logging
- Backup procedures
- Documentation: docs
- Issues: GitHub Issues
- Discord: Join community
Need help? Check TROUBLESHOOTING.md or open an issue.