# CNA EventCatalog Documentation > Every message on the CNA Kafka cluster: which application owns the contract, who produces it, who consumes it, on which topic, with which payload. ## Events - [Amendment Apply Requested - AmendmentApplyRequested - 1.0.0 ](https://github.com/docs/events/AmendmentApplyRequested/1.0.0.mdx) - A 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.- [Contract Activation Requested - ContractActivationRequested - 1.0.0 ](https://github.com/docs/events/ContractActivationRequested/1.0.0.mdx) - A user saved a contract for activation. cna-nexus's activation consumer turns it ACTIVE and creates or updates the franchise unit it governs.- [Document Analysis Requested - DocumentAnalysisRequested - 1.0.0 ](https://github.com/docs/events/DocumentAnalysisRequested/1.0.0.mdx) - A 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.- [Economic Group Created - EconomicGroupCreated - 1.0.0 ](https://github.com/docs/events/EconomicGroupCreated/1.0.0.mdx) - An economic group was created in CNA Nexus. cna-one mirrors it by id so that franchises can reference it.- [Economic Group Updated - EconomicGroupUpdated - 1.0.0 ](https://github.com/docs/events/EconomicGroupUpdated/1.0.0.mdx) - An 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.- [Employee Created - EmployeeCreated - 1.0.0 ](https://github.com/docs/events/EmployeeCreated/1.0.0.mdx) - An 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 - EmployeeUpdated - 1.0.0 ](https://github.com/docs/events/EmployeeUpdated/1.0.0.mdx) - An 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.- [Entity Audited - EntityAudited - 1.0.0 ](https://github.com/docs/events/EntityAudited/1.0.0.mdx) - A 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.- [Franchise Address Created - FranchiseAddressCreated - 1.0.0 ](https://github.com/docs/events/FranchiseAddressCreated/1.0.0.mdx) - A 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 - FranchiseAddressUpdated - 1.0.0 ](https://github.com/docs/events/FranchiseAddressUpdated/1.0.0.mdx) - The 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.- [Franchise Created - FranchiseCreated - 1.0.0 ](https://github.com/docs/events/FranchiseCreated/1.0.0.mdx) - A 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 Created - FranchiseCreated - 1.1.0 ](https://github.com/docs/events/FranchiseCreated/1.1.0.mdx) - A 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 Created - FranchiseCreated - 1.2.0 ](https://github.com/docs/events/FranchiseCreated/1.2.0.mdx) - A 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 Partner Added - FranchisePartnerAdded - 1.0.0 ](https://github.com/docs/events/FranchisePartnerAdded/1.0.0.mdx) - A 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 Added - FranchisePartnerAdded - 1.1.0 ](https://github.com/docs/events/FranchisePartnerAdded/1.1.0.mdx) - A 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 - FranchisePartnerRemoved - 1.0.0 ](https://github.com/docs/events/FranchisePartnerRemoved/1.0.0.mdx) - A 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 Removed - FranchisePartnerRemoved - 1.1.0 ](https://github.com/docs/events/FranchisePartnerRemoved/1.1.0.mdx) - A 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 - FranchisePartnerUpdated - 1.0.0 ](https://github.com/docs/events/FranchisePartnerUpdated/1.0.0.mdx) - The 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.- [Franchise Partner Updated - FranchisePartnerUpdated - 1.1.0 ](https://github.com/docs/events/FranchisePartnerUpdated/1.1.0.mdx) - The 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.- [Franchise Updated - FranchiseUpdated - 1.0.0 ](https://github.com/docs/events/FranchiseUpdated/1.0.0.mdx) - A 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 Updated - FranchiseUpdated - 1.1.0 ](https://github.com/docs/events/FranchiseUpdated/1.1.0.mdx) - A 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 Updated - FranchiseUpdated - 1.2.0 ](https://github.com/docs/events/FranchiseUpdated/1.2.0.mdx) - A 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.- [Learning Book Discontinued - LearningBookDiscontinued - 1.0.0 ](https://github.com/docs/events/LearningBookDiscontinued/1.0.0.mdx) - A learning book was discontinued and left the catalog. cna-one's pricing consumer removes its prices from current and future price tables.- [Learning Book Drafted - LearningBookDrafted - 1.0.0 ](https://github.com/docs/events/LearningBookDrafted/1.0.0.mdx) - A 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 Published - LearningBookPublished - 1.0.0 ](https://github.com/docs/events/LearningBookPublished/1.0.0.mdx) - A 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.- [Partner Updated - PartnerUpdated - 1.0.0 ](https://github.com/docs/events/PartnerUpdated/1.0.0.mdx) - The 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.- [Pendency Resolved - PendencyResolved - 1.0.0 ](https://github.com/docs/events/PendencyResolved/1.0.0.mdx) - The responsible user resolved a pendency as done or declined. Carries only the id; consumers are expected to re-read the pendency. No consumer today.- [Price Table Created - PriceTableCreated - 1.0.0 ](https://github.com/docs/events/PriceTableCreated/1.0.0.mdx) - A 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. ## Commands - [Grant Application Access - GrantApplicationAccess - 1.0.0 ](https://github.com/docs/commands/GrantApplicationAccess/1.0.0.mdx) - Asks 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.- [Invite User - InviteUser - 1.0.0 ](https://github.com/docs/commands/InviteUser/1.0.0.mdx) - Invites 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.- [Revoke Application Access - RevokeApplicationAccess - 1.0.0 ](https://github.com/docs/commands/RevokeApplicationAccess/1.0.0.mdx) - Asks CNA Auth to take a person's access to an application away and drop the sessions it holds. Handled by cna-auth; no application publishes it today. ## Queries ## Agents ## Services - [CNA Astro - astro - 1.0.0 ](https://github.com/docs/services/astro/1.0.0.mdx) - Learning management system (LMS) for students and teachers. Not on the Kafka bus yet; its producers and consumers will be documented as they are designed.- [CNA Auth - cna-auth - 1.0.0 ](https://github.com/docs/services/cna-auth/1.0.0.mdx) - Authentication and identity provider for the CNA platform (accounts, tokens, OTP/2FA, per-application access grants). Consumes the Application and Employee topics and publishes nothing.- [CNA Nexus - cna-nexus - 1.0.0 ](https://github.com/docs/services/cna-nexus/1.0.0.mdx) - 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.- [CNA One - cna-one - 1.0.0 ](https://github.com/docs/services/cna-one/1.0.0.mdx) - Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishes access grants, employee, learning book, price table and audit messages; consumes the User, Franchise, LearningBook and PriceTable topics.- [CNA Placement Test - cna-placement - 1.0.0 ](https://github.com/docs/services/cna-placement/1.0.0.mdx) - English placement test application (candidates, tests, attempts, admin users). Publishes InviteUser and consumes nothing. ## Data Products ## Domains - [Astro - Astro - 1.0.0 ](https://github.com/docs/domains/Astro/1.0.0.mdx) - Learning management system bounded context. Not on the Kafka bus yet - the next messages of the platform will be designed here. Owns the astro service.- [Auth - Auth - 1.0.0 ](https://github.com/docs/domains/Auth/1.0.0.mdx) - Identity and access bounded context. Owns the AUTH message contracts (application access grants, user invitations) and the cna-auth service.- [Nexus - Nexus - 1.0.0 ](https://github.com/docs/domains/Nexus/1.0.0.mdx) - 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.- [One - One - 1.0.0 ](https://github.com/docs/domains/One/1.0.0.mdx) - Franchise operating system bounded context. Owns the ONE message contracts for employees, learning books, price tables and audit, and the cna-one service.- [Placement - Placement - 1.0.0 ](https://github.com/docs/domains/Placement/1.0.0.mdx) - English placement test bounded context. Owns the cna-placement service. Publishes the AUTH-owned InviteUser command and owns no message contracts of its own yet. ## Flows ## Channels - [AI (Kafka topic) - kafka.AI - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.AI/1.0.0.mdx) - Kafka topic for the AI document analysis queue of cna-nexus. Carries DocumentAnalysisRequested, published when a contract or amendment file is uploaded and consumed by the analysis worker, keyed by the analysis id.- [Application (Kafka topic) - kafka.Application - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Application/1.0.0.mdx) - Kafka topic for the Application aggregate. Carries the AUTH commands that grant or revoke a person's access to an application, keyed by the person's document (CPF).- [Audit (Kafka topic) - kafka.Audit - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Audit/1.0.0.mdx) - Kafka topic for the audit trail of CNA One. Carries EntityAudited, one message per audited insert, update or delete, keyed by the audited row id. No consumer today, and no entity is audited yet.- [Contract (Kafka topic) - kafka.Contract - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Contract/1.0.0.mdx) - Kafka topic for the Contract aggregate. Carries the asynchronous work requests of cna-nexus on franchise contracts - activation and amendment application - keyed by the contract id so both stay in order per contract.- [Employee (Kafka topic) - kafka.Employee - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Employee/1.0.0.mdx) - Kafka topic for the Employee aggregate. Carries EmployeeCreated and EmployeeUpdated, published by cna-one and consumed by cna-auth to keep accounts and users in sync, keyed by the employee id.- [Franchise (Kafka topic) - kafka.Franchise - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Franchise/1.0.0.mdx) - Kafka topic for the Franchise aggregate. Carries the nine NEXUS events about franchise units, their addresses, economic groups and partners, published by cna-nexus and consumed by cna-one (to mirror the network) and by cna-nexus itself, keyed by the franchise or economic group id.- [LearningBook (Kafka topic) - kafka.LearningBook - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.LearningBook/1.0.0.mdx) - Kafka topic for the LearningBook aggregate. Carries the learning book status events that cna-one publishes and consumes itself to keep price tables in sync, keyed by the learning book id.- [Partner (Kafka topic) - kafka.Partner - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Partner/1.0.0.mdx) - Kafka topic for the Partner aggregate - a person in their capacity as partner of one or more franchise units. Carries PartnerUpdated, owned by NEXUS, to be published by cna-nexus when a partner's personal data changes and consumed by cna-one to refresh its mirror. Keyed by the person id. Nothing flows on it yet.- [Pendency (Kafka topic) - kafka.Pendency - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.Pendency/1.0.0.mdx) - Kafka topic for the Pendency aggregate. Carries PendencyResolved, published by cna-nexus when a user closes a pendency, keyed by the pendency id. No consumer today.- [PriceTable (Kafka topic) - kafka.PriceTable - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.PriceTable/1.0.0.mdx) - Kafka topic for the PriceTable aggregate. Carries PriceTableCreated, which cna-one publishes and consumes itself to seed the learning book prices of a new table, keyed by the price table id.- [User (Kafka topic) - kafka.User - 1.0.0 - protocol - kafka](https://github.com/docs/channels/kafka.User/1.0.0.mdx) - Kafka topic for the User aggregate. Carries the AUTH command InviteUser, published by cna-nexus and cna-placement and handled by cna-one, keyed by the person's document (CPF). ## Containers (Databases, External Systems) ## Entities - Auth Domain - [Application](https://github.com/docs/entities/Application/1.0.0.mdx) - An application registered in CNA Auth (cna-one, cna-nexus, cna-placement, astro) that people sign in to. Aggregate root of the Application Kafka topic, which carries who may access it. - [User](https://github.com/docs/entities/User/1.0.0.mdx) - A login identity in CNA Auth, one per e-mail inside an Account. The Account is the person, found by document (CPF); the User is how that person signs in. Aggregate root of the User Kafka topic. - Nexus Domain - [Contract](https://github.com/docs/entities/Contract/1.0.0.mdx) - A franchise contract in CNA Nexus - opening, renewal or resale - uploaded as a document, analysed by AI, reviewed by a person and activated, at which point it becomes the source of truth for a franchise unit. Aggregate root of the Contract Kafka topic. - [Contract Amendment](https://github.com/docs/entities/ContractAmendment/1.0.0.mdx) - A supplementary document attached to a contract - attachment, addendum or rescission - carrying one change per contract field it modifies. Applying it executes those changes on the contract and the franchise. - [Pendency](https://github.com/docs/entities/Pendency/1.0.0.mdx) - A task in CNA Nexus that someone has to resolve, created by any process and addressed to a person, a department or a minimum role, with an optional deadline and an optional link to the business item it is about. Aggregate root of the Pendency Kafka topic. - [Franchise](https://github.com/docs/entities/Franchise/1.0.0.mdx) - A franchise unit (school) of the CNA network as managed in Nexus - registration and tax data, lifecycle statuses, category, economic group, region, partners and products. Created by activating an opening contract. Aggregate root of the Franchise Kafka topic. - [Economic Group](https://github.com/docs/entities/EconomicGroup/1.0.0.mdx) - A grouping of franchise units under one economic owner, used for reporting and statistics. Optional on a franchise; soft-deleted rather than removed. Travels on the Franchise Kafka topic under its own key. - [Franchise Partner](https://github.com/docs/entities/FranchisePartner/1.0.0.mdx) - The link between a franchise unit and a person behind it, with one or more roles - FRANCHISEE (leads the unit) or OPERATING_PARTNER (takes part in operating it). Travels on the Franchise Kafka topic keyed by the franchise. - [Franchise Address](https://github.com/docs/entities/FranchiseAddress/1.0.0.mdx) - The address of a franchise unit - street, number, complement, neighborhood, postal code, IBGE city or foreign city and state, country and coordinates. One row per unit in common.addresses. Travels on the Franchise Kafka topic keyed by the franchise. - [Partner](https://github.com/docs/entities/Partner/1.0.0.mdx) - A person (common.persons in Nexus) in their capacity as partner of one or more franchise units - the identity and contacts behind every FranchisePartner link. Aggregate root of the Partner Kafka topic, keyed by the person id. Exists on the wire only while the person holds at least one link. - One Domain - [Employee](https://github.com/docs/entities/Employee/1.0.0.mdx) - A person working in the CNA network as seen by CNA One - a franchise employee, a partner or a franchisor user - linked to a Person and, through staff links, to franchises. Aggregate root of the Employee Kafka topic. - [Learning Book](https://github.com/docs/entities/LearningBook/1.0.0.mdx) - An edition of a course book sold by the CNA network, printed or digital, with a publication lifecycle. Aggregate root of the LearningBook Kafka topic. - [Price Table](https://github.com/docs/entities/PriceTable/1.0.0.mdx) - A yearly price list for one product type, valid between two dates, holding price groups (B2B and B2C by default) with one price per product and learning book. Aggregate root of the PriceTable Kafka topic. ## Teams - [cna-platform](https://github.com/docs/teams/cna-platform.mdx) - CNA Platform ## Users