Overview
The local development setup runs PostgreSQL and Redis inside Docker containers while you run the backend (FastAPI) and frontend (Next.js) natively on your machine. This gives you fast hot-reload for both services and direct debugger access.Prerequisites
| Tool | Version | Install |
|---|---|---|
| Docker | 20.10+ | docker.com |
| Docker Compose | v2+ | Included with Docker Desktop |
| Python | 3.11+ | python.org |
| Node.js | 22+ | nodejs.org |
| Git | 2.x | git-scm.com |
Step-by-Step Setup
Start Docker Services
Launch PostgreSQL and Redis:This starts:
- PostgreSQL 15 with pgvector on port
5432 - Redis 7 on port
6379
Install Backend Dependencies
We recommend using a Python virtual environment (
venv or conda) to avoid dependency conflicts.Configure Environment Variables
Copy the example environment file and adjust as needed:The defaults work out of the box with the local Docker Compose setup. See Environment Variables for the full reference.
Quick Start Script
Alternatively, use the all-in-one start script that handles all of the above steps:Service URLs
Once everything is running, access the following:| Service | URL | Description |
|---|---|---|
| Frontend | http://localhost:3000 | Nadoo AI web application |
| Backend API | http://localhost:8000 | FastAPI REST API |
| Swagger UI | http://localhost:8000/api/docs | Interactive API documentation |
| ReDoc | http://localhost:8000/api/redoc | Alternative API documentation |
Database Credentials
The local Docker Compose file uses the following default credentials:| Parameter | Value |
|---|---|
| Host | localhost |
| Port | 5432 |
| User | postgres |
| Password | 4432646294A404D6351 |
| Database | nadoo_db |
Troubleshooting
Port 5432 or 6379 already in use
Port 5432 or 6379 already in use
Another service is using the port. Either stop the conflicting service or change the port mapping in Then update
docker-compose.local.yml:DATABASE_URL in your .env file to use the new port.Docker containers won't start
Docker containers won't start
Check that Docker is running:If using Docker Desktop, ensure it is started. On Linux, verify the Docker daemon:
Alembic migration fails
Alembic migration fails
Ensure PostgreSQL is fully started before running migrations. You can check:Wait for the message
database system is ready to accept connections before running alembic upgrade head.Frontend can't connect to backend
Frontend can't connect to backend
Verify the backend is running on port 8000 and that your frontend
.env file has the correct API URL:Python dependency errors
Python dependency errors
Ensure you are using Python 3.11 or later:If you have multiple Python versions, use
python3.11 explicitly or create a virtual environment with the correct version.Stopping Services
Using
down -v will delete all data in PostgreSQL and Redis. Only use this when you want a clean slate.