# Development Setup Guide ## Quick Start ### Option 1: Run Individual Services **Webapp (Frontend)**: ```bash cd webapp npm run dev ``` Access at: http://localhost:3000 **Orchestrator (Backend)**: ```bash cd orchestrator npm run dev ``` Access at: http://localhost:8080 ### Option 2: Docker Compose (Full Stack) ```bash docker-compose up -d ``` This starts: - PostgreSQL (port 5432) - Redis (port 6379) - Orchestrator (port 8080) - Webapp (port 3000) ### Option 3: Bash Script (WSL/Ubuntu) ```bash ./scripts/start-dev.sh ``` Starts both services in background. See [WSL Setup Guide](./WSL_SETUP.md) for setup instructions. --- ## Prerequisites 1. **Node.js 18+** installed 2. **npm** installed 3. **PostgreSQL** (optional, for local DB) 4. **Redis** (optional, for caching) --- ## Environment Variables ### Webapp (.env.local) ```env NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-secret NEXT_PUBLIC_ORCH_URL=http://localhost:8080 ``` ### Orchestrator (.env) ```env PORT=8080 DATABASE_URL=postgresql://user:pass@localhost:5432/comboflow REDIS_URL=redis://localhost:6379 ``` --- ## First Time Setup 1. **Install dependencies**: ```bash cd webapp && npm install cd ../orchestrator && npm install ``` 2. **Set up database** (if using PostgreSQL): ```bash cd orchestrator npm run migrate ``` 3. **Start services**: ```bash # Terminal 1 cd webapp && npm run dev # Terminal 2 cd orchestrator && npm run dev ``` --- ## Access Points - **Webapp**: http://localhost:3000 - **Orchestrator API**: http://localhost:8080 - **Health Check**: http://localhost:8080/health - **API Docs**: http://localhost:8080/api-docs (if configured) --- **Last Updated**: 2025-01-15