Aller au contenu principal

Development Workflow

Prerequisites​

node --version  # v18+ required
npm --version # v9+ required
docker --version # v20+ required (for PostgreSQL)

Initial Setup​

# Install dependencies
npm install

# Setup environment files
cp .env.example apps/api/.env
cp .env.example apps/frontend/.env.local

# Start PostgreSQL database
docker run -d --name emtb-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 postgres:15

# Run database migrations
cd apps/api && npx prisma migrate dev

Development Commands​

# Start all services
npm run dev

# Start frontend only
npm run dev:frontend

# Start backend only
npm run dev:api

# Run tests
npm run test
npm run test:security # Security-focused tests