# starq-technologies-pvt-ltd/hoadhaa architecture

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

- Interactive diagram: https://gitdiagram.com/starq-technologies-pvt-ltd/hoadhaa
- Repository: https://github.com/starq-technologies-pvt-ltd/hoadhaa

## Overview

Hoadhaa is a unified commerce platform for discovering reachable goods and services across Maldivian islands, then engaging with storefronts, sourcing/RFQ, messages, orders and commercial memory. Its main user flow starts in the client application: search requirements are resolved into possibilities and catalog results, then presented through storefront and spatial views. The repository also documents a commercial domain kernel, graph/search infrastructure and a separate web command center. Some pipeline and command-center wiring is unsampled, so those links are omitted where evidence is absent.

Main entry points: [`src/App.tsx`](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/App.tsx) (Hoadhaa app), [`commercial-core/adapters/storefront_projection_adapter.ts`](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/adapters/storefront_projection_adapter.ts) (Storefront projection), [`infrastructure/supabase`](https://github.com/starq-technologies-pvt-ltd/hoadhaa/tree/main/infrastructure/supabase) (Commercial graph), [`src/components/UniversalSearchModal.tsx`](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/UniversalSearchModal.tsx) (Universal search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Commerce client"]
  node_app["Hoadhaa app<br/>[App.tsx]"]
  node_search["Universal search"]
  node_possibilities["Possibility resolver"]
  node_storefront_view["Storefront shell"]
  node_outlet_map["Outlet map"]
  node_search_results["Search results"]
  node_product_discovery["Product discovery"]
  node_living_feed["Living feed<br/>[LivingFeedView.tsx]"]
  node_services["Services<br/>[ServicesView.tsx]"]
  node_sourcing["Sourcing RFQ"]
  node_messages["Messages RFQ"]
  node_orders["Orders and movement"]
  node_memory["Commercial memory"]
end

subgraph group_kernel["Commercial kernel"]
  node_catalog["Catalog discovery"]
  node_possibility_engine["Possibility engine"]
  node_storefront_projection["Storefront projection"]
  node_brand_registry[("Business registry<br/>[business_brand.ts]")]
  node_slug_resolver["Slug resolution<br/>[slug_resolver.ts]"]
  node_publication_gate["Publication gate"]
  node_spatial_policy["Spatial publication"]
  node_core_models["Commercial primitives<br/>[primitives.ts]"]
  node_dca["Commitment algebra<br/>[dca_engine.ts]"]
  node_cdst["State transitions<br/>[cdst_topology.ts]"]
end

subgraph group_infra["Discovery infrastructure"]
  node_pipeline["Discovery pipeline"]
  node_search_function["Search function<br/>[handler.ts]"]
  node_map_tiles["Map tiles<br/>[index.ts]"]
  node_graph_store[("Commercial graph")]
end

subgraph group_command["Command center"]
  node_command_center["Command center<br/>[cockpit.tsx]"]
end

node_shopper(("Shopper"))
node_operations_systems["Private ERP/POS"]

node_shopper -->|"uses"| node_app
node_app -->|"opens"| node_search
node_app -->|"renders"| node_storefront_view
node_app -->|"presents"| node_living_feed
node_app -->|"presents"| node_services
node_app -->|"presents"| node_sourcing
node_app -->|"presents"| node_messages
node_app -->|"presents"| node_orders
node_app -->|"presents"| node_memory
node_search -->|"resolves query"| node_possibilities
node_search -->|"discovers catalog"| node_catalog
node_search -->|"renders results"| node_search_results
node_possibilities -->|"evaluates"| node_core_models
node_possibilities -.->|"reads corpus"| node_graph_store
node_catalog -->|"projects storefronts"| node_storefront_projection
node_catalog -->|"gates availability"| node_publication_gate
node_storefront_view -->|"displays projection"| node_storefront_projection
node_storefront_view -->|"renders map"| node_outlet_map
node_storefront_view -->|"shows products"| node_product_discovery
node_storefront_projection -->|"reads brands"| node_brand_registry
node_storefront_projection -->|"validates slugs"| node_slug_resolver
node_storefront_projection -->|"filters locations"| node_spatial_policy
node_slug_resolver -->|"resolves aliases"| node_brand_registry
node_publication_gate -->|"redacts telemetry"| node_operations_systems
node_publication_gate -->|"publishes safe facts"| node_shopper
node_spatial_policy -->|"applies policy"| node_publication_gate
node_pipeline -.->|"ingests discoveries"| node_graph_store
node_search_function -.->|"queries graph"| node_graph_store
node_map_tiles -.->|"serves spatial data"| node_graph_store
node_core_models -->|"defines commitments"| node_dca
node_core_models -->|"defines states"| node_cdst
node_command_center -.->|"operates platform"| node_graph_store

click node_app "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/App.tsx"
click node_search "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/UniversalSearchModal.tsx"
click node_possibilities "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/data/commercialPossibilityResolver.ts"
click node_catalog "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/adapters/catalog_discovery_adapter.ts"
click node_possibility_engine "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/possibility/possibility_engine.ts"
click node_storefront_view "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/BusinessStorefrontShell.tsx"
click node_storefront_projection "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/adapters/storefront_projection_adapter.ts"
click node_brand_registry "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/model/business_brand.ts"
click node_slug_resolver "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/resolve/slug_resolver.ts"
click node_publication_gate "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/publication/publication_gate.ts"
click node_spatial_policy "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/publication/spatial_publication_policy.ts"
click node_outlet_map "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/BusinessOutletsMapSurface.tsx"
click node_search_results "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/SearchResultsSections.tsx"
click node_product_discovery "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/ProductDiscoverySurface.tsx"
click node_living_feed "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/LivingFeedView.tsx"
click node_services "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/ServicesView.tsx"
click node_sourcing "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/SourcingRfqView.tsx"
click node_messages "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/MessagesRfqView.tsx"
click node_orders "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/OrdersMovementView.tsx"
click node_memory "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/CommercialMemoryView.tsx"
click node_core_models "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/model/primitives.ts"
click node_dca "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/transaction/dca_engine.ts"
click node_cdst "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/transitions/cdst_topology.ts"
click node_pipeline "https://github.com/starq-technologies-pvt-ltd/hoadhaa/tree/main/infrastructure/pipeline"
click node_search_function "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/infrastructure/supabase/functions/search/handler.ts"
click node_map_tiles "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/infrastructure/supabase/functions/map-tiles/index.ts"
click node_graph_store "https://github.com/starq-technologies-pvt-ltd/hoadhaa/tree/main/infrastructure/supabase"
click node_command_center "https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/web-command-center/src/routes/cockpit.tsx"

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_app,node_search,node_possibilities,node_storefront_view,node_outlet_map,node_search_results,node_product_discovery,node_living_feed,node_services,node_sourcing,node_messages,node_orders,node_memory toneBlue
class node_catalog,node_possibility_engine,node_storefront_projection,node_brand_registry,node_slug_resolver,node_publication_gate,node_spatial_policy,node_core_models,node_dca,node_cdst toneAmber
class node_pipeline,node_search_function,node_map_tiles,node_graph_store toneMint
class node_command_center toneRose
class node_shopper,node_operations_systems toneIndigo
```

## Components

### Commerce client

- [Hoadhaa app](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/App.tsx): `src/App.tsx`
- [Universal search](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/UniversalSearchModal.tsx): `src/components/UniversalSearchModal.tsx`
- [Possibility resolver](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/data/commercialPossibilityResolver.ts): `src/data/commercialPossibilityResolver.ts`
- [Storefront shell](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/BusinessStorefrontShell.tsx): `src/components/storefront/BusinessStorefrontShell.tsx`
- [Outlet map](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/BusinessOutletsMapSurface.tsx): `src/components/storefront/BusinessOutletsMapSurface.tsx`
- [Search results](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/SearchResultsSections.tsx): `src/components/storefront/SearchResultsSections.tsx`
- [Product discovery](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/components/storefront/ProductDiscoverySurface.tsx): `src/components/storefront/ProductDiscoverySurface.tsx`
- [Living feed](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/LivingFeedView.tsx): `src/views/LivingFeedView.tsx`
- [Services](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/ServicesView.tsx): `src/views/ServicesView.tsx`
- [Sourcing RFQ](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/SourcingRfqView.tsx): `src/views/SourcingRfqView.tsx`
- [Messages RFQ](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/MessagesRfqView.tsx): `src/views/MessagesRfqView.tsx`
- [Orders and movement](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/OrdersMovementView.tsx): `src/views/OrdersMovementView.tsx`
- [Commercial memory](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/src/views/CommercialMemoryView.tsx): `src/views/CommercialMemoryView.tsx`

### Commercial kernel

- [Catalog discovery](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/adapters/catalog_discovery_adapter.ts): `commercial-core/adapters/catalog_discovery_adapter.ts`
- [Possibility engine](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/possibility/possibility_engine.ts): `commercial-core/possibility/possibility_engine.ts`
- [Storefront projection](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/adapters/storefront_projection_adapter.ts): `commercial-core/adapters/storefront_projection_adapter.ts`
- [Business registry](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/model/business_brand.ts): `commercial-core/model/business_brand.ts`
- [Slug resolution](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/resolve/slug_resolver.ts): `commercial-core/resolve/slug_resolver.ts`
- [Publication gate](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/publication/publication_gate.ts): `commercial-core/publication/publication_gate.ts`
- [Spatial publication](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/publication/spatial_publication_policy.ts): `commercial-core/publication/spatial_publication_policy.ts`
- [Commercial primitives](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/model/primitives.ts): `commercial-core/model/primitives.ts`
- [Commitment algebra](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/transaction/dca_engine.ts): `commercial-core/transaction/dca_engine.ts`
- [State transitions](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/commercial-core/transitions/cdst_topology.ts): `commercial-core/transitions/cdst_topology.ts`

### Discovery infrastructure

- [Discovery pipeline](https://github.com/starq-technologies-pvt-ltd/hoadhaa/tree/main/infrastructure/pipeline): `infrastructure/pipeline`
- [Search function](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/infrastructure/supabase/functions/search/handler.ts): `infrastructure/supabase/functions/search/handler.ts`
- [Map tiles](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/infrastructure/supabase/functions/map-tiles/index.ts): `infrastructure/supabase/functions/map-tiles/index.ts`
- [Commercial graph](https://github.com/starq-technologies-pvt-ltd/hoadhaa/tree/main/infrastructure/supabase): `infrastructure/supabase`

### Command center

- [Command center](https://github.com/starq-technologies-pvt-ltd/hoadhaa/blob/main/web-command-center/src/routes/cockpit.tsx): `web-command-center/src/routes/cockpit.tsx`

### Other components

- **Shopper**
- **Private ERP/POS**

## Connections

- Shopper → Hoadhaa app: uses (evidence: `README.md`)
- Hoadhaa app → Universal search: opens (evidence: `src/App.tsx`)
- Hoadhaa app → Storefront shell: renders (evidence: `src/App.tsx`)
- Hoadhaa app → Living feed: presents (evidence: `src/App.tsx`)
- Hoadhaa app → Services: presents (evidence: `src/App.tsx`)
- Hoadhaa app → Sourcing RFQ: presents (evidence: `README.md`)
- Hoadhaa app → Messages RFQ: presents (evidence: `src/App.tsx`)
- Hoadhaa app → Orders and movement: presents (evidence: `README.md`)
- Hoadhaa app → Commercial memory: presents (evidence: `README.md`)
- Universal search → Possibility resolver: resolves query (evidence: `src/components/UniversalSearchModal.tsx`)
- Universal search → Catalog discovery: discovers catalog (evidence: `src/components/UniversalSearchModal.tsx`)
- Universal search → Search results: renders results (evidence: `src/components/UniversalSearchModal.tsx`)
- Possibility resolver → Commercial primitives: evaluates
- Possibility resolver → Commercial graph: reads corpus
- Catalog discovery → Storefront projection: projects storefronts (evidence: `commercial-core/adapters/catalog_discovery_adapter.ts`)
- Catalog discovery → Publication gate: gates availability (evidence: `commercial-core/adapters/catalog_discovery_adapter.ts`)
- Storefront shell → Storefront projection: displays projection (evidence: `architecture/proofs/graph_identity_architectural_proof.ts`)
- Storefront shell → Outlet map: renders map (evidence: `src/components/storefront/BusinessStorefrontShell.tsx`)
- Storefront shell → Product discovery: shows products (evidence: `README.md`)
- Storefront projection → Business registry: reads brands (evidence: `commercial-core/adapters/storefront_projection_adapter.ts`)
- Storefront projection → Slug resolution: validates slugs (evidence: `commercial-core/adapters/storefront_projection_adapter.ts`)
- Storefront projection → Spatial publication: filters locations (evidence: `commercial-core/adapters/storefront_projection_adapter.ts`)
- Slug resolution → Business registry: resolves aliases (evidence: `commercial-core/resolve/slug_resolver.ts`)
- Publication gate → Private ERP/POS: redacts telemetry (evidence: `README.md`)
- Publication gate → Shopper: publishes safe facts (evidence: `README.md`)
- Spatial publication → Publication gate: applies policy (evidence: `commercial-core/publication/spatial_publication_policy.ts`)
- Discovery pipeline → Commercial graph: ingests discoveries
- Search function → Commercial graph: queries graph
- Map tiles → Commercial graph: serves spatial data
- Commercial primitives → Commitment algebra: defines commitments (evidence: `commercial-core/transaction/dca_engine.ts`)
- Commercial primitives → State transitions: defines states (evidence: `commercial-core/transitions/cdst_topology.ts`)
- Command center → Commercial graph: operates platform
