Caret’s local development environment is fully containerised. A singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/arrozet/caret/llms.txt
Use this file to discover all available pages before exploring further.
docker compose up --build command pulls together six services — a React/Vite frontend, an Express API Gateway, three Node.js backend services, and a Python/FastAPI AI service — each built from the same Dockerfiles used in production. No manual service wiring is needed; Docker Compose handles networking, dependency ordering, and health checks automatically so you can focus on writing code rather than managing processes.
Prerequisites
- Docker Desktop (or Docker Engine + Compose plugin) installed and running.
- A
.envfile at the repo root containing the required secrets (see Environment Variables below).
Starting the Stack
Services
The table below maps each service to its technology, exposed local port, and health-check command as defined indocker-compose.yml.
| Service | Stack | Local Port | Health Check |
|---|---|---|---|
frontend | React 19 / Vite / Bun | 5173 | — |
api-gateway | Node.js / Express / TypeScript | 3000 | wget -qO- http://localhost:3000/health |
auth-service | Node.js / Express / TypeScript | 3001 | wget -qO- http://localhost:3001/health |
document-service | Node.js / Express / Drizzle | 3002 | wget -qO- http://localhost:3002/health |
collab-service | Node.js / Y.js / WebSocket | 3003 | wget -qO- http://localhost:3003/health |
ai-service | Python / FastAPI / PydanticAI | 8000 | curl -f http://localhost:8000/health |
Service health checks
Every backend service is configured with the following health-check parameters indocker-compose.yml:
Local access URLs
| Service | URL |
|---|---|
| Frontend | http://localhost:5173 |
| API Gateway | http://localhost:3000 |
| Collab WebSocket | ws://localhost:3003 |
| AI Service | http://localhost:8000 |
http://localhost:3000/api/v1 and the collaboration WebSocket at ws://localhost:3003.
Environment Variables
Create a.env file at the repo root (next to docker-compose.yml) before starting the stack. Docker Compose reads this file automatically.
Variables not present in
.env default to empty strings in the development compose file. Services will start but requests requiring database access or authentication will fail. Always populate at minimum DATABASE_URL, SUPABASE_URL, SUPABASE_ANON_KEY, and JWT_SECRET. The collab service additionally requires SUPABASE_JWT_SECRET; auth and document services require SUPABASE_SERVICE_ROLE_KEY.Viewing Logs
Stream logs for all services at once:Stopping the Stack
-v to also remove named volumes if you need a clean slate.
Rebuilding a Single Service
When you change only one service’s code during development, rebuild and restart that service without touching the others:api-gateway with any service name from the table above — for example document-service, collab-service, or ai-service.
Makefile Reference
The repoMakefile exposes convenience targets that wrap common Docker Compose commands.
| Target | Command | Description |
|---|---|---|
make up | docker compose up --build | Build and start all services |
make up-nocache | docker compose build --no-cache && docker compose up | Full rebuild, no layer cache |
make down | docker compose down | Stop and remove containers |
make logs | docker compose logs -f | Stream all service logs |
make ps | docker compose ps | List container status |