CNA Nexus
Franchise network back-office (franchises, economic groups, partners, contracts and amendments, document storage, AI document analysis, pendencies). Produces and consumes on the Franchise, Contract and AI topics; also publishes InviteUser and PendencyResolved. PartnerUpdated on the Partner topic is a target contract not emitted yet.
Overview
cna-nexus manages the franchise network for the franchisor: franchises and their economic groups and partners, contracts and amendments with their documents, AI-assisted document analysis, and pendencies. On the Kafka bus it is both producer and consumer. It publishes franchise and economic group changes for CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishe...PublishesGrantApplicationAccess, EmployeeCreated +6SubscribesInviteUser, FranchiseCreated +9Ownercna-platformMapRepoView docs to mirror, invites users into the platform, and uses the Contract and AI topics as an internal work queue between its API and its consumer processes.
Producers are called through manager.afterCommit() so that a message is only published when the surrounding database transaction commits.
Partner UpdatedPartner UpdatedEventv1.0.0The personal data of a franchise partner changed in CNA Nexus - name, legal name, e-mail, phone or birth date. Snapshot ...Ownercna-platformSchemaMapView docs on Partner (Kafka topic)Partner (Kafka topic)Channelv1.0.0Kafka topic for the Partner aggregate - a person in their capacity as partner of one or more franchise units. Carries Pa...Ownercna-platformView docs is listed as sent but is a target: no class exists and updatePerson emits nothing yet (see the event page).
Messages
Messages for this service
Sends messages (15)
Quickly find the message you need by searching for the name, type, or summary.Receives messages (6)
Quickly find the message you need by searching for the name, type, or summary.Kafka consumers
Consumers run as separate processes, one script per domain: api/scripts/events/aiConsume.ts, contractConsume.ts and franchiseConsume.ts.
| Consumer group | Topics | Handler |
|---|---|---|
ai-document-analysis | AI | api/app/domains/ai/events/consumers/documentAnalysisConsumer.ts |
contract-activation | Contract | api/app/domains/contract/contract/events/consumers/contractActivationConsumer.ts |
contract-amendment-apply | Contract | api/app/domains/contract/amendment/events/consumers/amendmentApplyConsumer.ts |
economic-group-partner-touch | Franchise | api/app/domains/franchise/economicGroup/events/consumers/touchEconomicGroupOnFranchisePartnerChange.ts |
Custom properties
| Property | Value |
|---|---|
| Runtimex-runtime | Express 5 + GraphQL Yoga + TypeORM/Postgres + kafkajs |
| Events Pathx-events-path | api/app/events/<owner>/<aggregateRoot>/<EventName>.ts |