Initialize backendized SurClaw report system

- Add React/Vite frontend for login, dashboard, reports, templates, users, settings, AI, speech, and media workflows.

- Add NestJS/Prisma/PostgreSQL backend with auth, dashboard stats, reports, templates, users, departments, settings, files, AI, speech, audit logs, and HTML sanitization.

- Add Prisma schema, migrations, seed data, persistent app sessions, Docker/Nginx deployment files, and upload volume configuration.

- Add Vitest, Playwright, backend integration tests, and project documentation for requirements, design, permissions, API contracts, testing, deployment, security, and progress.

- Configure production local fallback switch and remove unused Gemini direct dependency/env wiring.
This commit is contained in:
2026-05-02 01:37:20 +08:00
commit 014aca8619
162 changed files with 27116 additions and 0 deletions

48
docker-compose.yaml Normal file
View File

@@ -0,0 +1,48 @@
services:
db:
image: postgres:16-alpine
container_name: tuwen_db
restart: unless-stopped
environment:
POSTGRES_DB: surclaw
POSTGRES_USER: surclaw
POSTGRES_PASSWORD: surclaw_dev_password
ports:
- "5433:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
api:
build:
context: .
dockerfile: Dockerfile.server
container_name: tuwen_api
restart: unless-stopped
environment:
API_PORT: 3000
CORS_ORIGIN: http://localhost:4002,http://localhost:3001
DATABASE_URL: postgresql://surclaw:surclaw_dev_password@db:5432/surclaw?schema=public
SESSION_SECRET: change-me-in-production
SESSION_COOKIE_SECURE: "false"
FILE_STORAGE_DIR: /app/uploads
ports:
- "3002:3000"
depends_on:
- db
volumes:
- uploads_data:/app/uploads
web:
build:
context: .
dockerfile: Dockerfile
container_name: tuwen_web
restart: unless-stopped
ports:
- "4002:80"
depends_on:
- api
volumes:
postgres_data:
uploads_data: