domain

Nexus

Franchise network back-office bounded context. Owns the NEXUS message contracts for franchises, economic groups, partners, contracts and amendments, AI document analysis and pendencies, and the cna-nexus service.

Domain

Overview

Nexus is the bounded context of the franchise network back-office: the franchises themselves, the economic groups that own them, their partners, the franchise contracts and amendments, the AI analysis of contract documents, and the pendencies raised along the way. It owns the contracts declared with static owner = 'NEXUS' and the CNA NexusCNA NexusServicev1.0.0Franchise network back-office (franchises, economic groups, partners, contracts and amendments, document storage, AI doc...PublishesInviteUser, ContractActivationRequested +13SubscribesContractActivationRequested, AmendmentApplyRequested +4Ownercna-platformMapRepoView docs service.

Most NEXUS messages are consumed inside Nexus itself, as asynchronous work between the API and its consumer processes. Franchise and economic group changes are also mirrored into 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; 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 the Partner topic, is the target contract for changes to a partner’s personal data, not implemented yet. Read the message pages for the exact producers and consumers.

Contracts owned by this domain

Every message declared with static owner = 'NEXUS', whichever application publishes or handles it.

Resources

Resources (14)

Browse resources in this group or search by name, type, or description.
NameVersionTypeDescription
Contract Activation Requested
v1.0.0eventA user saved a contract for activation. cna-nexus's activation consumer turns it ACTIVE and creates or updates the franchise unit it governs.
Amendment Apply Requested
v1.0.0eventA user finished reviewing a contract amendment and asked for its changes to be applied. cna-nexus's amendment consumer executes the changes on the contract and the franchise.
Document Analysis Requested
v1.0.0eventA contract or amendment document was uploaded and an AI analysis row created for it. cna-nexus's analysis worker extracts the structured data and leaves the contract or amendment in DRAFT for review.
Pendency Resolved
v1.0.0eventThe responsible user resolved a pendency as done or declined. Carries only the id; consumers are expected to re-read the pendency. No consumer today.
Franchise Created
v1.2.0eventA franchise unit was created in CNA Nexus by activating an opening contract. Full snapshot of the unit; cna-one mirrors it, its address and its partners as employees.
Franchise Updated
v1.2.0eventA franchise unit changed in CNA Nexus - edited in one of the franchise screens, re-activated from a contract, or amended. Full snapshot. Nobody consumes it today; cna-one has no class for it and drops it.
Franchise Address Created
v1.0.0eventA franchise unit received its address in CNA Nexus. The address block of the franchise snapshot plus the franchise id. Published by cna-nexus, consumed by cna-one to mirror the address.
Franchise Address Updated
v1.0.0eventThe address of a franchise unit changed in CNA Nexus. The address block of the franchise snapshot plus the franchise id. Published by cna-nexus, consumed by cna-one to mirror the change.
Economic Group Created
v1.0.0eventAn economic group was created in CNA Nexus. cna-one mirrors it by id so that franchises can reference it.
Economic Group Updated
v1.0.0eventAn economic group changed in CNA Nexus - renamed, toggled active or soft-deleted (there is no delete event). cna-one mirrors the new state by id.
Franchise Partner Added
v1.1.0eventA person became a partner of a franchise unit, with their roles. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
Franchise Partner Removed
v1.1.0eventA person stopped being a partner of a franchise unit. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache, which cannot see hard-deleted rows otherwise.
Franchise Partner Updated
v1.1.0eventThe roles of a franchise partner changed - roles are the only mutable field. Carries the roles before and after. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
Partner Updated
v1.0.0eventThe personal data of a franchise partner changed in CNA Nexus - name, legal name, e-mail, phone or birth date. Snapshot of the person, keyed by the person id. To be published by cna-nexus and consumed by cna-one; neither side has the class yet.

Messages flowing through this domain’s services

Messages for this domain

Sends messages (15)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummaryChannels
Invite User
v1.0.0commandInvites a person into the CNA platform. Published by cna-nexus and cna-placement when a user is created or re-invited; handled by cna-one, which creates the person and employee and then requests application access from cna-auth.
-
Contract Activation Requested
v1.0.0eventA user saved a contract for activation. cna-nexus's activation consumer turns it ACTIVE and creates or updates the franchise unit it governs.
-
Amendment Apply Requested
v1.0.0eventA user finished reviewing a contract amendment and asked for its changes to be applied. cna-nexus's amendment consumer executes the changes on the contract and the franchise.
-
Document Analysis Requested
v1.0.0eventA contract or amendment document was uploaded and an AI analysis row created for it. cna-nexus's analysis worker extracts the structured data and leaves the contract or amendment in DRAFT for review.
-
Pendency Resolved
v1.0.0eventThe responsible user resolved a pendency as done or declined. Carries only the id; consumers are expected to re-read the pendency. No consumer today.
-
Franchise Created
v1.2.0eventA franchise unit was created in CNA Nexus by activating an opening contract. Full snapshot of the unit; cna-one mirrors it, its address and its partners as employees.
-
Franchise Updated
v1.2.0eventA franchise unit changed in CNA Nexus - edited in one of the franchise screens, re-activated from a contract, or amended. Full snapshot. Nobody consumes it today; cna-one has no class for it and drops it.
-
Franchise Address Created
v1.0.0eventA franchise unit received its address in CNA Nexus. The address block of the franchise snapshot plus the franchise id. Published by cna-nexus, consumed by cna-one to mirror the address.
-
Franchise Address Updated
v1.0.0eventThe address of a franchise unit changed in CNA Nexus. The address block of the franchise snapshot plus the franchise id. Published by cna-nexus, consumed by cna-one to mirror the change.
-
Economic Group Created
v1.0.0eventAn economic group was created in CNA Nexus. cna-one mirrors it by id so that franchises can reference it.
-
Economic Group Updated
v1.0.0eventAn economic group changed in CNA Nexus - renamed, toggled active or soft-deleted (there is no delete event). cna-one mirrors the new state by id.
-
Franchise Partner Added
v1.1.0eventA person became a partner of a franchise unit, with their roles. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
-
Franchise Partner Removed
v1.1.0eventA person stopped being a partner of a franchise unit. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache, which cannot see hard-deleted rows otherwise.
-
Franchise Partner Updated
v1.1.0eventThe roles of a franchise partner changed - roles are the only mutable field. Carries the roles before and after. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
-
Partner Updated
v1.0.0eventThe personal data of a franchise partner changed in CNA Nexus - name, legal name, e-mail, phone or birth date. Snapshot of the person, keyed by the person id. To be published by cna-nexus and consumed by cna-one; neither side has the class yet.
-

Receives messages (6)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummaryChannels
Contract Activation Requested
v1.0.0eventA user saved a contract for activation. cna-nexus's activation consumer turns it ACTIVE and creates or updates the franchise unit it governs.
-
Amendment Apply Requested
v1.0.0eventA user finished reviewing a contract amendment and asked for its changes to be applied. cna-nexus's amendment consumer executes the changes on the contract and the franchise.
-
Document Analysis Requested
v1.0.0eventA contract or amendment document was uploaded and an AI analysis row created for it. cna-nexus's analysis worker extracts the structured data and leaves the contract or amendment in DRAFT for review.
-
Franchise Partner Added
v1.1.0eventA person became a partner of a franchise unit, with their roles. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
-
Franchise Partner Removed
v1.1.0eventA person stopped being a partner of a franchise unit. One message per partner. Consumed by cna-nexus itself to invalidate the economic group statistics cache, which cannot see hard-deleted rows otherwise.
-
Franchise Partner Updated
v1.1.0eventThe roles of a franchise partner changed - roles are the only mutable field. Carries the roles before and after. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
-

Entities

Outside the model

The NexusSubscription Kafka topic used by cna-nexus to fan out GraphQL subscriptions between pods is infrastructure, not a contract. It is intentionally not documented as a channel or message. See “Topics outside the model” in docs/modelling/02-mapping.md.