- Turborepo monorepo with pnpm workspaces - apps/api: NestJS 11.x with CQRS module - apps/web: Next.js 14 App Router + TailwindCSS - src/modules/shared: base entities, Result pattern, value objects - TypeScript 5.7+ strict mode, shared tsconfig base - Build pipeline: dev, build, lint, test, typecheck Co-Authored-By: Paperclip <noreply@paperclip.ing>
2.0 KiB
2.0 KiB
Development Environment
Prerequisites
- Docker Engine 24+ & Docker Compose v2
- Node.js 22 LTS (for running app services locally)
Quick Start
# 1. Copy environment variables
cp .env.example .env
# 2. Start all infrastructure services
docker compose up -d
# 3. Verify all services are healthy
docker compose ps
Services
| Service | Port(s) | Description | Dashboard/UI |
|---|---|---|---|
| PostgreSQL | 5432 | Database with PostGIS | — |
| Redis | 6379 | Cache, sessions, queue | — |
| Typesense | 8108 | Full-text search engine | http://localhost:8108/health |
| MinIO | 9000 / 9001 | S3-compatible object storage | http://localhost:9001 (console) |
Common Commands
# Start services
docker compose up -d
# View logs (all or specific service)
docker compose logs -f
docker compose logs -f postgres
# Stop services (data preserved in volumes)
docker compose down
# Stop and remove all data
docker compose down -v
# Restart a single service
docker compose restart redis
# Check service health
docker compose ps
Connecting to Services
PostgreSQL
# Via psql
psql postgresql://goodgo:goodgo_secret@localhost:5432/goodgo
# Verify PostGIS
psql postgresql://goodgo:goodgo_secret@localhost:5432/goodgo -c "SELECT PostGIS_Version();"
Redis
redis-cli -p 6379 ping
Typesense
curl http://localhost:8108/health
MinIO
- API:
http://localhost:9000 - Console:
http://localhost:9001(login: minioadmin / minioadmin_secret)
Troubleshooting
- Port conflict: Change ports in
.env(e.g.,DB_PORT=5433) - Permission issues: Run
docker compose down -vand restart - PostGIS not available: Ensure using
postgis/postgis:16-3.4image