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
| Feature | HTTP |
|---|---|
tenant | tenant and admin controllers |
user | user admin, user public, repository |
user-setting, tenant-setting | yes |
tenant-role | tenant-role and role admin. Invite email uses email_queue |
role-permission | platform permission catalog |
Auth controllers live in src/common/auth, not under the identity feature folder.
Commerce
| Feature | Notes |
|---|---|
order | Command, ingestion, import, payment, outbound sync. Routes under /commerce/orders |
order-status | State 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, tag | Catalog |
channel, seller | Sales connections |
customer, address | Customers. Address validation can enqueue Bharat Address |
return | State machine and restock |
promotion | Service folder. No coupon controller was found |
marketplace | In-process handler registry, not a provider SDK |
vendor, task | Vendor 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
| Feature | Controllers |
|---|---|
invoice | /finance/invoice |
settlement | settlement, import, reconciliation, dashboard, fee rules, journal, COD remittance |
wallet | /finance/wallets, /finance/admin |
Automation
| Feature | Surface |
|---|---|
ai | /automation/ai, voice, ops, tool registry, embeddings |
voice-agent | agents, calls, version-neutral webhooks |
whatsapp-agent | Cloud 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.