feat: Phase 1 – Plattform-Grundgerüst (Docker, NestJS, React, Auth)
This commit is contained in:
94
README.md
Normal file
94
README.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# MPM – Modulare Web-Management-Plattform
|
||||
|
||||
Zentrale, webbasierte Management-Plattform, über die eigenständige Web-Applikationen als **Module** integriert, verwaltet und Benutzern zugewiesen werden können.
|
||||
|
||||
**Status: Phase 1 – Grundgerüst (abgeschlossen)**
|
||||
|
||||
## Architektur-Überblick
|
||||
|
||||
```
|
||||
Internet
|
||||
│
|
||||
▼
|
||||
Docker Container (mpm-platform, unprivilegierter Benutzer "app")
|
||||
┌─────────────────────────────────────────────┐
|
||||
│ Supervisor (Prozessmanager) │
|
||||
│ ├── Nginx (Reverse Proxy, :8080) │
|
||||
│ │ ├── / -> Management-Frontend │
|
||||
│ │ └── /api/ -> Management-Backend │
|
||||
│ └── NestJS Management-Backend (127.0.0.1:3000)│
|
||||
│ (ab Phase 3: + Modul-Prozesse) │
|
||||
└─────────────────────────────────────────────┘
|
||||
│
|
||||
▼
|
||||
PostgreSQL (eigener Container, persistentes Volume)
|
||||
```
|
||||
|
||||
- **Ein** Applikationscontainer, **kein** Docker-in-Docker, **kein** Docker-Socket.
|
||||
- Module laufen ab Phase 3 als interne Prozesse im selben Container (eigene Ports, nur über den Reverse Proxy erreichbar).
|
||||
- PostgreSQL liegt außerhalb des Applikationscontainers in einem persistenten Volume.
|
||||
|
||||
Details: [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) · Phasen: [`docs/PHASES.md`](docs/PHASES.md)
|
||||
|
||||
## Schnellstart (Docker)
|
||||
|
||||
```bash
|
||||
# 1. Umgebung prüfen (.env liegt mit Entwicklungs-Defaults bei)
|
||||
# Für Produktion: Werte ändern und COOKIE_SECURE=true setzen.
|
||||
|
||||
# 2. Bauen und starten
|
||||
docker compose up --build -d
|
||||
|
||||
# 3. Öffnen
|
||||
# http://localhost:8080
|
||||
# Anmeldung: ADMIN_USERNAME / ADMIN_PASSWORD aus .env
|
||||
# API-Dokumentation (Swagger): http://localhost:8080/api/docs
|
||||
```
|
||||
|
||||
Definition of Done Phase 1: Webseite erreichbar ✓ Login möglich ✓ Admin-Dashboard sichtbar ✓
|
||||
|
||||
## Lokale Entwicklung
|
||||
|
||||
```bash
|
||||
# PostgreSQL starten
|
||||
docker compose up -d postgres
|
||||
|
||||
# Backend (http://127.0.0.1:3000, Swagger: /api/docs)
|
||||
cd apps/platform-backend
|
||||
npm install
|
||||
npm run start:dev
|
||||
# Hinweis: dafür in .env DATABASE_URL auf 127.0.0.1 umstellen
|
||||
|
||||
# Frontend (http://localhost:5173, /api wird an das Backend proxied)
|
||||
cd apps/platform-frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Projektstruktur
|
||||
|
||||
```
|
||||
MPM/
|
||||
├── apps/
|
||||
│ ├── platform-backend/ # NestJS – Management-API (Auth, RBAC, Health, Audit)
|
||||
│ └── platform-frontend/ # React/Vite/Tailwind – Management-UI
|
||||
├── docker/ # Nginx- & Supervisor-Konfiguration
|
||||
├── docs/ # Architektur- & Phasen-Dokumentation
|
||||
├── modules/ # Installierbare Module (ab Phase 3)
|
||||
├── Dockerfile # Multi-Stage-Build des Management-Containers
|
||||
└── docker-compose.yml # PostgreSQL + Management-Container
|
||||
```
|
||||
|
||||
## Tech-Stack
|
||||
|
||||
| Bereich | Technologie |
|
||||
|---|---|
|
||||
| Frontend | React 19, TypeScript, Vite, Tailwind CSS, React Router, TanStack Query, Zod |
|
||||
| Backend | NestJS 11, TypeScript, REST `/api/v1`, OpenAPI/Swagger |
|
||||
| Datenbank | PostgreSQL 18 (Schemas: `management`, ab Phase 3 pro Modul) |
|
||||
| Betrieb | Docker, Nginx, Supervisor, unprivilegierter Benutzer |
|
||||
| Sicherheit | Argon2id, HttpOnly/Secure/SameSite-Cookies, serverseitige Sessions, CSRF-Schutz, Rate Limiting, Account Lockout, Audit-Log, Helmet |
|
||||
|
||||
## Annahme
|
||||
|
||||
„ChatCM" wurde als **shadcn-artige Komponentenbasis** interpretiert: Tailwind CSS plus zentral gepflegte, wiederverwendbare UI-Komponenten (`apps/platform-frontend/src/components/ui`).
|
||||
Reference in New Issue
Block a user