Skip to content

Architektur

Kurzüberblick — Details in verlinkten Docs und im Code.

Systemkontext

Browser / Portale  →  Next.js (Coolify)  →  Postgres (gutachtenos)

                    GoTrue · Storage · Graph · Resend

Multi-Tenancy

  • Jede fachliche Tabelle: tenant_id + RLS
  • Rollen: super_admin, tenant_admin, tenant_user, Anwalt via app_metadata.role lawyer
  • Service Role Key nur serverseitig

Feature-Module

Pattern: src/features/NAME/ — Beispiele: auth, cases

actions/     # Server Actions (Zod-validiert)
components/  # UI
lib/         # Hilfsfunktionen
index.ts     # Public exports

Integrationen

IntegrationPfad / Cron
Microsoft 365src/services/integrations/, OAuth pro User
E-Mail IngestCron email-ingest 06:00
Outlook KalenderCron outlook-calendar-import 06:30
SharePoint DMSGraph Sync, Cron sharepoint-revisions
ActaportPush + Doc-Sync (Beta)
KITenant-scoped, Budget-Cap in Integration Settings

Cron-Shell auf App-VPS: /root/gutachtenos-cron.sh

Deploy-Pipeline

  1. Push main → GitHub Actions docker-image.yml
  2. Build Dockerfile.build → GHCR
  3. Coolify zieht latest-Tag, Health-Check /api/health

Dokumentations-Site

AspektDetail
ToolVitePress in docs-site/
Quelledocs/ (Markdown, Single Source of Truth)
Builddocs-site/.vitepress/dist nach npm run build
URLdocs.gutachtenos.pxl.systems (statisch, eigene Coolify-App)
Ausgeschlossendocs/pilot/, Kunden-Lastenheft, interne Roadmaps

Warum VitePress statt Nextra in der App?

  • Docs deployen unabhängig vom SaaS-Image
  • Kein Mix aus Marketing-App und Docs-Router
  • Markdown-first, Local Search
  • llms.txt parallel unter /llms.txt in der App

Portable-by-Design

Env für alle URLs, Migrationen versioniert, Dockerfile + optional render.yaml — Migration VPS → Cloud ~1 Tag.

GutachtenOS — PXL.systems