INSIGHT-MVP/repos/INSIGHT-Apps/BRIEFING.md
Thomas Reitz 36196457ea feat(infra): vollständige Ansible-Struktur Phase 1
- Alle Ansible-Rollen erstellt: common, disk_setup, docker, postgresql,
  pgbouncer, redis, nginx, zabbix_agent
- ansible.cfg mit Pipeline-Optimierung
- hosts.yml mit echten IPs (DBS01=.20, APS01=.21, WEB01=.22)
- group_vars für alle Server (dbs, aps, web)
- Zabbix-Server auf sentinel.xinion.de gesetzt
- vault.yml.example als Vorlage für Secrets
- site.yml nutzt import_playbook (DBS01→APS01→WEB01)
- BRIEFING.md für alle 4 Repos angelegt (Platform, Apps, Infra, Shared)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 15:23:29 +01:00

79 lines
2.5 KiB
Markdown

# INSIGHT-Apps — Developer Briefing
> Dieses Dokument ist der Einstiegspunkt für jede neue Claude Code Session in diesem Repo.
> Lies es vollständig bevor du Code schreibst.
## Was ist dieses Repo?
**INSIGHT-Apps** enthält alle fachlichen Module der INSIGHT-Plattform.
Jedes Modul ist ein eigenständiges NestJS-Service + React-Frontend-Paket,
das sich über den `InsightModule`-Contract in die Platform-Shell einbindet.
## Struktur
```
packages/
├── crm-service/ # NestJS: Company, Contact, Deal, Activity, Pipeline
└── crm-frontend/ # React: CRM-Seiten → wird in INSIGHT-Platform Shell eingebunden
# zukünftig:
# ├── hr-service/
# └── hr-frontend/
```
## Module-Contract (PFLICHT lesen!)
Jedes Frontend-Paket **muss** einen `InsightModule`-Manifest exportieren.
Siehe: `INSIGHT-Shared/contracts/module-interface.md`
```typescript
// Beispiel crm-frontend/src/index.ts
export const CrmModule: InsightModule = {
id: 'crm',
name: 'CRM',
requiredRole: 'crm',
routes: [...],
navigation: [...],
}
```
## Abhängigkeiten zu anderen Repos
| Repo | Beziehung |
|------|-----------|
| `INSIGHT-Shared` | Lesen: module-interface.md, api-platform.md — Schreiben: api-crm.md nach Änderungen |
| `INSIGHT-Platform` | Nutzt Core-Service APIs (Auth, User) — eigene Module registrieren sich in der Shell |
| `INSIGHT-Infra` | Stellt DBS01 (PostgreSQL) und APS01 (Docker) bereit |
## Confluence Dokumentation
- **Phase 3 — CRM Modul:** https://xinion.atlassian.net/wiki/x/AoCUEw
- **CRM-Datenmodell:** https://xinion.atlassian.net/wiki/x/AYCVEw
- **Projekt-Übersicht:** https://xinion.atlassian.net/wiki/spaces/ProjektINS/overview
## Tech Stack
- **Backend:** NestJS 10, TypeScript strict, Prisma ORM
- **Frontend:** React 18, Vite, TanStack Query
- **Datenbank:** PostgreSQL 16 (eigenes Schema, kein Multi-Tenancy)
- **Auth:** Tokens kommen von INSIGHT-Platform Core-Service
## Sicherheitsregeln
- Jeder Endpoint mit `@Roles('crm')` oder spezifischerer Rolle absichern
- Kein `any` in TypeScript
- Daten-Ownership prüfen: User darf nur eigene Deals bearbeiten (außer CRM_ADMIN/MANAGER)
- Soft-Delete (`deletedAt`) statt hartem Löschen
## Deploy Key (dieses Repo)
```
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAw2W+ChU6bjQdlTjHgK2FjMPXUD3/1vwNlU+aosmDqt deploy@INSIGHT-Apps
```
Privater Key: `.keys/deploy_apps_ed25519`
## Aktueller Status
- **Phase:** 3 — CRM Modul
- **Stand:** Konzeption (CRM-Datenmodell in Klärung)
- **Nächster Schritt:** CRM-Datenmodell finalisieren → Prisma Schema → Company/Contact API