Skip to main content

Module architecture

AppModule imports CoreModule (common, MCP, monitoring, Terminus), the five area modules, IntegrationsModule, and HealthController.

WorkerModule and SchedulerModule are separate roots. They import the feature modules they execute. OutboxDispatchModule is imported by the worker, not by AppModule.

A feature module must not import an area module. Area modules only compose features. That rule is in AGENTS.md and checked by yarn architecture:check.

Identity​

FeatureHTTP
tenanttenant and admin controllers
useruser admin, user public, repository
user-setting, tenant-settingyes
tenant-roletenant-role and role admin. Invite email uses email_queue
role-permissionplatform permission catalog

Auth controllers live in src/common/auth, not under the identity feature folder.

Commerce​

FeatureNotes
orderCommand, ingestion, import, payment, outbound sync. Routes under /commerce/orders
order-statusState machine. No controller in this folder. Status changes are also exposed from the order controller
order-note/commerce/order-note
order-status-history/commerce/order-status-history
product, category, tagCatalog
channel, sellerSales connections
customer, addressCustomers. Address validation can enqueue Bharat Address
returnState machine and restock
promotionService folder. No coupon controller was found
marketplaceIn-process handler registry, not a provider SDK
vendor, taskVendor master data. Task schema file is under identity

Operations​

warehouse, bin-location, stock, stock-count, stock-transfer, purchase-order, goods-receipt, fulfillment, packing-manifest, shipment, shipment-tracking, courier (master data, not the carrier HTTP client), file, device, dashboard, support-ticket, audit-log, csv (no controller found).

Finance​

FeatureControllers
invoice/finance/invoice
settlementsettlement, import, reconciliation, dashboard, fee rules, journal, COD remittance
wallet/finance/wallets, /finance/admin

Automation​

FeatureSurface
ai/automation/ai, voice, ops, tool registry, embeddings
voice-agentagents, calls, version-neutral webhooks
whatsapp-agentCloud API webhooks, payment webhooks, catalog processor

The WhatsApp catalog processor is declared on the service (@Processor('whatsapp-catalog-provisioning')), not under src/workers/processors.

Workers​

Processors under src/workers: webhook, webhook-health, email, sync-job, fulfillment-label, settlement-import, address-validation, inventory-publish, shipment-tracking, shipment-tracking-refresh, stock-bulk-upload.

Schedulers: midnight, sync-job, settlement-reconciliation, address-validation, inventory-reconciliation, channel-feed-poll-reaper, shipment-exception, shipment-tracking, order-item-reconciliation, webhook-health.