feat: complete Phase 1 foundation scaffold
Some checks failed
CI / Lint (push) Has been cancelled
CI / TypeCheck (push) Has been cancelled
CI / Test (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/api/Dockerfile name:api]) (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/cms/Dockerfile name:cms]) (push) Has been cancelled
Deploy / Docker Build & Push (map[context:. dockerfile:apps/web/Dockerfile name:web]) (push) Has been cancelled
CI / Build (push) Has been cancelled
Deploy / Deploy (push) Has been cancelled

- Monorepo: Turborepo + pnpm workspaces with 7 apps/packages
- Backend: NestJS scaffold with 9 modules (auth, tenant, curriculum, simulation, portfolio, ai-coach, analytics, classroom, gamification)
- Frontend: React 18 + Vite + TailwindCSS + shadcn/ui with 10 pages, 14 UI primitives, 3 Zustand stores
- Database: Prisma schema with 19 models, 13 enums, seed script, multi-tenant ready
- Docker: Dev, production, and Portainer Compose files with Traefik reverse proxy
- Configuration: .env.example (47 vars), Zod validation, frontend-safe env exposure
- i18n: English + Greek locale files (10 files), ICU MessageFormat, react-i18next
- Shared packages: @investplay/types, @investplay/ui, @investplay/i18n, @investplay/utils
- CI/CD: GitHub Actions (lint, typecheck, test, build, deploy, PR checks)
- Documentation: CONTEXT.md, ARCHITECTURE.md (10 Mermaid diagrams), API.md, LOCALIZATION.md, DEVELOPMENT-ROADMAP.md
- Infrastructure: Dockerfiles (dev + prod), nginx configs, backup/healthcheck scripts
- Security: JWT auth guards, role-based access, rate limiting, Helmet, CORS, PII sanitization
This commit is contained in:
Lefteris Notas
2026-06-12 19:32:57 +03:00
parent fa71c60cfc
commit e75f913f1c
226 changed files with 17547 additions and 0 deletions

155
docker-compose.dev.yml Normal file
View File

@@ -0,0 +1,155 @@
name: investplay-dev
services:
postgres:
image: postgres:16-alpine
container_name: investplay-postgres-dev
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER:-investplay}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-investplay_dev_pass}
POSTGRES_DB: ${POSTGRES_DB:-investplay}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-investplay} -d ${POSTGRES_DB:-investplay}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
networks:
- investplay-dev
redis:
image: redis:7-alpine
container_name: investplay-redis-dev
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes --loglevel warning
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- investplay-dev
minio:
image: minio/minio:latest
container_name: investplay-minio-dev
restart: unless-stopped
ports:
- "9000:9000"
- "9001:9001"
volumes:
- minio-data:/data
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin_dev}
command: server /data --console-address :9001
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s
networks:
- investplay-dev
api:
build:
context: .
dockerfile: apps/api/Dockerfile.dev
container_name: investplay-api-dev
ports:
- "3001:3001"
volumes:
- ./apps/api/src:/app/apps/api/src
- ./apps/api/prisma:/app/apps/api/prisma
- ./packages:/app/packages
- api-node_modules:/app/apps/api/node_modules
environment:
NODE_ENV: development
PORT: 3001
DATABASE_URL: ${DATABASE_URL:-postgresql://investplay:investplay_dev_pass@postgres:5432/investplay}
REDIS_URL: ${REDIS_URL:-redis://redis:6379}
MINIO_ENDPOINT: ${MINIO_ENDPOINT:-minio}
MINIO_PORT: ${MINIO_PORT:-9000}
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-minioadmin}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-minioadmin_dev}
MINIO_USE_SSL: ${MINIO_USE_SSL:-false}
JWT_SECRET: ${JWT_SECRET:-dev-jwt-secret-change-in-production}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
networks:
- investplay-dev
web:
build:
context: .
dockerfile: apps/web/Dockerfile.dev
container_name: investplay-web-dev
ports:
- "5173:5173"
volumes:
- ./apps/web/src:/app/apps/web/src
- ./apps/web/public:/app/apps/web/public
- ./apps/web/index.html:/app/apps/web/index.html
- ./packages:/app/packages
- web-node_modules:/app/apps/web/node_modules
environment:
NODE_ENV: development
VITE_API_URL: ${VITE_API_URL:-http://localhost:3001}
depends_on:
- api
networks:
- investplay-dev
cms:
build:
context: .
dockerfile: apps/cms/Dockerfile.dev
container_name: investplay-cms-dev
ports:
- "3000:3000"
volumes:
- ./apps/cms/src:/app/apps/cms/src
- ./packages:/app/packages
- cms-node_modules:/app/apps/cms/node_modules
environment:
NODE_ENV: development
PORT: 3000
DATABASE_URL: ${CMS_DATABASE_URL:-postgresql://investplay:investplay_dev_pass@postgres:5432/investplay_cms}
PAYLOAD_SECRET: ${PAYLOAD_SECRET:-dev-payload-secret-change-in-production}
depends_on:
postgres:
condition: service_healthy
networks:
- investplay-dev
volumes:
postgres-data:
name: investplay-postgres-data-dev
redis-data:
name: investplay-redis-data-dev
minio-data:
name: investplay-minio-data-dev
api-node_modules:
web-node_modules:
cms-node_modules:
networks:
investplay-dev:
name: investplay-dev
driver: bridge