Skip to content

Domain to Module Mapping

Executive Summary

Domain to Module Mapping defines how each Algosure Domain maps to a Spring Boot Modulith module. The default rule is one Domain per module where practical.

Why This Exists

The Architecture Mirror Principle requires software architecture to mirror the business architecture. Domain-to-module mapping protects source-of-truth ownership and avoids generic technical modules that absorb unrelated business behavior.

Owner

The owner is the Chief Product Officer and Enterprise Architect.

Business Value

Clear mapping gives engineering, architecture, product, AI, data, and integration teams a shared ownership model for APIs, services, repositories, events, and data.

Domain Module Map

flowchart TD
    Identity[Identity Module]
    Organization[Organization Module]
    Compliance[Compliance Module]
    Opportunity[Opportunity Module]
    Bid[Bid Module]
    Contract[Contract Module]
    Supplier[Supplier Module]
    Marketplace[Marketplace Module]
    Funding[Funding Module]
    Learning[Learning Module]
    Intelligence[Intelligence Module]
    Notification[Notification Module]
    Analytics[Analytics Module]
    Billing[Billing Module]
    Administration[Administration Module]

    Identity --> Organization
    Billing --> Identity
    Organization --> Compliance
    Organization --> Opportunity
    Organization --> Bid
    Organization --> Contract
    Organization --> Supplier
    Organization --> Funding
    Organization --> Learning
    Compliance --> Opportunity
    Opportunity --> Bid
    Bid --> Contract
    Contract --> Funding
    Supplier --> Marketplace
    Marketplace --> Supplier
    Intelligence --> Organization
    Intelligence --> Compliance
    Intelligence --> Opportunity
    Intelligence --> Bid
    Intelligence --> Contract
    Notification --> Analytics
    Learning --> Analytics
    Analytics --> Administration
    Administration --> Identity

Mapping Catalogue

Domain Module Source Facts Owned Common Consumers
Identity Identity module Authentication interpretation, membership, roles, permissions, sessions, API keys, MFA, authorization policy facts. All tenant-aware modules.
Organization Organization module Tenant root, organization profile, customer context, business structure, account operating context. All business modules.
Compliance Compliance module Compliance requirements, readiness, evidence, verification, expiry, risk, compliance tasks. Opportunity, Bid, Contract, Funding, Intelligence, Analytics.
Opportunity Opportunity module Opportunity records, tender source references, matching state, saved opportunities, recommendations. Bid, Intelligence, Notification, Analytics.
Bid Bid module Bid workspace, plan, contributors, proposal state, approval state, submission readiness. Contract, Intelligence, Notification, Analytics.
Contract Contract module Awarded contract state, delivery milestones, performance, invoice and payment references, closeout. Funding, Supplier, Analytics, Intelligence.
Supplier Supplier module Supplier profile, relationships, trust state, quotes, performance, ratings. Marketplace, Bid, Contract, Analytics.
Marketplace Marketplace module Marketplace listings, supplier discovery workflow, quote requests, provider visibility, marketplace matching. Supplier, Bid, Funding, Analytics.
Funding Funding module Funding need, readiness, application, partner offer, cash-flow risk, repayment context. Contract, Bid, Billing, Analytics.
Learning Learning module Courses, lessons, quizzes, certificates, learning paths, maturity progress. Analytics, Intelligence, Notification.
Intelligence Intelligence module AIOS orchestration context, reasoning records, explanations, memory workflow metadata, AI task outcomes. All modules through governed AIOS boundaries.
Notification Notification module Notification intent, preferences, reminders, escalations, delivery history, channel status interpretation. All modules.
Analytics Analytics module KPI snapshots, reports, metric definitions, performance summaries, executive insight projections. Organization, Administration, executive experiences.
Billing Billing module Plans, subscriptions, invoices, payment state, entitlements, limits, renewals, cancellations. Identity, Organization, Administration, Analytics.
Administration Administration module Platform configuration, feature flags, support operations, policy configuration, audit review, governance controls. All governed modules.

Practical Mapping Rules

Rule Meaning
Keep one Domain per Modulith module where practical A domain module should exist for each approved Domain in the Domain Model catalogue.
Split only by architecture decision A module may be split only when ownership, scale, security, lifecycle, or operational reasons justify it.
Do not merge for convenience Related Domains may collaborate, but convenience is not a reason to merge ownership.
Preserve root context Organization remains the tenant and customer root context; other modules reference it through stable identifiers and contracts.
Keep Intelligence bounded Intelligence supports AIOS reasoning and orchestration context but must not own source facts from other modules.
Keep Analytics downstream Analytics owns metrics and projections, not the operational source facts used to calculate them.

API Boundary Ownership

API Boundary Owning Module
Identity, role, membership, authorization policy APIs Identity module
Organization profile and tenant context APIs Organization module
Compliance readiness and evidence APIs Compliance module
Opportunity discovery and matching APIs Opportunity module
Bid workspace and submission readiness APIs Bid module
Contract delivery and closeout APIs Contract module
Supplier profile and trust APIs Supplier module
Marketplace discovery and quote APIs Marketplace module
Funding readiness and application APIs Funding module
Learning path and course APIs Learning module
AIOS work, reasoning, explanation, and memory workflow APIs Intelligence module
Notification preference and delivery history APIs Notification module
Dashboard, KPI, and report APIs Analytics module
Subscription, invoice, entitlement, and payment-state APIs Billing module
Configuration, support, audit review, and governance APIs Administration module

Non-Implementation Boundary

This document does not define API routes, controller names, package names, schema names, event class names, or database table ownership details.