mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-24 23:56:40 +02:00
Docker Infrastructure:
- docker-compose.yml with Traefik 3, PostgreSQL 16, PgBouncer, Redis 7, step-ca
- docker-compose.observability.yml with Prometheus, Grafana, Loki, Tempo, Promtail
- Traefik dynamic config (TLS, security headers, CORS, compression)
- PostgreSQL init script (uuid-ossp, pgcrypto, pg_trgm extensions)
- Grafana auto-provisioned datasources (Prometheus, Loki, Tempo)
NestJS Core-Service:
- Auth module: Login (email/password), TOTP 2FA, JWT RS256, token refresh/revocation
- Users module: CRUD, bcrypt cost 12, pagination, role-based access
- Tenants module: CRUD, member management, slug validation
- Prisma schemas: core (Users, AuthProviders, Tenants, Modules, AuditLog)
tenant (Contacts, Activities - CRM reference for Sprint 2)
- TenantPrismaService: Dynamic per-tenant DB connections with caching
- RedisService: Token blocklist, refresh token families, generic cache
- Global JwtAuthGuard with @Public() decorator, RolesGuard, GlobalExceptionFilter
- Health endpoint with DB + Redis status checks
- Swagger API documentation (dev only)
- Multi-stage Dockerfile (dev + production)
React Frontend:
- Vite 6 + React 18 + TypeScript strict
- AuthContext with silent refresh (access token in memory, NOT localStorage)
- Login page with TOTP 2FA support
- App shell with sidebar navigation
- Admin pages: Users + Tenants management tables
- API client with automatic token refresh interceptor
- Multi-stage Dockerfile (dev + nginx production)
CI/CD Pipelines:
- ci.yml: Lint, type-check, test, build on all branches
- deploy.yml: Docker build, push to Forgejo registry, SSH deploy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
82 lines
2 KiB
YAML
82 lines
2 KiB
YAML
# ============================================================
|
|
# INSIGHT MVP - CI Pipeline (Lint, Type-Check, Test, Build)
|
|
# ============================================================
|
|
# Wird bei jedem Push und Pull Request ausgefuehrt.
|
|
# ============================================================
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop, 'feature/**', 'fix/**', 'hotfix/**']
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
# --------------------------------------------------------
|
|
# Core-Service: Lint, Type-Check, Test, Build
|
|
# --------------------------------------------------------
|
|
core-service:
|
|
name: Core-Service CI
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: packages/core-service
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Generate Prisma Client
|
|
run: npx prisma generate --schema=prisma/core.schema.prisma
|
|
|
|
- name: Lint
|
|
run: npm run lint:check
|
|
|
|
- name: Type-Check
|
|
run: npm run typecheck
|
|
|
|
- name: Test
|
|
run: npm test -- --passWithNoTests
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
# --------------------------------------------------------
|
|
# Frontend: Lint, Type-Check, Build
|
|
# --------------------------------------------------------
|
|
frontend:
|
|
name: Frontend CI
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: packages/frontend
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint:check
|
|
|
|
- name: Type-Check
|
|
run: npm run typecheck
|
|
|
|
- name: Build
|
|
run: npm run build
|