Files
leocrm/.a0proj/project.json
T

16 lines
7.6 KiB
JSON

{
"title": "LeoCRM",
"description": "Plugin-basierte KI und Business-Plattform mit 23 Plugins (CRM, Mail, DMS, Chat, AI-Agenten, Workflows, Knowledge, Search). FastAPI Backend + React/TypeScript Frontend. Deployiert über Coolify auf Hetzner VPS.",
"instructions": "Du arbeitest am LeoCRM-Projekt.\n\n## Projekt-Übersicht\n- **Repo**: /a0/usr/projects/leocrm (Git: Forgejo Leopoldadmin/leocrm)\n- **Frontend**: React + TypeScript + Vite + Tailwind, in frontend/\n- **Backend**: FastAPI + SQLAlchemy + PostgreSQL 16 (pgvector), in app/\n- **Tests**: frontend/src/__tests__/ (Vitest), frontend/e2e/ (Playwright), tests/ (pytest)\n- **Migrations**: alembic/versions/\n- **Plugins**: app/plugins/builtins/ (Mail, DMS, Tasks, Calendar, Kommunikation, AI, etc.)\n- **Plugin-Manifest-Schema**: app/plugins/manifest.py\n\n## Deploy\n### Frontend-only (~20s)\n```bash\nbash /a0/usr/projects/leocrm/scripts/fast-deploy.sh frontend\n```\nBaut lokal, kopiert dist/ direkt in den laufenden Container. Kein Coolify-Rebuild.\nBenötigt: COOLIFY_APP_UUID oder COOLIFY_API_TOKEN (für Container-Suche).\n\n### Full Deploy (~2min, für Backend-Änderungen)\n```bash\nbash /a0/usr/projects/leocrm/scripts/fast-deploy.sh full\n```\nTriggert Coolify-Rebuild über deploy.py.\nBenötigt: COOLIFY_API_TOKEN, APP_DOMAIN.\n\n### Wann was?\n- Nur Frontend (TSX, CSS): frontend\n- Backend (Python, Dockerfile, requirements): full\n- Beides: erst `full`, dann `frontend` (oder nur `full`)\n\n## Git Workflow\n1. Änderungen in /a0/usr/projects/leocrm\n2. git add -A && git commit -m '...' && git push origin main\n3. Dann deploy\n\n## Server & Container\n- Host: 46.225.91.159 (root, SSH Key: /a0/usr/workdir/.ssh/coolify-01-root)\n- Coolify: https://server.media-on.de\n- App UUID: xf7smknlger3hvkrsb910tui (neu erstellt 2026-08-06)\n- Container-Name ändert sich bei jedem Coolify-Deploy (Suffix)\n- Frontend-Pfad im Container: /app/frontend/dist\n- Worker: Teil der Docker-Compose-App (crm_worker service)\n- DB: Teil der Docker-Compose-App (postgres service, pgvector/pgvector:pg16)\n- Redis: Teil der Docker-Compose-App (redis service, redis:7-alpine)\n- prestart.sh führt Alembic-Migrationen + DB-Role-Passwörter + Plugin-Schema-Sync + Admin-Seed aus\n- worker.sh startet ARQ Background Worker\n- healthcheck.sh prüft HTTP /api/v1/health oder Redis-Ping\n\n## Zugänge\n- Web-UI: https://crm.media-on.de/login\n- Forgejo: https://forgejo.media-on.de/Leopoldadmin/leocrm\n- Sensible Credentials siehe leocrm-deploy.promptinclude.md im workdir\n\n## Wichtige Dateien und ihre Funktion\n### Projekt-Wurzeldokumente\n- `AGENTS.md` — Binding engineering contract: Build/Test-Commands, Code-Konventionen, Forbidden Patterns, Quality Gates\n- `README.md` — Projekt-Overview, Stack, Quick-Start\n- `PLATFORM_ROADMAP.md` — EINZIGE Planungs-Datei für zukünftige Entwicklung, Umbauten, Roadmap. Alle Phasen, Tasks und Architekturentscheidungen\n- `THIRD_PARTY_LICENSES.md` — Third-Party-Lizenzhinweise\n- `LICENSE` — Projekt-Lizenz\n- `docker-compose.yaml` — Docker-Compose-Stack (postgres, redis, crm_app, crm_worker)\n- `Dockerfile` — Multi-Stage Build (frontend → builder → runtime)\n- `prestart.sh` — Container-Entrypoint für API (Migrationen, DB-Roles, Seed, uvicorn)\n- `worker.sh` — Container-Entrypoint für ARQ Worker\n- `healthcheck.sh` — Container-Healthcheck (HTTP oder Redis)\n- `requirements.txt` / `requirements-dev.txt` — Python-Dependencies\n- `pyproject.toml` — Python-Projekt-Konfiguration\n- `alembic.ini` — Alembic-Konfiguration\n- `.env.example` — Environment-Variable-Vorlage (Development)\n- `.env.docker.example` — Environment-Variable-Vorlage (Docker/Production)\n\n### Scripts (scripts/)\n- `fast-deploy.sh` — Frontend-Only-Deploy (build + copy) oder Full-Deploy (Coolify rebuild)\n- `deploy.py` — Coolify-API-Deployment-Script (initial, redeploy, verify)\n- `backup.py` — Backup-Script (pg_dump + files, local/S3/Nextcloud, retention)\n- `restore.py` — Restore-Script (DB + files)\n- `seed_admin.py` — Admin-User-Seed\n- `sync_plugin_schema.py` — Plugin-Tabellen-Schema-Sync\n- `ai_deploy.py` — AI-gestütztes Deployment\n- `ai_health_check.py` — AI-Health-Check\n- `ai_run_tests.py` — AI-Test-Runner\n- `check_migration_hashes.py` — Migrations-Hash-Validator\n- `check_indexes.py` — DB-Index-Checker\n- `check_cross_plugin_imports.py` — Cross-Plugin-Import-Checker\n- `ci_pipeline.sh` — CI-Pipeline\n- `migration_release_gate.sh` — Migration-Release-Gate\n- `test_migrations.sh` — Migration-Tests\n- `setup_audit_partitioning.sql` — Audit-Table-Partitioning\n- `setup_pgbouncer.sh` — PgBouncer-Setup\n- `seed_perf_data.py` — Performance-Test-Data\n- `restore_test.sh` — Restore-Test-Script\n\n### Backend (app/)\n- `main.py` — FastAPI-App-Entry-Point, Middleware-Setup, Plugin-Loading\n- `config.py` — Settings-Klasse, Config-Validation (SECRET_KEY, Production-Checks)\n- `deps.py` — FastAPI-Dependencies (DB-Session, Auth, Permissions)\n- `routes/` — API-Routes (contacts, companies, auth, users, workflows, etc.)\n- `services/` — Business-Logic-Services\n- `models/` — SQLAlchemy-Models\n- `schemas/` — Pydantic-Schemas\n- `core/` — Core-Module (auth, permissions, middleware, rate_limit, resilience, redis, worker, etc.)\n- `plugins/` — Plugin-System (registry, manifest, base, migration_runner, signature, quarantine)\n- `plugins/builtins/` — Built-in Plugins (mail, dms, tasks, calendar, kommunikation, ai_*, etc.)\n- `workflows/` — Workflow-Engine\n- `ai/` — AI-Module\n- `commands/` — Command-Pattern-Implementations\n- `utils/` — Utilities\n\n### Frontend (frontend/)\n- `src/pages/` — React-Seiten (Contacts, Mail, DMS, Calendar, Tasks, Settings, etc.)\n- `src/components/` — React-Komponenten\n- `src/api/` — API-Clients (TanStack Query)\n- `src/hooks/` — Custom-Hooks\n- `src/__tests__/` — Vitest-Tests\n- `e2e/` — Playwright-E2E-Tests\n- `vite.config.ts` — Vite-Konfiguration (inkl. PWA)\n- `tailwind.config.js` — Tailwind-Konfiguration\n- `playwright.config.ts` — Playwright-Konfiguration\n\n### Docs (docs/)\n- `INSTALL.md` — Installations-Anleitung\n- `api-documentation.md` — Vollständige API-Doku (295 Endpoints, 30 Tag-Groups)\n- `admin-guide.md` — Admin-Handbuch\n- `permissions.md` — Permissions-Doku\n- `permissions_plugin_dev.md` — Plugin-Dev-Permissions-Guide\n- `plugin-development-guide.md` — Plugin-Development-Guide\n- `ui-design-guidelines.md` — UI-Design-Richtlinien\n- `infrastructure.md` — Infrastruktur-Doku\n- `monitoring.md` — Monitoring-Doku\n- `security_kernel.md` — Security-Kernel-Doku\n\n### Migrations (alembic/versions/)\n- 118 Migration-Dateien\n- `migration_hashes.txt` — Hash-Referenz für Migration-Integrität\n\n## Regeln\n- Frontend-Style an bestehenden Komponenten orientieren (Mail-Plugin als Referenz)\n- Bei UI-Änderungen immer Mail-Plugin als Referenz prüfen\n- Tests nicht editieren außer explizit verlangt\n- Minimal focused changes, bestehenden Style beibehalten\n- Bei destruktiven Änderungen: User fragen\n\n## WICHTIG: Datei-Pflege\n- Nach jeder Aktion, die Dateien erstellt, löscht oder verändert, müssen die obigen Listen aktualisiert werden\n- Veraltete Dateien sind sofort zu löschen — keine Historie-Mitschriften\n- Status-Dateien in .a0/ nur anlegen wenn der User es ausdrücklich verlangt\n- Duplikate vermeiden — jede Information existiert nur einmal\n",
"include_agents_md": true,
"color": "#3b82f6",
"git_url": "https://forgejo.media-on.de/Leopoldadmin/leocrm.git",
"file_structure": {
"enabled": true,
"max_depth": 5,
"max_files": 20,
"max_folders": 20,
"max_lines": 250,
"gitignore": "node_modules\n__pycache__\n*.pyc\n.env\n.git\n.venv\ndist\n"
}
}