CRM — module-ownership case study
CRM is a playground/case-study service for the module-ownership architecture — not a business product module. It proves that a microservice can own its own navigation, route prefixes and translations through service registration. It will eventually be split out into a standalone product.
What it does today
- Declares the
crmroot level (partOf: "crm"— the CRM module IS its own root level, unlike thesystemservices). - Owns the
/crmroute prefix:/crm/customers, plus an extra root-level membership undersystem(/system/crm/pipeline— "a foot in two shoes"). - Registers
CRM_NAV(nav-declaration.ts) viaservice_registry.endpoints.nav. - Translates its own module label (
labelKey: "crm.module.name") in thecrm.translationsnamespace.
The customer entity pages stay BE-served for now — route declarations
reference entity customer rendered by the FE metadata pipeline. Entity API
ownership migrates to this service in a later phase.
Boundaries
- No HTTP controllers and no NATS subscribers — the service registers metadata only (nav, translations, route census).
- DB ownership: owns its own
db-meta/(signedMANIFEST.json,keys.json,patches/— e.g.0002_seed_config.sqlseedshttp_portand sibling config entries). - Root level
crmis distinct fromsystem:service_registry.part_ofseparates the two domains (seeoverview.mdx).
Configuration
- Port: 3007 (
config_entries.http_port, seeded by0002_seed_config.sql). - Env policy:
DATABASE_URL+DATABASE_SCHEMAonly (seedocs/ai/env-policy.md); everything else lives inconfig_entries. - Dev:
bun --hot src/index.tsfromprimebrick-us-v3/crm/.
Adapters
ConfigRepositoryAdapter—config_entriesgovernance.HealthCheckAdapter,CrmAuthConfigPort— SDK lifecycle ports.
Last modified on