domain

One

Franchise operating system bounded context. Owns the ONE message contracts for employees, learning books, price tables and audit, and the cna-one service.

Domain

Overview

One is the bounded context of the franchise operating system used day to day by franchises and by the franchisor: employees, pricing and price tables, products and learning books, and school operations. It owns the contracts declared with static owner = 'ONE' (and 'AUDIT', which is not an application) and the 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 service.

One sits in the middle of the platform’s flows. It mirrors franchises and economic groups published by 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, turns user invitations into people and application access requests handled by CNA AuthCNA AuthServicev1.0.0Authentication and identity provider for the CNA platform (accounts, tokens, OTP/2FA, per-application access grants). Co...SubscribesGrantApplicationAccess, RevokeApplicationAccess +2Ownercna-platformMapRepoView docs, and publishes employee changes that cna-auth turns into accounts. Read the message pages for the exact producers and consumers.

Contracts owned by this domain

Every message declared with static owner = 'ONE' (or 'AUDIT'), whichever application publishes or handles it.

Resources

Resources (7)

Browse resources in this group or search by name, type, or description.
NameVersionTypeDescription
Employee Created
v1.0.0eventAn employee was created in CNA One, with the person it points at. Consumed by cna-auth to provision the account and the login user.
Employee Updated
v1.0.0eventAn employee or the person it points at changed in CNA One. Consumed by cna-auth to update the account and the user, including blocking or unblocking the login.
Learning Book Published
v1.0.0eventA learning book was published and is on sale. cna-one's pricing consumer opens a pending price for it in every current and future default price group.
Learning Book Drafted
v1.0.0eventA learning book was created as a draft or moved back to draft, so it is not on sale. cna-one's pricing consumer removes its prices from current and future price tables.
Learning Book Discontinued
v1.0.0eventA learning book was discontinued and left the catalog. cna-one's pricing consumer removes its prices from current and future price tables.
Price Table Created
v1.0.0eventA price table was created with its default price groups. cna-one's pricing consumer seeds it with one price per available learning book, copying last year's amounts when they exist.
Entity Audited
v1.0.0eventA row of an audited table in CNA One was inserted, updated or deleted, with the old and new values. Infrastructure is wired but no entity opts in and nobody consumes it.

Messages flowing through this domain’s services

Messages for this domain

Sends messages (8)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummaryChannels
Grant Application Access
v1.0.0commandAsks CNA Auth to give a person access to an application, provisioning the account and user when they are new. Published by cna-one when an invited user is mirrored into a person; handled by cna-auth.
-
Employee Created
v1.0.0eventAn employee was created in CNA One, with the person it points at. Consumed by cna-auth to provision the account and the login user.
-
Employee Updated
v1.0.0eventAn employee or the person it points at changed in CNA One. Consumed by cna-auth to update the account and the user, including blocking or unblocking the login.
-
Learning Book Published
v1.0.0eventA learning book was published and is on sale. cna-one's pricing consumer opens a pending price for it in every current and future default price group.
-
Learning Book Drafted
v1.0.0eventA learning book was created as a draft or moved back to draft, so it is not on sale. cna-one's pricing consumer removes its prices from current and future price tables.
-
Learning Book Discontinued
v1.0.0eventA learning book was discontinued and left the catalog. cna-one's pricing consumer removes its prices from current and future price tables.
-
Price Table Created
v1.0.0eventA price table was created with its default price groups. cna-one's pricing consumer seeds it with one price per available learning book, copying last year's amounts when they exist.
-
Entity Audited
v1.0.0eventA row of an audited table in CNA One was inserted, updated or deleted, with the old and new values. Infrastructure is wired but no entity opts in and nobody consumes it.
-

Receives messages (11)

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.
-
Franchise Created
v1.0.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.
-
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 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.
-
Learning Book Published
v1.0.0eventA learning book was published and is on sale. cna-one's pricing consumer opens a pending price for it in every current and future default price group.
-
Learning Book Drafted
v1.0.0eventA learning book was created as a draft or moved back to draft, so it is not on sale. cna-one's pricing consumer removes its prices from current and future price tables.
-
Learning Book Discontinued
v1.0.0eventA learning book was discontinued and left the catalog. cna-one's pricing consumer removes its prices from current and future price tables.
-
Price Table Created
v1.0.0eventA price table was created with its default price groups. cna-one's pricing consumer seeds it with one price per available learning book, copying last year's amounts when they exist.
-
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.
-

Entities

Outside the model

The Subscription Kafka topic used by cna-one 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.