# aasimawshaikh/ecomsas architecture

> Architecture diagram of the GitHub repository aasimawshaikh/ecomsas, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aasimawshaikh/ecomsas
- Repository: https://github.com/aasimawshaikh/ecomsas

## Overview

eComsas is a multi-vendor, multi-location hyperlocal commerce platform. Customers discover products, configure carts and checkout; sellers and partners manage listings, locations and compliance; riders fulfil deliveries; and admins configure and govern operations. The API is organized into domain modules, with a commerce engine for model, feature and storefront configuration. The graph preserves the customer, seller, rider, governance, finance and CMS branches visible in the tree. Many domain modules were not excerpted, so their internal links are omitted rather than inferred.

Main entry points: [`apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts`](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts) (Commerce Controller), [`apps/web-customer/src/App.tsx`](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-customer/src/App.tsx) (Customer Web), [`apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts`](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts) (Commerce Engine), [`apps/mobile-customer/src/api/mobileClient.ts`](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-customer/src/api/mobileClient.ts) (Mobile API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer Commerce"]
  node_customer_web["Customer Web<br/>[App.tsx]"]
  node_storefront_api["Storefront Client<br/>[storefrontApi.ts]"]
  node_customer_mobile["Customer Mobile<br/>[App.tsx]"]
  node_mobile_client["Mobile API Client<br/>[mobileClient.ts]"]
end

subgraph group_operations["Seller And Delivery"]
  node_logistics_controller["Logistics Controller"]
  node_logistics_service["Logistics Service"]
  node_rider_web["Rider Portal<br/>[App.tsx]"]
  node_rider_api["Rider Client<br/>[riderApi.ts]"]
  node_seller_mobile["Seller Mobile<br/>[App.tsx]"]
  node_seller_mobile_client["Seller Mobile Client"]
  node_partners_controller["Partners Controller"]
  node_partners_service["Partners Service"]
end

subgraph group_governance["Platform Governance"]
  node_admin_web["Admin Console<br/>[App.tsx]"]
  node_superadmin_web["Super Admin<br/>[App.tsx]"]
end

subgraph group_backend["API And Domains"]
  node_commerce_controller["Commerce Controller"]
  node_commerce_routes["Commerce Routes"]
  node_commerce_engine["Commerce Engine"]
  node_model_ops["Model Operations"]
  node_governance_service["Governance Service"]
  node_ordering["Ordering"]
  node_catalogue["Catalogue"]
  node_serviceability["Serviceability"]
  node_finance["Finance"]
  node_cms["CMS<br/>[cms.service.ts]"]
  node_iam["Identity Access<br/>[iam.service.ts]"]
end

subgraph group_shared["Shared Contracts"]
  node_contracts["API Contracts"]
end

node_customer_user(("Customer"))

node_customer_user -->|"uses"| node_customer_web
node_customer_web -->|"requests data"| node_storefront_api
node_customer_web -.->|"fetches storefront"| node_commerce_engine
node_customer_mobile -->|"makes requests"| node_mobile_client
node_mobile_client -.->|"refreshes session"| node_iam
node_commerce_routes -->|"dispatches"| node_commerce_controller
node_commerce_controller -->|"calls"| node_commerce_engine
node_commerce_controller -->|"calls"| node_model_ops
node_commerce_controller -->|"calls"| node_governance_service
node_commerce_engine -->|"uses"| node_cms
node_rider_web -->|"requests data"| node_rider_api
node_rider_api -.->|"calls API"| node_logistics_service
node_seller_mobile -->|"makes requests"| node_seller_mobile_client
node_logistics_controller -->|"calls"| node_logistics_service
node_partners_controller -->|"calls"| node_partners_service
node_admin_web -.->|"uses console"| node_finance
node_superadmin_web -.->|"configures platform"| node_commerce_routes
node_iam -.->|"uses types"| node_contracts

click node_customer_web "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-customer/src/App.tsx"
click node_storefront_api "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-customer/src/services/storefrontApi.ts"
click node_customer_mobile "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-customer/App.tsx"
click node_mobile_client "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-customer/src/api/mobileClient.ts"
click node_commerce_controller "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts"
click node_commerce_routes "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.routes.ts"
click node_commerce_engine "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts"
click node_model_ops "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/multiModelOperations.service.ts"
click node_governance_service "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/superAdminGovernance.service.ts"
click node_ordering "https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/ordering"
click node_catalogue "https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/catalogue"
click node_serviceability "https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/serviceability"
click node_logistics_controller "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/logistics/logistics.controller.ts"
click node_logistics_service "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/logistics/logistics.service.ts"
click node_rider_web "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-rider/src/App.tsx"
click node_rider_api "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-rider/src/services/riderApi.ts"
click node_seller_mobile "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-seller/App.tsx"
click node_seller_mobile_client "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-seller/src/api/sellerMobileClient.ts"
click node_partners_controller "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/partners/partners.controller.ts"
click node_partners_service "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/partners/partners.service.ts"
click node_admin_web "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-admin/src/App.tsx"
click node_superadmin_web "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-super-admin/src/App.tsx"
click node_finance "https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/finance"
click node_cms "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/cms/cms.service.ts"
click node_iam "https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/iam/iam.service.ts"
click node_contracts "https://github.com/aasimawshaikh/ecomsas/tree/main/packages/contracts/src"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_customer_web,node_storefront_api,node_customer_mobile,node_mobile_client toneBlue
class node_logistics_controller,node_logistics_service,node_rider_web,node_rider_api,node_seller_mobile,node_seller_mobile_client,node_partners_controller,node_partners_service toneAmber
class node_admin_web,node_superadmin_web toneMint
class node_commerce_controller,node_commerce_routes,node_commerce_engine,node_model_ops,node_governance_service,node_ordering,node_catalogue,node_serviceability,node_finance,node_cms,node_iam toneRose
class node_contracts,node_customer_user toneIndigo
```

## Components

### Customer Commerce

- [Customer Web](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-customer/src/App.tsx): `apps/web-customer/src/App.tsx`
- [Storefront Client](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-customer/src/services/storefrontApi.ts): `apps/web-customer/src/services/storefrontApi.ts`
- [Customer Mobile](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-customer/App.tsx): `apps/mobile-customer/App.tsx`
- [Mobile API Client](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-customer/src/api/mobileClient.ts): `apps/mobile-customer/src/api/mobileClient.ts`

### Seller And Delivery

- [Logistics Controller](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/logistics/logistics.controller.ts): `apps/api-server/src/modules/logistics/logistics.controller.ts`
- [Logistics Service](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/logistics/logistics.service.ts): `apps/api-server/src/modules/logistics/logistics.service.ts`
- [Rider Portal](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-rider/src/App.tsx): `apps/web-rider/src/App.tsx`
- [Rider Client](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-rider/src/services/riderApi.ts): `apps/web-rider/src/services/riderApi.ts`
- [Seller Mobile](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-seller/App.tsx): `apps/mobile-seller/App.tsx`
- [Seller Mobile Client](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/mobile-seller/src/api/sellerMobileClient.ts): `apps/mobile-seller/src/api/sellerMobileClient.ts`
- [Partners Controller](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/partners/partners.controller.ts): `apps/api-server/src/modules/partners/partners.controller.ts`
- [Partners Service](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/partners/partners.service.ts): `apps/api-server/src/modules/partners/partners.service.ts`

### Platform Governance

- [Admin Console](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-admin/src/App.tsx): `apps/web-admin/src/App.tsx`
- [Super Admin](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/web-super-admin/src/App.tsx): `apps/web-super-admin/src/App.tsx`

### API And Domains

- [Commerce Controller](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts): `apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts`
- [Commerce Routes](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.routes.ts): `apps/api-server/src/modules/commerce-engine/commerceEngine.routes.ts`
- [Commerce Engine](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts): `apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts`
- [Model Operations](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/multiModelOperations.service.ts): `apps/api-server/src/modules/commerce-engine/multiModelOperations.service.ts`
- [Governance Service](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/commerce-engine/superAdminGovernance.service.ts): `apps/api-server/src/modules/commerce-engine/superAdminGovernance.service.ts`
- [Ordering](https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/ordering): `apps/api-server/src/modules/ordering`
- [Catalogue](https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/catalogue): `apps/api-server/src/modules/catalogue`
- [Serviceability](https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/serviceability): `apps/api-server/src/modules/serviceability`
- [Finance](https://github.com/aasimawshaikh/ecomsas/tree/main/apps/api-server/src/modules/finance): `apps/api-server/src/modules/finance`
- [CMS](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/cms/cms.service.ts): `apps/api-server/src/modules/cms/cms.service.ts`
- [Identity Access](https://github.com/aasimawshaikh/ecomsas/blob/main/apps/api-server/src/modules/iam/iam.service.ts): `apps/api-server/src/modules/iam/iam.service.ts`

### Shared Contracts

- [API Contracts](https://github.com/aasimawshaikh/ecomsas/tree/main/packages/contracts/src): `packages/contracts/src`

### Other components

- **Customer**

## Connections

- Customer → Customer Web: uses (evidence: `apps/web-customer/src/App.tsx`)
- Customer Web → Storefront Client: requests data (evidence: `apps/web-customer/src/App.tsx`)
- Customer Web → Commerce Engine: fetches storefront
- Customer Mobile → Mobile API Client: makes requests (evidence: `apps/mobile-customer/App.tsx`)
- Mobile API Client → Identity Access: refreshes session
- Commerce Routes → Commerce Controller: dispatches (evidence: `apps/api-server/src/modules/commerce-engine/commerceEngine.routes.ts`)
- Commerce Controller → Commerce Engine: calls (evidence: `apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts`)
- Commerce Controller → Model Operations: calls (evidence: `apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts`)
- Commerce Controller → Governance Service: calls (evidence: `apps/api-server/src/modules/commerce-engine/commerceEngine.controller.ts`)
- Commerce Engine → CMS: uses (evidence: `apps/api-server/src/modules/commerce-engine/commerceEngine.service.ts`)
- Rider Portal → Rider Client: requests data (evidence: `apps/web-rider/src/App.tsx`)
- Rider Client → Logistics Service: calls API
- Seller Mobile → Seller Mobile Client: makes requests (evidence: `apps/mobile-seller/App.tsx`)
- Logistics Controller → Logistics Service: calls (evidence: `apps/api-server/src/modules/logistics/logistics.controller.ts`)
- Partners Controller → Partners Service: calls (evidence: `apps/api-server/src/modules/partners/partners.controller.ts`)
- Admin Console → Finance: uses console
- Super Admin → Commerce Routes: configures platform
- Identity Access → API Contracts: uses types
