Track HiveGrid Cloud planning reference

This commit is contained in:
david committed 2026-06-26 20:48:01 +02:00
1 parent b3d5ea6764
commit e341c5938a
5784 files changed
+1104929 -3

No files matched your search

+151
View File
@@ -0,0 +1,151 @@
# HiveGrid Intel — Synthesis Entry Point
generated: 2026-06-07
mode: new (net-new bootstrap)
precedence: ADR > SPEC > PRD > DOC
---
## Doc Counts by Type
Total: 38 documents classified
- ADR: 1 (docs/ARCHITECTURE-DECISIONS.md) — consolidated, 19 individual decisions extracted
- SPEC: 37 (36 module specs + 1 INTEGRATION-CONTRACTS)
- PRD: 0
- DOC: 0
- UNKNOWN: 0
All docs: confidence=high, manifest_override=true. No low-confidence unknowns.
---
## Decisions Locked
Count: 17 locked decisions (AD-1 through AD-5, AD-8 through AD-19)
Not locked (Backlog): AD-6 (EU-Email-Provider), AD-7 (Captcha/Bot-Schutz)
Source: docs/ARCHITECTURE-DECISIONS.md
Locked decision source paths:
- /Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/docs/ARCHITECTURE-DECISIONS.md
---
## Requirements Extracted
Count: 79 requirements (REQ-{slug} entries across 37 SPECs)
Module distribution:
- M01 CRM-Kern: 8 requirements (REQ-crm-datenmodell through REQ-crm-permissions)
- M02 Lead-Inbox: 6 requirements
- M03 Sales-Pipeline: 5 requirements
- M04 Auftrags-/Projektpipeline: 3 requirements
- M05 Form-Builder: 3 requirements
- M06 Booking: 3 requirements
- M07 Angebot+Signatur: 2 requirements
- M09 Email-Inbox: 3 requirements
- M10 Email-Marketing: 3 requirements
- M12 Telefonie: 2 requirements
- M13 Team-Chat: 3 requirements
- M14 HR-Hub: 3 requirements
- M15 Customer-Portal: 3 requirements
- M17 Automation-Engine: 5 requirements
- M18 KI-Layer: 4 requirements
- M19 KWP-Integration: 3 requirements
- M20 Dashboard: 2 requirements
- M21 Audit-Log: 3 requirements
- M22 Notifications: 2 requirements
- M23 Files: 2 requirements
- M24 Globale Suche: 3 requirements
- M25 Calendar-Sync: 2 requirements
- M26 Tasks: 2 requirements
- M27 Auth/Multi-Tenancy: 5 requirements
- M28 Billing: 2 requirements
- M29 Onboarding: 2 requirements
- M30 i18n: 2 requirements
- M31 Branding: 2 requirements
- M32 Feature-Flags: 1 requirement
- M33a Apps-Engine: 2 requirements
- M34 Public-API: 2 requirements
- M35 DSGVO-Export: 2 requirements
- M36 Mobile-App: 3 requirements
- M37 Plattform-Admin: 2 requirements
- M38 Help-Center: 1 requirement
- M39 Help-Desk: 1 requirement
- INTEGRATION-CONTRACTS: 6 cross-cutting requirements
---
## Constraints Extracted
Count: 25 constraints (C-01 through C-25)
Type breakdown:
- schema: 7 (C-01, C-02, C-03, C-06, C-18, C-19, C-22)
- api-contract: 6 (C-09, C-10, C-11, C-12, C-13, C-14, C-15)
- protocol: 7 (C-04, C-07, C-08, C-16, C-23, C-24, C-21)
- nfr: 5 (C-05, C-17, C-20, C-25)
Note: C-15 spans both api-contract and protocol categories.
---
## Context Topics Extracted
Count: 7 topics
Topics: Projekt-Überblick und Ziel, Phase-0-Pflichten, Delivery-Sequenzierung, SHK-Branchen-Kontext, Boilerplate-Reuse-Struktur, KWP-Recut-Entscheidung, Spec-Status
---
## Conflict Detection Summary
Blockers: 0
Competing variants: 0
Auto-resolved: 4
All conflicts are INFO-level (auto-resolved by ADR > SPEC precedence). No user action required to proceed.
---
## Cycle Detection
Result: No cycles detected.
38 docs processed. Cross-ref graph is acyclic (DFS three-color: all refs einseitig). External refs to non-classified docs (AGENTS.md, brainstorming-session-2026-05-07-2206.md, M11-whatsapp.md, milestone PLAN files) are out-of-set and do not form cycles.
---
## Intel Files
decisions.md — 19 ADR-Decisions (AD-1 through AD-19), Phase-0-Pflichten, KWP-Recut
path: /Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/.planning/intel/decisions.md
requirements.md — 79 REQ-{slug} entries from 37 SPECs, with acceptance criteria
path: /Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/.planning/intel/requirements.md
constraints.md — 25 technical constraints (schema, api-contract, nfr, protocol)
path: /Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/.planning/intel/constraints.md
context.md — 7 supporting context topics, cross-cutting notes
path: /Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/.planning/intel/context.md
---
## Conflicts Report
Aufgelöst — alle Ingest-Konflikte sind als ADRs in `docs/ARCHITECTURE-DECISIONS.md` gelockt (das Bootstrap-Artefakt `INGEST-CONFLICTS.md` wurde entfernt).
---
## Downstream Consumer Notes (for gsd-roadmapper)
1. All locked ADR decisions in decisions.md are binding. Do not override without a new ADR entry.
2. AD-6 and AD-7 are explicitly NOT locked — downstream planning may defer or pick.
3. KWP-Recut (M19): current spec describes Windows-Client variant. Re-cut M089–M095 scope before routing M19.
4. AD-5 (Meilisearch): requires self-hosted Meilisearch infra as prerequisite before M24 implementation.
5. Phase-0-Pflichten must precede any module implementation milestone (see decisions.md Phase-0 section).
6. M11-whatsapp.md (referenced by M13, M18) is NOT in this ingest set — Phase 2, not yet spec'd.
7. SHK-Branchen-Templates (M12, M27, M03, M04, M29) are deferred for Noah/Geerkens validation — not blockers.
@@ -0,0 +1,40 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/docs/ARCHITECTURE-DECISIONS.md",
"type": "ADR",
"confidence": "high",
"manifest_override": true,
"title": "HiveGrid 2.0 — Architektur-Entscheidungen",
"summary": "Consolidated architecture decision record for HiveGrid 2.0 covering tenant isolation, data model, auth, sessions, search, encryption, realtime, naming, and delivery scope.",
"scope": [
"Postgres RLS",
"Prisma",
"CRM data model",
"AdminUser",
"AdminSession",
"Redis",
"Meilisearch",
"pgvector",
"Envelope Encryption",
"WebSocket",
"SSE",
"KWP integration",
"Stripe",
"Automation Editor",
"Mobile Offline",
"Customer Portal",
"Authentik OIDC",
"Scaleway Key Manager",
"hocuspocus",
"boilerplate packages"
],
"cross_refs": [
"AGENTS.md",
"docs/boilerplate-mapping/_SUMMARY.md",
"docs/boilerplate-mapping/M19-kwp-integration.md",
"docs/INTEGRATION-CONTRACTS.md",
"PLAN.md"
],
"locked": true,
"precedence": null,
"notes": "Document contains 19 decisions (AD-1 through AD-19). AD-1 through AD-5 and AD-8 through AD-19 are marked ✅ (accepted/binding per 'verbindlich für die Umsetzung'). AD-6 (EU Email Provider) and AD-7 (Captcha) are marked 🅿️ (Backlog, decision deferred) and are not locked. locked:true reflects the dominant accepted status per manifest instruction; individual deferred decisions (AD-6, AD-7) should be treated as not locked by consumers."
}
@@ -0,0 +1,37 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/docs/INTEGRATION-CONTRACTS.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "HiveGrid Integration-Contracts",
"summary": "Verbindliche Docking-Points für Sidebar, Routes, Breadcrumbs, Permissions, Activity-Stream, Audit, Search-Index und i18n, an denen jedes Modul anschließen muss.",
"scope": [
"Sidebar",
"Route-Patterns",
"Breadcrumbs",
"Activity-Stream",
"Audit",
"Notification",
"Search-Index",
"i18n",
"Permissions",
"View-Model",
"Smoke-Tests",
"Mobile-Tab-Bar",
"Customer-Portal",
"packages/ui-app",
"packages/search",
"packages/entitlements",
"packages/i18n",
"@hivegrid/activity",
"@hivegrid/audit",
"@hivegrid/notifications"
],
"cross_refs": [
"docs/ARCHITECTURE-DECISIONS.md",
"AGENTS.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,35 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M01-crm-kern.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 1 — CRM-Kern",
"summary": "Technical specification for CRM core module covering contacts, companies, leads, activity stream, custom fields, tags, search, duplicate detection, and permissions.",
"scope": [
"Contact",
"Company",
"Lead",
"ContactCompanyRelation",
"ContactEmail",
"ContactPhone",
"Activity",
"CustomFieldDefinition",
"CustomFieldValue",
"Tag",
"EntityTag",
"CRM module",
"permissions",
"activity stream",
"duplicate detection",
"custom fields",
"tags",
"lead promotion",
"tenant"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,45 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M02-lead-inbox.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 2 — Lead-Inbox / Lead-Management",
"summary": "Technical specification for the Lead-Inbox module covering list workflow, triage, source detection, status transitions, bulk actions, statistics, and permissions.",
"scope": [
"Lead-Inbox",
"Lead-Management",
"Triage",
"Lead-Status-Workflow",
"Anti-Spam",
"Anomalie-Detection",
"Bulk-Actions",
"Lead-Statistiken",
"Activity-Stream",
"Permissions",
"Quellen-Erkennung",
"Auto-Anlage",
"DSGVO-Auto-Lösch",
"Routes",
"Form-Submissions",
"Email-Inbox",
"Telefonie",
"Automation-Engine",
"Audit-Log"
],
"cross_refs": [
"_bmad-output/specs/M01-crm-kern.md",
"_bmad-output/specs/M05-form-builder.md",
"_bmad-output/specs/M09-email-inbox.md",
"_bmad-output/specs/M12-telefonie.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M18-ki.md",
"_bmad-output/specs/M21-audit-log.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M26-tasks.md",
"_bmad-output/specs/M27-auth-permissions.md",
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,40 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M03-sales-pipeline.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Sales-Pipeline (Deals)",
"summary": "Technical specification for the sales pipeline module covering data models, routes, kanban/list views, deal lifecycle, forecasting, integrations, and permissions.",
"scope": [
"Pipeline",
"PipelineStage",
"Deal",
"DealActivity",
"DealForm",
"LostReason",
"HiveNumberSeq",
"Kanban-View",
"Listen-View",
"Forecast",
"KPIs",
"Permissions",
"Won-Handoff",
"Activity-Stream",
"Automation-Engine",
"Tenant"
],
"cross_refs": [
"_bmad-output/specs/M1-crm-kern.md",
"_bmad-output/specs/M2-lead-inbox.md",
"_bmad-output/specs/M4-auftragspipeline.md",
"_bmad-output/specs/M5-forms.md",
"_bmad-output/specs/M9-email-sync.md",
"_bmad-output/specs/M12-telefonie.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M20-dashboard.md",
"_bmad-output/specs/M26-tasks.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,47 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M04-auftragspipeline.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 4 — Auftrags- / Projektpipeline",
"summary": "Technical specification for the order and project pipeline module covering data models, routes, Kanban views, Plantafel scheduling, acceptance protocols, permissions, and module integrations.",
"scope": [
"ProjectPipeline",
"ProjectPipelineStage",
"Project",
"ProjectMember",
"ScheduleEntry",
"AcceptanceProtocol",
"ProjectForm",
"ProjectTemplate",
"Plantafel",
"Kanban",
"Permissions",
"SHK-Pipelines",
"Acceptance-Form-Templates",
"Routes",
"Tenant"
],
"cross_refs": [
"_bmad-output/specs/M01-crm.md",
"_bmad-output/specs/M03-sales-pipeline.md",
"_bmad-output/specs/M05-form-builder.md",
"_bmad-output/specs/M06-booking.md",
"_bmad-output/specs/M09-email-inbox.md",
"_bmad-output/specs/M12-telefonie.md",
"_bmad-output/specs/M13-team-chat.md",
"_bmad-output/specs/M14-hr-hub.md",
"_bmad-output/specs/M15-customer-portal.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M18-whisper.md",
"_bmad-output/specs/M19-kwp-integration.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M23-files.md",
"_bmad-output/specs/M25-calendar-sync.md",
"_bmad-output/specs/M26-tasks.md",
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,37 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M05-form-builder.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 5 — Form Builder",
"summary": "Technical specification for a Google-Forms-level form builder module covering data model, editor, field types, validation, sharing, submissions, actions, and permissions.",
"scope": [
"Form",
"FormField",
"FormSubmission",
"FormSubmissionAnswer",
"FormFile",
"FormLink",
"FormAction",
"FormActionLog",
"FormLog",
"FormsTag",
"Form Editor",
"Drag-and-Drop",
"Validation",
"Sharing",
"Embed",
"Form Templates",
"Submissions",
"Permissions",
"Tenant",
"File Storage",
"M05"
],
"cross_refs": [
"_bmad-output/specs/brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,31 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M06-booking.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 6 — Booking / Termin-Buchung",
"summary": "Technical specification for a Calendly-style tenant booking system with calendar sync, public booking pages, availability rules, and CRM integration.",
"scope": [
"BookingPage",
"BookingPageProvider",
"AvailabilityRule",
"AvailabilityException",
"Appointment",
"slot calculation",
"embed code",
"confirmation email",
"calendar sync",
"lead inbox",
"activity stream",
"form submission",
"permissions",
"public booking page",
"iFrame embed"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,39 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M07-angebot-signatur.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 7 — Angebot + Signatur",
"summary": "Technical spec for deal-level document signature workflows via PandaDoc/DocuSign integration, covering data models, webhooks, multi-signer flows, and permissions.",
"scope": [
"DealSignatureDocument",
"DealSignatureSigner",
"DealSignatureStatusTransition",
"SignatureProviderConnection",
"SignatureWebhookEvent",
"PandaDoc",
"DocuSign",
"M33a Apps-Engine",
"M23 Files",
"M17 Automation",
"M22 Notifications",
"M3 Sales",
"PDF-Upload",
"Webhook",
"Multi-Signer-Workflow",
"Permissions"
],
"cross_refs": [
"_bmad-output/specs/M01-crm-kern.md",
"_bmad-output/specs/M03-sales-pipeline.md",
"_bmad-output/specs/M04.md",
"_bmad-output/specs/M05-form-builder.md",
"_bmad-output/specs/M17.md",
"_bmad-output/specs/M22.md",
"_bmad-output/specs/M23.md",
"_bmad-output/specs/M33a.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,36 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M09-email-inbox.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Email Inbox + Sync (Gmail/Outlook)",
"summary": "Technical specification for tenant mailbox integration with Gmail and Outlook, covering data models, OAuth flows, sync strategy, auto-matching, and sending-domain setup.",
"scope": [
"EmailIntegrationMailbox",
"EmailIntegrationMessage",
"EmailIntegrationSyncCursor",
"EmailIntegrationWebhookEvent",
"Email",
"EmailRead",
"EmailAttachment",
"TenantSendingDomain",
"TenantInboundAddress",
"Gmail",
"Microsoft Outlook",
"OAuth",
"DKIM",
"SPF",
"DMARC",
"Pub/Sub",
"Microsoft Graph",
"Activity Stream",
"Provider Adapter",
"Inbox View",
"Compose",
"Scaleway"
],
"cross_refs": [],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,40 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M10-email-marketing.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 10 — Email-Marketing",
"summary": "Technical specification for a tenant-scoped email marketing module covering campaigns, tracking, bounce handling, unsubscribe flows, DSGVO compliance, and automation integration.",
"scope": [
"Campaign",
"OutboundEmail",
"OutboundEmailOpen",
"OutboundEmailClick",
"EmailTemplate",
"EmailSender",
"Unsubscribe",
"RecipientSegment",
"EmailSuppressionList",
"BullMQ",
"SMTP provider",
"Scaleway TEM",
"DKIM",
"Automation-Engine",
"M9",
"M17",
"M1",
"M33",
"tracking pixel",
"click tracking",
"bounce handling",
"double opt-in",
"DSGVO",
"permissions"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,33 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M12-telefonie.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 12 — Telefonie (AirCall)",
"summary": "Technical specification for AirCall telephony integration including data models, OAuth connect flow, click-to-call, inbound webhook processing, and provider adapter pattern.",
"scope": [
"TelephonyConnection",
"TelephonyUserBinding",
"TelephonyCallSession",
"TelephonyWebhookEvent",
"AirCall",
"OAuth",
"Webhook",
"Click-to-Call",
"Activity-Stream",
"Automation-Engine",
"TelephonyProviderInterface",
"AirCallAdapter",
"Permissions",
"Contact",
"Deal",
"Lead",
"Tenant"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,51 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M13-team-chat.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 13 — Team-Chat (intern)",
"summary": "Technical specification for an internal team chat module replacing Quiply, with WebSocket real-time messaging, three channel types, and deep CRM/project integration.",
"scope": [
"TeamChat",
"TeamChatMember",
"TeamChatMessage",
"TeamChatPinnedMessage",
"TeamChatReaction",
"TeamChatThread",
"TeamChatRead",
"WebSocket",
"Redis",
"Channels",
"Threads",
"Reactions",
"Mentions",
"Notifications",
"File-Uploads",
"Link-Previews",
"Activity-Stream",
"Permissions",
"Push-Notifications",
"M4-Project",
"M1-CRM",
"M3-Deal",
"M22-Notifications",
"M23-Files",
"M26-Tasks",
"M27-Groups"
],
"cross_refs": [
"_bmad-output/specs/M4-project.md",
"_bmad-output/specs/M1-crm.md",
"_bmad-output/specs/M3-deal.md",
"_bmad-output/specs/M11-whatsapp.md",
"_bmad-output/specs/M15-customer-portal.md",
"_bmad-output/specs/M18-ai.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M23-files.md",
"_bmad-output/specs/M26-tasks.md",
"_bmad-output/specs/M27-users-groups.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,54 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M14-hr-hub.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 14 — HR-Hub / Mitarbeiterplattform",
"summary": "Technical specification for the HR-Hub module covering employee profiles, announcements, leave workflows, payslips, password-safe vaults, surveys, and requests.",
"scope": [
"HrEmployeeProfile",
"HrAnnouncement",
"EmployeeVacationRequest",
"EmployeeSickLeaveReport",
"EmployeePayslip",
"EmployeeUploadReminder",
"EmployeePasswordSafeVault",
"EmployeePasswordSafeEntry",
"HrSurvey",
"HrRequest",
"HrRequestTemplate",
"HrLocation",
"HrEmployeeDocument",
"HrResource",
"HrQuickLink",
"HR-Hub",
"Mitarbeiterplattform",
"Password-Safe",
"Payslip",
"Leave-Workflow",
"Bulk-Upload",
"Permissions",
"Audit-Log",
"KMS",
"AES-256-GCM"
],
"cross_refs": [
"_bmad-output/specs/M1-hr-hub.md",
"_bmad-output/specs/M4-auftragspipeline.md",
"_bmad-output/specs/M5-form-builder.md",
"_bmad-output/specs/M12-telefonie.md",
"_bmad-output/specs/M13-team-chat.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M23-files.md",
"_bmad-output/specs/M25-calendar.md",
"_bmad-output/specs/M27-auth-permissions.md",
"_bmad-output/specs/M30-i18n.md",
"_bmad-output/specs/M33a-apps-engine.md",
"_bmad-output/specs/M35-dsgvo-export.md",
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,38 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M15-customer-portal.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 15 — Customer-Portal (Endkunden-Login)",
"summary": "Technical specification for the customer-facing portal with separate auth, project visibility, document release, file upload, and DSGVO workflows.",
"scope": [
"PortalUser",
"CustomerPortalSession",
"CustomerPortalProjectAccess",
"CustomerPortalProjectDocument",
"PortalConfiguration",
"PortalEmailTemplate",
"Magic-Link Auth",
"Portal Routes",
"Tenant Admin Portal Config",
"DSGVO Lösch-Workflow",
"Auto-Status-Mails",
"File Upload",
"Portal Forms"
],
"cross_refs": [
"_bmad-output/specs/M27-auth-multi-tenancy.md",
"_bmad-output/specs/M4-auftragspipeline.md",
"_bmad-output/specs/M1-crm.md",
"_bmad-output/specs/M3-sales-pipeline.md",
"_bmad-output/specs/M5-form-builder.md",
"_bmad-output/specs/M9-email-inbox-sending.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M23-files.md",
"_bmad-output/specs/M35-dsgvo.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,50 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M17-automation-engine.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 17 — Automation Engine",
"summary": "Technical specification for the Automation Engine module covering data models, trigger/action libraries, flow editor, AI-assisted creation, dry-run, loop guards, idempotency, templates, and permissions.",
"scope": [
"AutomationRule",
"AutomationRuleStep",
"AutomationExecution",
"AutomationStepExecution",
"AutomationCredential",
"AutomationTemplate",
"Trigger-Library",
"Action-Library",
"Flow-Editor",
"KI-Erstellung",
"Dry-Run",
"Loop-Guard",
"Rate-Limit",
"Idempotenz",
"Resume-Mode",
"Templates",
"Permissions",
"Trigger-Volumen-Metering",
"Stage-Stuck-Eskalation",
"M1",
"M2",
"M3",
"M4",
"M5",
"M6",
"M9",
"M12",
"M14",
"M15",
"M18",
"M19",
"M23",
"M25",
"M26",
"M33a",
"M33c"
],
"cross_refs": [],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,42 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M18-ki-layer.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 18 — KI-Layer / LLM-Gateway",
"summary": "Technical specification for an EU-only LLM gateway with multi-provider abstraction, RAG embeddings, Whisper transcription, token tracking, and security controls.",
"scope": [
"LLM-Gateway",
"LlmGatewayProvider",
"LlmGatewayModel",
"AiSettings",
"AiCredits",
"AiTokenUsage",
"Conversation",
"ConversationMessage",
"GeneratedObject",
"TenantEmbedding",
"HelpArticleEmbedding",
"Whisper",
"RAG",
"pgvector",
"Scaleway",
"Mistral",
"AlephAlpha",
"Promptfoo",
"HiveMind",
"permissions"
],
"cross_refs": [
"_bmad-output/specs/M17-automations.md",
"_bmad-output/specs/M4-acceptance.md",
"_bmad-output/specs/M9-inbox.md",
"_bmad-output/specs/M11-whatsapp.md",
"_bmad-output/specs/M24-global-search.md",
"_bmad-output/specs/M38-help-center.md",
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,46 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M19-kwp-integration.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 19 — KWP-Integration",
"summary": "Technical specification for integrating KWP ERP via a Windows sync client and cloud queue, covering data model, sync mechanics, schema drift detection, and adapter interface.",
"scope": [
"KWP",
"kwpsync.exe",
"MSSQL",
"HiveGrid Cloud API",
"KwpSettings",
"KwpRegistry",
"KwpProjectQueue",
"KwpProjectNumberSequence",
"KwpProjectNumberReservation",
"KwpApiKey",
"KwpDocument",
"KwpErrorReport",
"KwpSchemaSnapshot",
"Schema-Drift-Sentinel",
"Adapter-Interface",
"Windows-Service",
"SQLite",
"M33a",
"M17",
"M37",
"Permissions"
],
"cross_refs": [
"docs/milestones/M19-KWP-API-RECUT.md",
"docs/milestones/M089/PLAN.md",
"docs/milestones/M090/PLAN.md",
"docs/milestones/M091/PLAN.md",
"docs/milestones/M092/PLAN.md",
"docs/milestones/M093/PLAN.md",
"docs/milestones/M094/PLAN.md",
"docs/milestones/M095/PLAN.md",
"brainstorming-session-2026-05-07-2206.md",
"app/integrations/kwp/i18n/de.json"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,31 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M20-dashboard.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 20 — Dashboard / Reporting",
"summary": "Technical specification for a configurable, role-based dashboard module with widgets, layouts, permissions, caching, and realtime updates.",
"scope": [
"Dashboard",
"DashboardLayout",
"WidgetCatalog",
"WidgetInstance",
"Widget",
"Tenant",
"Permissions",
"WebSocket",
"Aggregat-Cache",
"Role-Default-Layouts",
"Sales",
"Projects",
"Tasks",
"HR",
"AI"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,31 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M21-audit-log.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 21 — Audit-Log",
"summary": "Technical specification for a tenant-wide, append-only audit trail covering all write actions, data model, retention, export, permissions, and compliance requirements.",
"scope": [
"AuditEntry",
"AuditExportJob",
"AuditRetentionPolicy",
"audit trail",
"tenant",
"permissions",
"DSGVO compliance",
"legal hold",
"hash chain",
"Scaleway storage",
"auditService",
"export jobs",
"activity stream",
"RLS",
"cron job"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,39 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M22-notifications.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 22 — Notifications",
"summary": "Three-channel notification system (In-App, Email, Mobile-Push) with per-user preferences, quiet hours, anti-spam bundling, and mobile device registration.",
"scope": [
"Notification",
"NotificationPreference",
"NotificationDevice",
"NotificationBundle",
"NotificationQuietHours",
"In-App-Notification-Center",
"Email",
"Mobile-Push",
"APNs",
"FCM",
"Novu",
"BullMQ",
"Notification-Center",
"Versand-Pipeline",
"Anti-Spam-Bündelung",
"Ruhezeiten",
"Event-Typen-Katalog",
"Permissions",
"Tenant",
"User",
"Redis",
"SSE",
"WebSocket"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,31 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M23-files.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 23 — Files / Dokumentenablage",
"summary": "Technical spec for tenant-scoped file storage module with chunked upload, versioning, entity linking, preview generation, and Scaleway S3 storage architecture.",
"scope": [
"File",
"FileVersion",
"FileChunk",
"FileUploadProgress",
"FileEntityLink",
"Scaleway Object Storage",
"chunked upload",
"preview generation",
"permissions",
"activity stream",
"tenant isolation",
"files browser",
"versioning",
"customer portal upload",
"form submission"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,31 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M24-globale-suche.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 24 — Globale Suche",
"summary": "Technical specification for a global Cmd+K-style cross-entity hybrid search using Postgres FTS and pgvector embeddings with permission-aware adapter pattern.",
"scope": [
"SearchIndexEntry",
"RecentSearch",
"EmbeddingProviderJob",
"pgvector",
"Postgres FTS",
"tsvector",
"Outbox-Pattern",
"Embedding-Provider",
"SearchAdapter",
"Such-Modal",
"Vollbild-Such-View",
"Worker-Queue",
"tenant_id",
"RLS",
"Modul 24"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,30 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M25-calendar-sync.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 25 — Calendar-Sync",
"summary": "Technical specification for bidirectional OAuth2 calendar sync with Google Calendar and Microsoft Outlook/365 per user, using a shared CalendarAdapter interface.",
"scope": [
"CalendarConnection",
"CalendarEvent",
"CalendarEventMapping",
"CalendarSyncCursor",
"CalendarWebhookEvent",
"CalendarAdapter",
"Google Calendar",
"Microsoft Outlook",
"OAuth2",
"webhook",
"availability calculation",
"booking integration",
"permissions",
"adapter pattern"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,44 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M26-tasks.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 26 — Tasks / Aufgaben",
"summary": "Technical specification for a lightweight cross-entity task module covering data model, routes, list/detail views, creation sources, reminders, and permissions.",
"scope": [
"Task",
"TaskWatcher",
"tenant",
"Sidebar",
"routes",
"permissions",
"Activity-Stream",
"Reminder",
"Auto-Archivierung",
"Cron-Job",
"Notifications",
"Form-Action",
"Automation-Action",
"Chat",
"Contact",
"Company",
"Lead",
"Deal",
"Project",
"Group",
"User"
],
"cross_refs": [
"_bmad-output/specs/M01-crm.md",
"_bmad-output/specs/M03-sales.md",
"_bmad-output/specs/M04-projekte.md",
"_bmad-output/specs/M05-form-builder.md",
"_bmad-output/specs/M13-team-chat.md",
"_bmad-output/specs/M17-automation-engine.md",
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M35-dsgvo.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,29 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M27-auth-multi-tenancy.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 27 — Auth / Multi-Tenancy / Rollen / Permissions",
"summary": "Technical specification for authentication, multi-tenancy URL structure, role-based permissions, user lifecycle, API keys, and feature gating.",
"scope": [
"authentication",
"multi-tenancy",
"tenant",
"roles",
"permissions",
"user-lifecycle",
"API-keys",
"feature-gating",
"sessions",
"TOTP",
"RLS",
"feature-flags",
"subscription"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,36 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M28-subscriptions-billing.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 28 — Subscriptions / Billing",
"summary": "Technical specification for HiveGrid subscription engine, Stripe billing integration, seat model, trial/dunning lifecycle, AI credits, and service metering.",
"scope": [
"TenantSubscription",
"SubscriptionProduct",
"SubscriptionPrice",
"SubscriptionFeature",
"SubscriptionUsageBasedPrice",
"TenantSubscriptionUsageRecord",
"CheckoutSessionStatus",
"Credit",
"Stripe",
"Stripe-Checkout",
"Stripe-Webhooks",
"Seat-Modell",
"Trial-Phase",
"Dunning",
"Frozen-Modus",
"AI-Credits",
"Service-Metering",
"Setup-Fee",
"Read-Only-Middleware",
"Permissions"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,45 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M29-onboarding.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 29 — Onboarding",
"summary": "Technical specification for tenant onboarding wizard, branchen-driven templates, demo data provisioning, first-steps checklist, and AI walkthrough after self-service signup.",
"scope": [
"Onboarding",
"OnboardingSession",
"OnboardingStep",
"OnboardingFilter",
"OnboardingSessionAction",
"OnboardingSessionFilterMatch",
"OnboardingSessionStep",
"OnboardingDemoProvisioning",
"OnboardingInvitationDispatch",
"Wizard",
"SHK-Templates",
"Demo-Daten",
"Erste-Schritte-Checkliste",
"KI-Walkthrough",
"Permissions",
"Branchen-Templates",
"Tenant",
"Routes"
],
"cross_refs": [
"_bmad-output/specs/M27",
"_bmad-output/specs/M28",
"_bmad-output/specs/M18",
"_bmad-output/specs/M20",
"_bmad-output/specs/M30",
"_bmad-output/specs/M38",
"_bmad-output/specs/M23",
"_bmad-output/specs/M01",
"_bmad-output/specs/M03",
"_bmad-output/specs/M04",
"_bmad-output/specs/M05",
"_bmad-output/specs/M07"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,44 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M30-i18n.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 30 — i18n / Mehrsprachigkeit",
"summary": "Technical specification for internationalization architecture: locale file structure, language resolution, data model, outbound communication, and build-time validation.",
"scope": [
"i18n",
"Locale-Files",
"User",
"Tenant",
"Contact",
"Language-Resolution",
"Outbound-Communication",
"Email",
"WhatsApp",
"Push-Notifications",
"In-App-Notifications",
"Settings-Routes",
"DeepL-Pipeline",
"Build-Validation",
"ICU-Pluralization",
"Intl-API"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md",
"Modul 27",
"Modul 1",
"Modul 3",
"Modul 4",
"Modul 5",
"Modul 6",
"Modul 10",
"Modul 11",
"Modul 13",
"Modul 14",
"Modul 22",
"Modul 38"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,28 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M31-branding.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 31 — Branding / Theme",
"summary": "Technical spec for user-level Light/Dark/System theme preference in Phase 1, with Phase 2 tenant branding, white-label, and Capacitor theming outlined.",
"scope": [
"User",
"theme_preference",
"TenantBranding",
"CSS variables",
"SSR",
"Cookie",
"Capacitor",
"Logo",
"White-Label",
"custom domain",
"email templates",
"feature gate"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,29 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M32-feature-flags.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 32 — Feature-Flags",
"summary": "Technical spec for a platform-admin feature-flag system enabling per-tenant flag activation with filters, overrides, lifecycle management, and audit logging.",
"scope": [
"FeatureFlag",
"FeatureFlagFilter",
"TenantFeatureFlag",
"admin.hivegrid.de",
"feature-flags routes",
"tenantHasFlag",
"AdminAuditLog",
"Modul 32",
"Modul 37",
"Modul 27",
"Modul 21",
"LP-9",
"LP-10"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,35 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M33a-apps-engine.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 33a — Apps-Engine / Adapter-Layer",
"summary": "Technical specification for the Apps-Engine adapter layer that provides a unified interface, data model, lifecycle, sync mechanics, and permissions for all external integrations.",
"scope": [
"Apps-Engine",
"Adapter-Layer",
"DataConnection",
"AppSyncRun",
"AppSyncRunLog",
"AppSyncItem",
"Adapter-Registry",
"OAuth2",
"Webhook",
"Sync-Mechanik",
"Settings-UI",
"Connection-Health",
"Permissions",
"KWP",
"Gmail",
"AirCall",
"Stripe",
"PandaDoc",
"Marketplace"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,37 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M34-public-api.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 34 — Public API & Webhooks",
"summary": "Technical specification for HiveGrid Phase-1 read-only REST API, incoming lead-push webhooks, outgoing webhook subscriptions, rate-limiting, and OpenAPI documentation.",
"scope": [
"Public API",
"Webhooks",
"API Keys",
"Read Endpoints",
"Incoming Webhooks",
"Outgoing Webhooks",
"Rate Limiting",
"OpenAPI",
"IntegrationApiRequest",
"WebhookSubscription",
"WebhookDelivery",
"WebhookDeliveryAttempt",
"IncomingWebhookIngestion",
"Automation Engine",
"Redis",
"Contacts",
"Deals",
"Leads",
"Projects",
"Tasks",
"Companies"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,33 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M35-dsgvo-export.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 35 — DSGVO-Export / Account-Löschung",
"summary": "Technical specification for GDPR data export, user and tenant account deletion, AVV contract, subprocessor list, and privacy manifest for HiveGrid.",
"scope": [
"GdprExportJob",
"TenantDeletionRequest",
"AvvAcceptance",
"Subprocessor",
"BullMQ worker",
"ZIP export",
"Privacy-Hub routes",
"Capacitor app privacy manifest",
"Stripe subscription",
"pgvector embeddings",
"Redis cache",
"Scaleway storage"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md",
"Modul 27 D.3",
"Modul 28",
"Modul 36",
"Modul 37",
"Modul 23"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,45 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M36-mobile-app.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 36 — Mobile-App (Capacitor-Wrapper)",
"summary": "Technical specification for a Capacitor-wrapped native iOS/Android mobile app with offline sync, biometric login, push notifications, and Apple compliance.",
"scope": [
"Mobile-App",
"Capacitor",
"iOS",
"Android",
"OfflineSyncQueue",
"MobileAppSession",
"NotificationDevice",
"IndexedDB",
"Push-Notifications",
"Face-ID",
"Touch-ID",
"Kamera",
"Deeplinks",
"Service-Worker",
"App-Store-Submission",
"Privacy-Manifest",
"Biometrie",
"CI/CD"
],
"cross_refs": [
"_bmad-output/specs/M22-notifications.md",
"_bmad-output/specs/M27-auth-multi-tenancy.md",
"_bmad-output/specs/M35-dsgvo-privacy.md",
"_bmad-output/specs/M28-subscription.md",
"_bmad-output/specs/M21-audit-log.md",
"_bmad-output/specs/M23-files.md",
"_bmad-output/specs/M26-acceptance.md",
"_bmad-output/specs/M4-tasks.md",
"_bmad-output/specs/M13-chat.md",
"_bmad-output/specs/M30-i18n.md",
"_bmad-output/specs/M31-branding.md",
"_bmad-output/specs/M37-platform-admin.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,42 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M37-plattform-admin.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 37 — Plattform-Admin",
"summary": "Technical specification for the HiveGrid platform admin subdomain, covering architecture separation, data models, auth, permissions, and all admin area routes.",
"scope": [
"AdminUser",
"AdminRole",
"AdminPermission",
"AdminSession",
"AdminAuditLog",
"AdminTenantNote",
"AdminLead",
"AdminDeal",
"AdminSupportTicket",
"admin.hivegrid.de",
"Tenant",
"Subscription",
"Feature-Flags",
"Worker-Queues",
"KWP-Sync",
"Subprozessoren",
"AVV",
"Lead-Management",
"Support-Inbox",
"RBAC"
],
"cross_refs": [
"_bmad-output/specs/M32-feature-flags.md",
"_bmad-output/specs/M35-dsgvo.md",
"_bmad-output/specs/M28-subscriptions.md",
"_bmad-output/specs/M27-auth.md",
"_bmad-output/specs/M38-help-center.md",
"_bmad-output/specs/M39-feedback-widget.md",
"_bmad-output/specs/M21-audit.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,29 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M38-help-center.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 38 — Help-Center (öffentlich)",
"summary": "Technical specification for HiveGrid's public help center: file-based Markdown articles, routing, search, deep-links, and SEO for Phase 1.",
"scope": [
"Help-Center",
"Markdown-Files",
"Kategorien",
"Artikel",
"Suche",
"Deep-Links",
"SEO",
"Routen",
"Build-Index",
"FlexSearch",
"Postgres-FTS",
"Tenant",
"content/help"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,26 @@
{
"source_path": "/Users/raffaelsheikh/Documents/GitHub/HiveGrid-Cloud/_bmad-output/specs/M39-help-desk.md",
"type": "SPEC",
"confidence": "high",
"manifest_override": true,
"title": "Modul 39 — Help-Desk / Support",
"summary": "Technical specification for an in-app feedback widget and platform-admin support inbox, including data model, permissions, and API contracts.",
"scope": [
"Feedback",
"Feedback-Widget",
"Support-Mailbox",
"Plattform-Admin",
"Attachments",
"File-Infrastruktur",
"Activity-Log",
"Permissions",
"Rate-Limit",
"Audit-Trail"
],
"cross_refs": [
"brainstorming-session-2026-05-07-2206.md"
],
"locked": false,
"precedence": null,
"notes": ""
}
@@ -0,0 +1,326 @@
# HiveGrid Intel — Constraints (SPEC / INTEGRATION-CONTRACTS)
Extracted technical contracts: API-contracts, schema constraints, NFRs, protocols.
extracted: 2026-06-07
---
## C-01 — Postgres-RLS: Pflicht-Policies auf allen tenant-scoped Tabellen
type: schema
source: docs/ARCHITECTURE-DECISIONS.md (AD-1)
- RLS-Policy USING/WITH CHECK als Forward-Migration mit Inverse-SQL-Kommentar auf jeder tenant-scoped Tabelle
- App-DB-Rolle darf kein BYPASSRLS haben
- Request-Middleware MUSS `SET LOCAL app.tenant_id` setzen vor dem ersten Query
- Worker/Job muss Tenant-Context-Wrapper verwenden
- Ausnahmen (kein RLS): users, subscription_*, feature_flags, Branchen-Templates
- Cache-Präfix: `tenant:{id}:` (Redis); S3-Pfad: `tenants/{id}/` (Scaleway)
---
## C-02 — Keine polymorphe Entity/Row/RowValue-Engine
type: schema
source: docs/ARCHITECTURE-DECISIONS.md (AD-2)
- Das Boilerplate-CRM (`apps/web/app/modules/crm`, Entity+Row+RowValue) wird entfernt
- Alle Fachentitäten (CRM, Deals, Aufträge, Tasks) als dedizierte Prisma-Tabellen
- Custom-Felder ausschließlich über CustomFieldDefinition + CustomFieldValue (JSONB-Wert)
- Polymorphes RowValue darf nicht für neue Entitäten verwendet werden
---
## C-03 — AdminUser/AdminSession: vollständig getrennt von User/Session
type: schema
source: docs/ARCHITECTURE-DECISIONS.md (AD-3), docs/INTEGRATION-CONTRACTS.md
- AdminUser: eigene Tabelle mit passwordHash, totpSecret, status — KEIN FK auf User
- AdminSession: eigene Tabelle, server-side, IP-gebunden
- AdminRole/AdminPermission: eigenes RBAC-Schema
- Kein Generalschlüssel zwischen Plattform-Admin und Mandanten-Welt
- Magic-Link für Admin-Login verboten (AD-3)
- AdminAuditLog: AuditEvent mit tenantId=null (nicht eine neue Tabelle)
---
## C-04 — Session-Tabelle: Postgres als Source-of-Truth + Redis-Cache
type: protocol
source: docs/ARCHITECTURE-DECISIONS.md (AD-4)
- Session: server-side in Postgres; Felder: device_info (Browser/IP/Standort), last_activity_at
- Inaktivitäts-Timeout: 4 Stunden; Sliding-Window: 30 Tage
- Auto-Revoke aller Sessions bei: Passwort-Änderung, 2FA-Änderung, Email-Änderung
- Cookie enthält ausschließlich Session-ID-Referenz (kein JWT, kein Session-Payload im Cookie)
- Redis: schnelle Pro-Request-Validierung; NICHT alleinige Session-Source
---
## C-05 — Such-Engine: Meilisearch + pgvector + RRF
type: nfr
source: docs/ARCHITECTURE-DECISIONS.md (AD-5), _bmad-output/specs/M24-globale-suche.md
- Meilisearch (self-hosted): Keyword-Suche; BP-Paket @toolctrl/search weitgehend 1:1 übernommen
- pgvector: Semantische Suche; Embedding-Dimension 1024 (Scaleway EU-Endpoint)
- Fusion: RRF (Reciprocal Rank Fusion) kombiniert beide Ergebnislisten
- SearchIndexEntry muss tenant_id enthalten; Abfragen stets permission-aware (RLS + Permission-Filter)
- Outbox-Pattern für asynchrone Indexierung nach Mutations
---
## C-06 — Envelope-Encryption: Per-Tenant-DEK + Scaleway Key Manager
type: schema
source: docs/ARCHITECTURE-DECISIONS.md (AD-8), _bmad-output/specs/M14-hr-hub.md
- Pro Mandant ein Data-Encryption-Key (DEK), verschlüsselt via Scaleway Key Manager
- Verschlüsselte Felder: OAuth-Tokens (M09/M12/M25), Payslips (M14), Passwort-Safe-Einträge (M14), Admin-TOTP-Secrets (M37), KWP-ApiKey (M19)
- Algorithmus: AES-256-GCM
- Crypto-Shredding bei Tenant-Löschung: DEK löschen → alle verschlüsselten Felder des Tenants unlesbar
- Globaler Key (Boilerplate-Default) ist unzulässig für diese Felder
---
## C-07 — Realtime-Protokoll: WebSocket für Chat, SSE für Updates
type: protocol
source: docs/ARCHITECTURE-DECISIONS.md (AD-9)
- Team-Chat (M13): WebSocket-Rooms (bidirektional); Presence, Typing-Indicator, Read-Receipts
- Kanban-Updates (M03), Notifications (M22): SSE (server-sent, einseitig)
- hocuspocus: ausschließlich für CRDT-Kollaboration (Dokumente), nicht für Chat-Broadcast
- Redis-Pub/Sub für WebSocket Scale-Out
---
## C-08 — Paket-Naming: @toolctrl/* bleibt, @hivegrid/* nur für neue Querschnittsdienste
type: protocol
source: docs/ARCHITECTURE-DECISIONS.md (AD-10), docs/INTEGRATION-CONTRACTS.md
- @toolctrl/*: Boilerplate-Pakete, unveränderter Name (upstream-mergebar)
- packages/ui-app (nicht ui-hivegrid): HiveGrid-UI-Shell
- apps/web/app/application/sidebar/: Sidebar-Konfiguration (nicht sidebar.config.ts)
- packages/search/: Such-Index / indexedEntities (nicht packages/db/src/search/indexed-entities.ts)
- @hivegrid/*: nur neue, genuin HiveGrid-eigene Pakete (z.B. @hivegrid/activity, @hivegrid/audit, @hivegrid/notifications)
---
## C-09 — Integration-Contracts: Sidebar-Wiring Pflicht
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md
- Jeder neue Modul-Bereich MUSS in apps/web/app/application/sidebar/ registriert werden
- SidebarEntry-Felder: id (kebab-case, unique), group (6 feste Gruppen), label (i18n-Key), icon (lucide-react), route, permission, badge?, order, feature_flag?
- Funktion ohne Sidebar-Eintrag: nicht akzeptiert (kein anderer Einstiegspunkt ohne Begründung)
- 6 Gruppen: arbeiten | stammdaten | kommunikation | automation-ki | personal | einstellungen
---
## C-10 — Integration-Contracts: Route-Patterns
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md
Verbindliche URL-Schemata (Abweichungen erfordern Change-Request):
- Mandanten-App: app.hivegrid.de/{modul}/... (Tenant aus Session/Cookie, NICHT im Pfad-Segment)
- Mandant-Settings: app.hivegrid.de/settings/{modul}/...
- Plattform-Admin: admin.hivegrid.de/{bereich}/...
- Customer-Portal: app.hivegrid.de/portal/{tenant}/...
- Public-Forms: app.hivegrid.de/f/{tenant}/{slug}
- Public-Booking: app.hivegrid.de/b/{tenant}/{slug}
- Public-Help: app.hivegrid.de/help/{lang}/{kategorie}/{slug}
- Public-API: app.hivegrid.de/api/v1/{resource}
---
## C-11 — Integration-Contracts: Activity-Stream-API
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md
Pflicht-API für jede schreibende Aktion mit Entitäts-Bezug:
```
import { logActivity } from '@hivegrid/activity';
await logActivity({
tenantId, actorId, actorType: 'user' | 'auto' | 'sync' | 'system',
entityType, entityId,
type: 'contact.created' | 'deal.stage_changed' | ...,
payload: { ... },
});
```
Trennung: logActivity() ist NICHT der Audit-Eintrag (Audit = Prisma-Middleware separat)
---
## C-12 — Integration-Contracts: Notification-API
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md
Kein direkter Email/Push-Versand aus Modulen. Immer:
```
import { notify } from '@hivegrid/notifications';
await notify({
tenantId, recipientId,
category: 'lead.received' | 'deal.won' | ...,
template: 'lead-received',
payload: { ... },
priority: 'normal' | 'high' | 'urgent',
});
```
Service (M22) entscheidet Kanal, Bündelung, Ruhezeiten.
---
## C-13 — Integration-Contracts: Permission-Keys-Schema
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md
- Permission-Definitionen ausschließlich in packages/entitlements/src/permissions.ts
- Format: {modul}.{action} oder {modul}.{action}_{scope}
- Sidebar-Einträge, Routes, View-Models, Actions filtern alle gegen diese Keys
- Permission-Check: server-side (Pflicht) + client-side hide (zusätzlich, nie alleinig)
---
## C-14 — Integration-Contracts: Search-Index-Registration
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md (§8), docs/ARCHITECTURE-DECISIONS.md (AD-10)
- Neue suchbare Entität MUSS in packages/search/ (indexed-entities.ts) registriert werden
- Format: { table, searchable: string[], permission: string }
- Permission-aware-Search (M24) liest diese Map
---
## C-15 — Integration-Contracts: i18n-Key-Schema
type: api-contract
source: docs/INTEGRATION-CONTRACTS.md (§9)
- Locale-Files: packages/i18n/src/locales/de/{modul}.json
- Naming: {modul}.{bereich}.{key} (Pflicht-Format)
- ESLint-Rule blockt JSX-Text-Nodes ohne t()
- Build-Lint blockt Hard-Strings im Build
---
## C-16 — Integration-Contracts: View-Model-Pflicht pro Route
type: protocol
source: docs/INTEGRATION-CONTRACTS.md (§11)
- Jede Route in app/routes/** baut im Loader ein View-Model
- UI-Components in packages/ui-app/** empfangen NUR das VM + Action-Callbacks
- Kein direkter Store/DB-Zugriff in UI-Components
---
## C-17 — Integration-Contracts: Smoke-Test-Pflicht pro Route
type: nfr
source: docs/INTEGRATION-CONTRACTS.md (§12)
- Jede neue Route: Smoke-Test in e2e/smoke/{modul}.spec.ts
- Smoke-Tests laufen gegen packages/ui-mock
- Schlagen Smoke-Tests mit ui-mock fehl → Hot-Swap-Architektur verletzt
---
## C-18 — Audit-Hash-Kette: Tamper-Nachweis
type: schema
source: _bmad-output/specs/M21-audit-log.md
- AuditEntry.current_hash = SHA256(previous_hash + payload)
- Append-only-Constraint auf Tabelle (kein UPDATE/DELETE erlaubt)
- AuditEntry mit tenantId=null = plattformweiter Eintrag (auch für AdminAuditLog)
---
## C-19 — KWP-Datenbank-Credentials: NICHT in Cloud gespeichert
type: schema
source: _bmad-output/specs/M19-kwp-integration.md
- KwpSettings.kwp_db_host, kwp_db_port, kwp_db_name: lokal vom kwpsync.exe verwaltet
- Diese Felder werden aus DSGVO-Gründen NICHT in der HiveGrid Cloud gespeichert
- Nur KwpApiKey (Token für Cloud-Auth) wird verschlüsselt in Cloud gespeichert (AD-8)
---
## C-20 — EU-Stack: LLM-Provider ausschließlich EU-ansässig
type: nfr
source: docs/ARCHITECTURE-DECISIONS.md (Scope-Items LP-13), _bmad-output/specs/M18-ki-layer.md
- KI-Anfragen nur an EU-Provider: Scaleway, Mistral, AlephAlpha
- OpenAI/Anthropic/US-Provider verboten (LP-13)
- Embedding-Dimension: 1024 (Scaleway EU-Endpoint)
- Promptfoo für Sicherheits-Testing der KI-Ausgaben
---
## C-21 — BullMQ: asynchrone Queue für Versand und Jobs
type: protocol
source: _bmad-output/specs/M10-email-marketing.md, _bmad-output/specs/M22-notifications.md, _bmad-output/specs/M35-dsgvo-export.md
- Email-Marketing-Versand: BullMQ-Queue (async, Rate-Limit konfigurierbar)
- Notification-Versand: BullMQ-Pipeline oder Novu-Middleware
- DSGVO-Export-Jobs: BullMQ-Worker (async ZIP-Generierung)
- Redis als BullMQ-Backend
---
## C-22 — API-Keys: SHA-256-Hash gespeichert, Key nur einmalig angezeigt
type: schema
source: _bmad-output/specs/M27-auth-multi-tenancy.md, _bmad-output/specs/M34-public-api.md
- ApiKey.key_hash = SHA-256 des Klartext-Keys
- Klartext-Key nur bei Erstellung angezeigt, danach nicht mehr abrufbar
- Public-API Rate-Limit: 1000 Req/Min Default (Redis-backed)
- Outgoing-Webhooks: Signatur via HMAC-SHA256 im X-HiveGrid-Signature-Header
---
## C-23 — Offline-Sync: KWP-gewinnt Conflict-Resolution
type: protocol
source: docs/ARCHITECTURE-DECISIONS.md (AD-17), _bmad-output/specs/M36-mobile-app.md
- Mobile-Offline: OfflineSyncQueue mit entity_type, operation, payload, conflict_resolution
- Conflict-Resolution-Regel: "KWP gewinnt" bei KWP-Sync-Konflikten
- HiveGrid-interne Konflikte: Last-Write-Wins
- Offline-Indikatoren: Klartext-Hinweis in App (kein stilles Versagen)
---
## C-24 — Customer-Portal: Default-Sichtbarkeit NICHT sichtbar
type: protocol
source: docs/ARCHITECTURE-DECISIONS.md (AD-18), docs/INTEGRATION-CONTRACTS.md (§14)
- Neue Funktionen für Customer-Portal sind standardmäßig NICHT sichtbar
- Explizite Freigabe durch Tenant-Admin erforderlich (CustomerPortalProjectDocument, PortalConfiguration)
- Registrierung in packages/ui-app/src/customer-portal/portal-shell.config.ts
---
## C-25 — Node-Version-Constraint
type: nfr
source: memory/project_node_version_toolchain.md
- Development + Test: Node 22.12.x (nicht 20.x)
- Runtime (Produktiv): node:20
- .nvmrc auf 22.12.x gesetzt
- Begründung: undici/Prisma/localstorage-Kompatibilität
+144
View File
@@ -0,0 +1,144 @@
# HiveGrid Intel — Context Notes
Supporting notes from DOC-type sources and cross-cutting SPEC metadata.
extracted: 2026-06-07
---
## Topic: Projekt-Überblick und Ziel
source: docs/ARCHITECTURE-DECISIONS.md
HiveGrid 2.0 ist eine SaaS-Plattform für SHK-Handwerksbetriebe (Sanitär, Heizung, Klima). Erstkunde: Geerkens GmbH. Das Produkt löst ab: HubSpot (CRM + Sales-Pipeline), Quiply (Team-Chat), Zapier/n8n (Automation), sowie mehrere Excel-Prozesse.
Die Codebase ist ein Git-Downstream der ToolCTRL-Boilerplate (upstream-Remote bleibt erhalten). Boilerplate deckt ~35–45 % der Anforderungen ab (Fundament high, Fachdomäne greenfield).
USP-Säulen (Day-1-Launch): Automation-Engine (visuell, KI-gestützt) + KI-Layer (EU-only) + KWP-Integration (Kern-ERP Geerkens).
---
## Topic: Phase-0-Pflichten (vor Fachmodul-Bau)
source: docs/ARCHITECTURE-DECISIONS.md
Die folgenden Voraussetzungen sind vor dem ersten Fachmodul-Bau abzuarbeiten:
1. Boilerplate einziehen (Repo ist aktuell Docs-only, keine echte Codebase)
2. Naming-Drift in Docs beheben (AD-10)
3. EU-Sterilisation: GitHub/Google-OAuth-Reste entfernen
4. M00 aktivieren + 4 Querschnitts-Neubauten (logActivity, Search-Registry, Subframe-Adapter, Mass-Action-Schutz)
5. Fehlende Dependencies eintragen (PLAN.md teils falsch)
---
## Topic: Delivery-Sequenzierung (AD-11)
source: docs/ARCHITECTURE-DECISIONS.md
Reihenfolge:
1. Phase 0 (Voraussetzungen, oben)
2. Fundament-Kern: M27 (Auth) → M33a (Apps-Engine) → M01 (CRM-Datenmodell)
3. Geerkens-Kernpfad: M02 (Lead-Inbox) → M03 (Sales) → M04 (Auftrag) → M19 (KWP)
4. Breite: HR-Hub (M14), Customer-Portal (M15), Marketing (M10), Mobile (M36), Billing-Feinheiten (M28)
Go-Live: Big-Bang (AD-19) — kein phasiertes Produktiv-Schalten. Gegenmaßnahme: Noah/Geerkens-Validierung per PROGRESS-TRACKER-Klick-Pfad.
---
## Topic: SHK-Branchen-Kontext
source: _bmad-output/specs/M01-crm-kern.md, M03-sales-pipeline.md, M04-auftragspipeline.md
Geerkens ist SHK-Betrieb (Heizungsanlagen, Wartung, Reparatur). Typische Entitäten:
- Kunden (B2C + B2B) mit Anlagen-Zustand (Custom-Felder)
- Vertriebsfälle: Anlagen-Verkauf (mehrstufig), Wartungsverträge (kürzer), Reparatur-Aufträge (direkt zu M4)
- KWP: Windows-basiertes ERP mit MSSQL; HiveGrid synchronisiert bidirektional
- Monteure: arbeiten auf Baustellen, brauchen Offline-Zugriff (AD-17)
- Noah = Geerkens-Kontakt für Validierung der SHK-Defaults
SHK-Seeds (beim Tenant-Anlegen): 6 Standard-Rollen, 2 Sales-Pipelines, Custom-Felder für Heizungsanlagen, Projekt-Pipelines, Automation-Templates, Onboarding-Branchen-Zweig.
---
## Topic: Boilerplate-Reuse-Struktur
source: docs/ARCHITECTURE-DECISIONS.md (AD-10), docs/INTEGRATION-CONTRACTS.md
Boilerplate-Pakete (unveränderter Name, upstream-mergebar):
- packages/ui-app (UI-Shell)
- packages/ui-subframe (Subframe-Adapter)
- packages/ui-mock (Mock-UI für Hot-Swap-Tests)
- @toolctrl/search (Meilisearch-Paket)
- @toolctrl/foundation (Basis-Utilities)
Neue HiveGrid-Querschnittsdienste (zu bauen, @hivegrid/*-Namespace):
- @hivegrid/activity (logActivity-Service + zentrale Activity-Tabelle)
- @hivegrid/audit (auditEvent-Service)
- @hivegrid/notifications (notify-Service)
- packages/entitlements (Permission-Keys-Registry)
- packages/search (indexed-entities.ts für suchbare Entitäten)
- packages/i18n (Locale-Files)
---
## Topic: KWP-Recut-Entscheidung
source: docs/ARCHITECTURE-DECISIONS.md (KWP-Abschnitt), memory/project_kwp_api_anbindung.md
KWP bietet inzwischen eine offizielle API an. Das hat Konsequenzen:
- M089 (Windows-Sync-Programm kwpsync.exe) entfällt
- M090/M091/M092/M094/M095 vereinfachen sich erheblich
- M093 (Schema-Drift-Sentinel) bleibt relevant
- KWP wird als DataConnection type='rest-api' (statt 'windows_client') in M33a geführt
M089–M095 müssen VOR Umsetzung neu geschnitten werden. Die aktuelle M19-Spec beschreibt noch die Windows-Client-Variante.
---
## Topic: Spec-Stil-Vorgabe
source: memory/feedback_spec_style_no_ui.md
Alle Specs verwenden "requirements-pur"-Stil:
- UI-Elemente als Liste beschrieben (benötigte Komponenten), keine ASCII-Layouts
- Designer hat freie Hand für konkrete Anordnung/Layout
- Spezifiziert: was angezeigt werden muss + welche Operationen, NICHT wie es aussieht
---
## Topic: Offene Entscheidungen (noch nicht getroffen)
source: docs/ARCHITECTURE-DECISIONS.md (AD-6, AD-7)
AD-6 — EU-Email-Provider (Backlog):
- Tendenz Mailjet (EU/FR)
- MailerSend (BP-Default) vertretbar aber US-Entität (LP-13-Risiko)
- Alternativen: Brevo, Scaleway TEM
- Betrifft: M09, M10, M22
AD-7 — Captcha/Bot-Schutz (Backlog):
- Tendenz Friendly Captcha (DE) oder self-hosted mCaptcha
- Turnstile (BP) und hCaptcha sind US-Firmen
- Betrifft: Login, Public-Forms (M05), Booking (M06)
---
## Topic: Spec-Status
source: alle _bmad-output/specs/M*.md
Alle 36 Modul-Specs haben status: detail-spec-draft. Vor Bau jedes Moduls:
- Verifizierung mit Noah (Geerkens-Repräsentant)
- Konkrete Index-Definitionen + Migrations-SQL ergänzen
- SHK-Default-Werte finalisieren
- Subframe-UI-Designs (separat, nicht in Spec)
---
## Topic: Cross-Ref-Graph (Zusammenfassung)
source: alle .json Klassifizierungs-Dateien
Keine Zyklen im 38-Dokument-Graph (Cycle Detection: DFS three-color marking — alle Refs einseitig). Externe Refs auf nicht-klassifizierte Dokumente (AGENTS.md, brainstorming-session-2026-05-07-2206.md, Milestone-PLAN-Dateien, M11-whatsapp.md) — diese sind nicht im Ingest-Set, stellen aber keine Zyklen dar.
M13 referenziert M11-whatsapp.md (nicht im Set — Phase 2 Modul, nicht klassifiziert). Kein Blocker.
M18-ki-layer.md referenziert M11-whatsapp.md (nicht im Set). Kein Blocker.
+244
View File
@@ -0,0 +1,244 @@
# HiveGrid Intel — Architecture Decisions (ADR Extraction)
source: docs/ARCHITECTURE-DECISIONS.md
locked: true (AD-1 through AD-5, AD-8 through AD-19 are Accepted/binding; AD-6 and AD-7 are 🅿️ Backlog — NOT locked)
extracted: 2026-06-07
---
## AD-1 — Mandanten-Trennung: echtes Postgres-RLS
status: Accepted (locked)
scope: tenant isolation, alle tenant-scoped Module
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Row-Level-Security in Postgres als bauliche Vorgabe (nicht nur App-Level-Scoping).
- RLS-Policies (USING/WITH CHECK) als Forward-Migration mit Inverse-SQL-Kommentar
- Request-Middleware setzt `SET LOCAL app.tenant_id`
- App-DB-Rolle ohne `BYPASSRLS`
- Worker-/Job-Tenant-Context-Wrapper
- Cache-Präfix `tenant:{id}:`, S3-Pfad `tenants/{id}/`
- Ausnahmen ohne RLS: `users`, `subscription_*`, `feature_flags`, Branchen-Templates
Betrifft: M019 + jedes tenant-scoped Modul (M01–M39 außer Plattform-Admin-Tabellen)
---
## AD-2 — Daten-Modell: typisierte Tabellen, Entity-Builder raus
status: Accepted (locked)
scope: CRM-Datenmodell, Fachentitäten
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: HiveGrid-Fachentitäten (CRM, Deals, Aufträge, Tasks, …) als dedizierte, typisierte First-Class-Prisma-Tabellen. Das Entity-Builder-CRM der Boilerplate (`Entity`+`Row`+`RowValue`, `apps/web/app/modules/crm`) wird entfernt, nicht angepasst. Custom-Felder über purpose-built `CustomFieldDefinition` + `CustomFieldValue` (JSONB-Wert), nicht über die polymorphe Row-Engine.
Betrifft: M01, M02, M03, M04, M26 + alle Fachmodule
---
## AD-3 — Plattform-Admin-Identität: getrennt, Email+PW+TOTP, optional Authentik-SSO
status: Accepted (locked)
scope: AdminUser, AdminSession, admin.hivegrid.de
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Vollständig getrennte Admin-Welt — eigene `AdminUser`-Tabelle (eigenes `passwordHash`/`totpSecret`/`status`), eigene `AdminSession` (server-side, IP-gebunden), eigene `AdminRole`/`AdminPermission`-RBAC. Primärer Login: Email + Passwort + TOTP (Magic-Link verboten). Zusätzlich optionaler Authentik-OIDC/SSO-Login, gemappt auf dieselbe getrennte Admin-Identität. Kein Generalschlüssel zwischen Plattform und Mandanten.
- `AdminAuditLog` nutzt vorhandenen `AuditEvent` (Hash-Kette, `tenantId=null` = plattformweit)
Betrifft: M034–M041 (M37)
---
## AD-4 — Sessions: Postgres als Source-of-Truth + Redis-Cache
status: Accepted (locked)
scope: Session-Management, alle Auth-Flows
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Server-side Session-Tabelle in Postgres (Geräte-Liste mit Browser/IP/Standort/letzter Aktivität, Revoke, „von allen Geräten abmelden", 4h-Inaktivität, 30-Tage-Sliding-Window, Auto-Logout bei Passwort-/2FA-/Email-Änderung) als Quelle der Wahrheit; Redis-Cache für schnelle Pro-Request-Validierung. Cookie hält nur die Session-ID-Referenz.
Betrifft: M021 (Mandanten-User), M034 (AdminSession), M141/M15 (Customer-Portal)
---
## AD-5 — Such-Engine: Meilisearch (self-hosted) + pgvector-Hybrid
status: Accepted (locked)
scope: Globale Suche, Search-Infrastruktur
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Keyword-Suche über selbst gehostetes Meilisearch (BP-`@toolctrl/search` weitgehend 1:1), semantische Suche über pgvector + EU-Embeddings (Scaleway 1024-dim, BP 1:1), kombiniert via RRF-Fusion. Embedding-Pipeline + Outbox + Indexer-Worker aus der BP übernehmen.
Hinweis: Weicht bewusst von M056 "Postgres-FTS, kein Extra-Service" ab → Change-Request gegen M056 nötig.
Betrifft: M24 / M056–M058
---
## AD-6 — EU-Email-Provider
status: BACKLOG — NICHT LOCKED (🅿️ Entscheidung später)
scope: Transaktions- und Marketing-Email
source: docs/ARCHITECTURE-DECISIONS.md
Tendenz: Mailjet (EU/FR). MailerSend (BP-Default) ist vertretbar (EU ISO 27001 + GDPR-DPA), Caveat: US-Entität. Alternativen: Mailjet/Brevo, Scaleway TEM.
Betrifft: M09, M10, M22
---
## AD-7 — Captcha / Bot-Schutz
status: BACKLOG — NICHT LOCKED (🅿️ Entscheidung später)
scope: Login, Public-Forms, Booking
source: docs/ARCHITECTURE-DECISIONS.md
Tendenz: EU — Friendly Captcha (DE) oder self-hosted mCaptcha. Turnstile (BP) und hCaptcha (Spec) sind beide US-Firmen.
Betrifft: Login (M020), Public-Forms (M05/M125), Booking (M06)
---
## AD-8 — Verschlüsselung: Per-Tenant-DEK + Envelope
status: Accepted (locked)
scope: Verschlüsselung, HR-Passwort-Safe, OAuth-Tokens, DSGVO-Löschung
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Pro Mandant ein Data-Encryption-Key (DEK), verschlüsselt mit einem Master-Key (Scaleway Key Manager) — Envelope-Encryption. Crypto-Shredding bei Mandanten-Löschung (Tenant-Key wegwerfen → alle verschlüsselten Daten unlesbar).
Betrifft: M14/M134 (HR-Passwort-Safe), OAuth-Tokens (M09/M25/M12), M35/M165 (DSGVO-Löschung)
---
## AD-9 — Realtime: WebSocket für Chat + SSE für Read-Updates
status: Accepted (locked)
scope: Realtime-Infrastruktur, Team-Chat, Kanban, Notifications
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Generischer WebSocket-Room-Layer für bidirektionale Echtzeit (Team-Chat M13: Rooms, Presence, Typing, Read-Receipts). SSE bleibt für einseitige Live-Updates (Kanban M03, Notifications M22). `hocuspocus` bleibt CRDT-only (Kollab-Dokumente).
Betrifft: M13 (bidirektional WebSocket); SSE-Pfad: M03, M22
---
## AD-10 — Naming-Konvention: `@toolctrl/*` behalten, Docs anpassen
status: Accepted (locked)
scope: Paket-Naming, Mono-Repo-Struktur, alle Module
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Boilerplate-Pakete behalten ihre Namen (`@toolctrl/*`, `packages/ui-app`) — kein flächiger Rename zu `@hivegrid/*`/`ui-hivegrid`.
- `@toolctrl/*` + `ui-app`/`ui-subframe`/`ui-mock` = geteilte Boilerplate-Pakete (mergebar mit upstream)
- `@hivegrid/*` = nur für genuin neue HiveGrid-Pakete (z.B. Activity-Paket, Domänen-Pakete)
- Docs: wo "ui-hivegrid"/"@hivegrid/foundation"/"sidebar.config.ts" steht, ist `ui-app`/`@toolctrl/foundation`/`apps/web/app/application/sidebar/` gemeint
Betrifft: Querschnitt (alle Module), Phase 0
---
## AD-11 — Bau-Strategie: Hybrid (Fundament-Kern, dann Geerkens-Kernpfad)
status: Accepted (locked)
scope: Delivery-Sequenzierung
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Nach Phase 0 zuerst Fundament-Kern (M27 Auth + M33a Apps-Engine + M01 CRM-Datenmodell), dann sofort Geerkens-Wertschöpfungskette Lead → Sales → Auftrag → KWP, danach Breite (HR, Portal, Marketing, Mobile, Billing).
---
## AD-12 — SHK-Domänen-Defaults: aus Spec als Seed, Noah validiert
status: Accepted (locked)
scope: SHK-Branchen-Templates, Seeding
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: SHK-Inhalte (6 Standard-Rollen + Permission-Bundles, SHK-Sales-Pipeline-Stufen, Standard-Custom-Felder + Tags, Provisionierungs-Daten) werden als deklaratives, leicht änderbares Seed umgesetzt. Noah/Geerkens validieren iterativ. Blockiert den Bau nicht.
---
## AD-13 — Go-Live-Scope: breiter Launch
status: Accepted (locked)
scope: Delivery-Scope
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Erster Geerkens-Go-Live umfasst nicht nur die Vertriebskette, sondern auch HR-Hub, Customer-Portal, Marketing und Mobile. Scope ≈ Großteil der 35 Module. Sequenzierung trotzdem nach AD-11.
---
## AD-14 — Migration: sauberer Start + KWP-Sync füllt nach
status: Accepted (locked)
scope: Datenmigration, KWP-Sync
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Geerkens startet weitgehend leer; KWP-Sync bringt Auftrags-/Stammdaten automatisch. HubSpot/Quiply-Altdaten bleiben extern als Read-only-Archiv; nur punktuelle CSV-Importe. Keine vollen Migrations-Pipelines pro Quelle zum Launch.
---
## AD-15 — Pricing/Billing: Engine bauen, Preise geparkt
status: Accepted (locked)
scope: Stripe, Billing-Engine, Pricing
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Stripe-Integration + Seat-/Plan-Engine + Verbrauchs-Metering werden technisch gebaut, die konkreten Preis-Stufen bleiben geparkt. Geerkens läuft auf manueller Sonderkondition/Trial. Self-Service-Checkout-Preise = eigene spätere Pricing-Runde.
---
## AD-16 — USP-Säulen (Automation + KI): volle Tiefe zum Launch
status: Accepted (locked)
scope: Automation-Engine M17, KI-Layer M18
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Kompletter visueller Automation-Editor (alle Trigger/Aktionen, 24h-Undo, Guards) und voller KI-Layer (EU-Provider, RAG, Sprach-zu-Automation, Pay-as-you-go) sind day-1 dabei — nicht nur Fundament.
---
## AD-17 — Mobile-Offline: voller Offline-Betrieb
status: Accepted (locked)
scope: Mobile-App M36, Offline-Sync
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Monteur kann auf der Baustelle offline Aufträge bearbeiten, Abnahmen erfassen, Plantafel sehen; alles wird gequeued + bei Sync mit „KWP gewinnt" aufgelöst.
---
## AD-18 — Customer-Portal: voll inkl. Skalierungs-Sicht
status: Accepted (locked)
scope: Customer-Portal M15
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Komplettes Portal day-1: Projekt-Sicht + Upload + Reklamation + Subunternehmer-Zugang + Skalierungs-Sicht (Service-Inbox + Routing + Pro-Kunden-Lebensdauer).
---
## AD-19 — Go-Live-Modus: Big-Bang
status: Accepted (locked)
scope: Go-Live-Strategie
source: docs/ARCHITECTURE-DECISIONS.md
Entscheidung: Geerkens geht erst live, wenn das vollständige Phase-1-Produkt steht — ein großer Launch, kein phasiertes Produktiv-Go-Live. Interne Bau-Reihenfolge bleibt AD-11.
Bewusst akzeptiert: längste Zeit bis zum ersten echten Nutzer-Feedback, höchstes Risiko. Gegenmaßnahme: Noah/Geerkens-Validierung pro Modul über PROGRESS-TRACKER-Klick-Pfad als Feedback-Ersatz.
---
## Phase-0-Pflichten (Voraussetzungen, keine ADR-Entscheidungen)
source: docs/ARCHITECTURE-DECISIONS.md
1. Boilerplate als Code-Basis einziehen (Repo ist heute Docs-only)
2. Naming-Drift beheben: `@toolctrl/*` → Docs anpassen, Sidebar-Konvention korrigieren
3. EU-Sterilisation: GitHub/Google-OAuth-Reste + `User.githubId/googleId` entfernen
4. M00 aktivieren + 4 echte Neubauten: `logActivity()`/Activity-Stream, Search-Registry, Subframe-Adapter-Code, Mass-Action-Schutz
5. Fehlende Dependencies ergänzen: `signature_pad`, `browser-image-compression`, `react-grid-layout`, `@dnd-kit`, `libphonenumber`, `ics`/`ical-generator`, `btree_gist`/`EXCLUDE`-Constraint u.a.
## KWP-API-Entscheidung (separater Strang)
source: docs/ARCHITECTURE-DECISIONS.md
KWP bekommt eine offizielle API-Anbindung → M089 (Windows-Sync-Programm) entfällt, M090/M091/M092/M094/M095 vereinfachen sich, M093 bleibt. KWP als `DataConnection type='rest-api'` ins Apps-Engine-Muster (M33a). M089–M095 vor Umsetzung neu schneiden.
File diff suppressed because it is too large. Load diff