Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -158,3 +158,29 @@ Manual verification for a future runtime extraction should cover:
- CRM entities are generic rows/entities templates, so deleting only route/module code can leave orphaned templates or data.
- Translation, command, and route-helper leftovers can keep CRM visible or navigable after the module is removed.
- Existing tenants may rely on CRM rows and relationships; plugin extraction should include compatibility and migration notes rather than silent data loss.
## Update (R-P6 typed CRM)
This boilerplate report classified CRM as an optional `extract-plugin` vertical and asked to preserve the entity-builder CRM surfaces until a dedicated implementation slice. HiveGrid ticket R-P6 (2026-06-29) is that slice and takes a different product direction (AD-2 "Entity-Builder raus", AD-20 project-centric pivot — pivot precedence per AGENTS.md): CRM is a typed first-class core, not a plugin candidate.
What R-P6 changed relative to this report:
- The entity-builder CRM route trees were deleted: `apps/web/app/routes/admin/crm.tsx`, `apps/web/app/routes/admin/crm/*`, `apps/web/app/routes/app.$tenant/crm.tsx`, `apps/web/app/routes/app.$tenant/crm/*`. The typed CRM now lives under `apps/web/app/routes/app.$tenant/contacts.*` with services in `apps/web/app/utils/integrations/crm/*` and view-models in `packages/view-models/src/crm/*`, backed by `prisma/schema/crm.prisma`.
- `apps/web/app/modules/crm` is retained as a LEGACY surface: only the entity-builder contact-row readers (`getContact`, `getContactsInRowIds`, `ContactDto`) still consumed by Email Marketing (AK-P14) remain. Full removal is deferred to the Email Marketing typed-Kontakt migration (follow-up ticket) — exactly the coupling this report flagged as a human-review note.
- The decision token remains `extract-plugin` for the residual legacy surface; the strategic target for the typed CRM core is "retain as core", not extraction. The route-existence checks in `scripts/verify-crm-decision-report.mjs` were updated accordingly.
## Update (R-P14C)
HiveGrid ticket R-P14C (2026-06-30) executes the Email Marketing typed-Kontakt
migration the R-P6 section above flagged as a follow-up. Under **Variante A** the
legacy Entity-Builder campaign editor is removed rather than migrated:
- `apps/web/app/modules/emailMarketing/services/EmailMarketingService.ts` (the
`CrmService.getContact`/`getContactsInRowIds`/`ContactDto` consumer this report
tracked) was deleted; its only typed survivor (the overview summary) now reads
the typed `OutboundEmail` counters directly. The file-existence assertion for
it was dropped from `scripts/verify-crm-decision-report.mjs`; the historical
coupling reference is retained above.
- The residual `apps/web/app/modules/crm` legacy reader is removed in the same
ticket once the last consumer is gone (see the Email Marketing decision report
update for the full removal record).
@@ -184,3 +184,23 @@ Manual verification for a future runtime extraction should cover:
- Removing CRM contacts before an audience decision can leave campaigns without recipients and variable replacement without data.
- Translation, command, sidebar, and route-helper leftovers can keep a removed plugin visible or navigable.
- Existing tenants may rely on campaign history, unsubscribes, and sender configuration; plugin extraction should include compatibility, export, or migration notes rather than silent data loss.
## Update (R-P14C)
HiveGrid ticket R-P14C (2026-06-30) removes the legacy Entity-Builder campaign
path under **Variante A** (remove, do not migrate — the bespoke campaign editor
is rebuilt by David/D-KAMP). The typed send engine (CampaignSendService) and
typed recipient segments (AK-P14b) already cover sending, so no functionality is
lost beyond the old UI shell:
- `apps/web/app/modules/emailMarketing/services/EmailMarketingService.ts` deleted
(the `CrmService`/`ContactDto`/contact-views consumer). The Campaigns
list/new/edit routes, components, and the `OutboundEmail.contactRowId` column
rendering were removed; the typed activity log keeps opens/clicks/delivery.
- The `OutboundEmail.contactRowId` / `Row` relation is dropped from
`prisma/schema/email.prisma`; the typed `kontaktId` field is the recipient link.
- `apps/web/app/modules/crm` legacy reader is removed once its last consumer is
gone. The file-existence + manifest-code-area assertions for
`EmailMarketingService.ts` were dropped from
`scripts/verify-email-marketing-decision-report.mjs`; the historical coupling
references (`CrmService`, `ContactDto`, `OutboundEmail.contactRowId`) are kept.
@@ -36,7 +36,7 @@ Concrete surfaces that later work must audit before changing runtime behavior:
- Widgets package DB helper: `packages/db/src/widgets.server.ts`.
- Workflow schema: `prisma/schema/workflows.prisma`.
- Workflow Engine module: `apps/web/app/modules/workflowEngine`.
- Workflow admin routes: `apps/web/app/routes/admin/__workflows/*`.
- Workflow admin routes were removed; Workflow Engine remains tenant-scoped via `apps/web/app/routes/app.$tenant/__workflows/*`.
- Workflow tenant routes: `apps/web/app/routes/app.$tenant/__workflows/*`.
- Workflow API routes: `apps/web/app/routes/internal/api/__workflows/*`.
- Blog, changelog, and brand route surfaces were removed during pruning and remain historical evidence only.
@@ -63,7 +63,7 @@ Widgets include a public/API boundary because embedded widget IDs and API reads
Workflow Engine is classified by D009 as `extract-plugin`. It is a powerful automation surface, but its dependency, schema, API, and possible worker/queue behavior make it too complex and product-specific for the minimal boilerplate core.
Later extraction must audit `apps/web/app/modules/workflowEngine`, `apps/web/app/routes/admin/__workflows/*`, `apps/web/app/routes/app.$tenant/__workflows/*`, `apps/web/app/routes/internal/api/__workflows/*`, and `prisma/schema/workflows.prisma` together. Workflow route ownership spans admin, tenant app, and API surfaces, so partial extraction would leave broken automation entry points or orphaned schema.
Later extraction must audit `apps/web/app/modules/workflowEngine`, `apps/web/app/routes/app.$tenant/__workflows/*`, `apps/web/app/routes/internal/api/__workflows/*`, and `prisma/schema/workflows.prisma` together. Workflow route ownership spans tenant app and API surfaces, so partial extraction would leave broken automation entry points or orphaned schema.
Workflow execution now has an explicit worker/outbox boundary in the current codebase: workflow event producers publish through the outbox, the `worker-general` group can route `outbox.workflow`, and the worker-native trigger runner owns idempotent execution startup. Later extraction must preserve or replace that boundary and define whether workflow definitions, runs, triggers, logs, retries, external event subscriptions, and package dependencies move into a worker-backed plugin, remain disabled unless the plugin is installed, or are removed only after data retention and audit requirements are satisfied.
@@ -4,7 +4,7 @@
Decision: `extract-plugin`
Portals/Sites are classified by D007 as an optional plugin candidate, not as Boilerplate Core and not as an immediate removal target. This report is the canonical Portals/Sites lifecycle source for Feature Decision/S03 and carries forward the D006 deferral that kept Portals/Sites persistence in module-owned DB files until the Feature Decision feature decision was made. The current code surfaces are retained as plugin-candidate inventory, while default core route registration disables the portal/site route trees. Later implementation work must preserve or explicitly remove the retained schema, Stripe billing, analytics, domains, sidebar, docs, environment, and verification boundaries atomically.
Portals/Sites are classified by D007 as an optional plugin candidate, not as Boilerplate Core and not as an immediate removal target. This report is the canonical Portals/Sites lifecycle source for Feature Decision/S03 and carries forward the D006 deferral that kept Portals/Sites persistence in module-owned DB files until the Feature Decision feature decision was made. The current code surfaces are retained as plugin-candidate inventory, while default core route registration disables the portal/site route trees. Later implementation work must preserve or explicitly remove the retained schema, billing provider, analytics, domains, sidebar, docs, environment, and verification boundaries atomically.
No runtime code is changed in this slice. This slice only records the decision report and prepares the later static verifier/execution plan so downstream agents do not blindly alter retained Portals/Sites surfaces or mistake disabled plugin routes for active core routes.
@@ -19,30 +19,30 @@ The canonical inventory and manifest references are `docs/feature-inventory.md`
Concrete Portals/Sites surfaces that later work must audit before any runtime change. Route paths listed here are retained plugin-candidate code surfaces, not active default core route registrations:
- Modules: `apps/web/app/modules/portals` and `apps/web/app/modules/sites`.
- Admin route: `apps/web/app/routes/admin/portals.tsx`.
- Admin route: removed from the default HiveGrid admin surface; tenant portal routes remain inventoried as plugin-candidate code.
- Tenant portal routes: `apps/web/app/routes/app.$tenant/__portals/*`.
- Tenant site routes: `apps/web/app/routes/app.$tenant/sites/*`.
- Portal Stripe services: `apps/web/app/modules/portals/services/PortalStripe.server.ts` and `apps/web/app/modules/portals/services/StripeConnect.server.ts`.
- Portal billing provider services: `apps/web/app/modules/portals/services/PortalPayment provider.server.ts` and `apps/web/app/modules/portals/services/Payment providerConnect.server.ts`.
- Module-owned persistence: `apps/web/app/modules/portals/db/portals.db.server.ts` and `apps/web/app/modules/sites/db/sites.db.server.ts`.
- Site configuration types: `apps/web/app/modules/sites/site-types.ts`.
- Analytics coupling: `apps/web/app/routes/admin/analytics/page-views.tsx` and `prisma/schema/analytics.prisma`.
- Analytics coupling: `prisma/schema/analytics.prisma` powers portal analytics; the old admin analytics route was removed from the core admin surface.
- Domains coupling: `apps/web/app/modules/domains/services/Domains.server.ts`.
- Sidebar coverage: `apps/web/app/application/sidebar/AppSidebar.test.tsx`.
- Prisma schema surfaces: `prisma/schema/portals.prisma` and `prisma/schema/sites.prisma`.
- Environment documentation: `.env.example`, `.env.production.example`, and `.env.fly.example`.
- Environment documentation: `.env.example` and `.env.production.example`.
- Documentation and manifest contracts: `docs/feature-inventory.md` and `docs/feature-manifests/plugin-candidates.json`.
## Couplings
Portals/Sites are coupled to tenant navigation, admin management, analytics reporting, domain resolution, Stripe billing flows, Prisma schema, and environment configuration. The retained route code spans both hidden portal paths under `apps/web/app/routes/app.$tenant/__portals/*` and visible site-builder paths under `apps/web/app/routes/app.$tenant/sites/*`, while default core route discovery excludes those plugin trees. Extraction must preserve route ownership and user-visible navigation behavior if the plugin is enabled, or remove the retained surfaces atomically.
Portals/Sites are coupled to tenant navigation, admin management, analytics reporting, domain resolution, billing provider flows, Prisma schema, and environment configuration. The retained route code spans both hidden portal paths under `apps/web/app/routes/app.$tenant/__portals/*` and visible site-builder paths under `apps/web/app/routes/app.$tenant/sites/*`, while default core route discovery excludes those plugin trees. Extraction must preserve route ownership and user-visible navigation behavior if the plugin is enabled, or remove the retained surfaces atomically.
Analytics portal filters and site page-view behavior must be explicitly preserved, redesigned, or removed during later implementation. Domains behavior in `apps/web/app/modules/domains/services/Domains.server.ts` must also be treated as part of the feature boundary because public site routing and domain lookup can become broken if the module is moved without corresponding domain configuration.
## Stripe Billing and Provider Boundary
## Billing Provider Boundary
Portals/Sites include Stripe-specific behavior through `apps/web/app/modules/portals/services/PortalStripe.server.ts` and `apps/web/app/modules/portals/services/StripeConnect.server.ts`. Later implementation must preserve or explicitly decide Stripe Connect behavior, customer billing portal behavior, provider initialization, webhook expectations, environment variables, and failure handling before moving or removing any portal billing route.
Portals/Sites include billing-provider behavior through the portal pricing and subscription persistence boundary. Later implementation must preserve or explicitly decide provider checkout behavior, customer billing portal behavior, provider initialization, webhook expectations, environment variables, and failure handling before moving or removing any portal billing route.
This report keeps Billing/Subscriptions Core separate from the Portals/Sites plugin candidate. Core Stripe subscription flows may remain in the boilerplate, while portal-specific Stripe Connect and customer portal behavior must be isolated behind a plugin/provider boundary if Portals/Sites are extracted.
This report keeps Billing/Subscriptions Core separate from the Portals/Sites plugin candidate. Core subscription flows remain in HiveGrid, while portal-specific payment-connect and customer portal behavior must be isolated behind a plugin/provider boundary if Portals/Sites are extracted.
## Schema and Data Impact
@@ -59,10 +59,10 @@ Docs and command/playbook surfaces must point executors to this report before ru
## Execution Plan
1. Land this report and a static verifier for required sections, exact decision token, D007 reference, D006 deferral, path references, manifest alignment, unresolved placeholders, and no runtime-change instructions in this slice.
2. Audit dependencies across routes, modules, Stripe services, analytics, domains, environment examples, sidebar tests, Prisma schema, and docs/manifests.
3. Implement route/module extraction or removal only after the dependency audit proves a safe order for `apps/web/app/modules/portals`, `apps/web/app/modules/sites`, `apps/web/app/routes/admin/portals.tsx`, `apps/web/app/routes/app.$tenant/__portals/*`, and `apps/web/app/routes/app.$tenant/sites/*`.
2. Audit dependencies across routes, modules, billing provider services, analytics, domains, environment examples, sidebar tests, Prisma schema, and docs/manifests.
3. Implement route/module extraction or removal only after the dependency audit proves a safe order for `apps/web/app/modules/portals`, `apps/web/app/modules/sites`, `apps/web/app/routes/app.$tenant/__portals/*`, and `apps/web/app/routes/app.$tenant/sites/*`.
4. Create the schema/data migration plan for `prisma/schema/portals.prisma`, `prisma/schema/sites.prisma`, `prisma/schema/analytics.prisma`, and the module-owned DB files before moving persistence or deleting data models.
5. Define the Stripe/env boundary for portal-specific Stripe Connect, customer billing portal behavior, dynamic site API keys, and `.env.example`, `.env.production.example`, `.env.fly.example` updates.
5. Define the billing/env boundary for portal-specific Payment provider Connect, customer billing portal behavior, dynamic site API keys, and `.env.example`, `.env.production.example` updates.
6. Align analytics, domains, sidebar, docs, inventory, and plugin manifest references so retained Core behavior remains coherent after extraction.
7. Add or update focused tests and static scans that protect route coverage, manifest classification, schema/data expectations, provider boundaries, and placeholder-free documentation without browser or E2E execution in this documentation slice.
@@ -76,4 +76,4 @@ Task-level verification for this report is static: the file must be non-empty an
Missing any route, schema, provider, analytics, domains, environment, sidebar, inventory, or manifest surface would let a later implementation handle Portals/Sites incompletely. Reclassifying Portals/Sites as Core would conflict with D007, while immediate removal would conflict with the `extract-plugin` action and the D006 ownership deferral.
The highest implementation risk is partial extraction: moving routes without Stripe/customer portal decisions, deleting schema without data migration, or changing analytics/domains behavior without preserving public site expectations. Downstream work must therefore treat this report as the decision boundary and use static verification before runtime code changes.
The highest implementation risk is partial extraction: moving routes without billing provider/customer portal decisions, deleting schema without data migration, or changing analytics/domains behavior without preserving public site expectations. Downstream work must therefore treat this report as the decision boundary and use static verification before runtime code changes.