How hdng-ai/sales-portal works
Sales Portal is a multi-tenant Nuxt storefront: hostname and market context select a merchant’s configuration, then shoppers browse, search, configure products, and purchase; authenticated business users also manage portal data. The graph preserves the documented CMS, tenant, and commerce branches. It shows the search page’s observed API calls and otherwise uses the documented API/service architecture; unsampled route-to-service wiring is therefore represented only at the subsystem level.
Main entry points: index.ts Service Layer · checkout Cart and Checkout UI · [query].vue Catalog and Search · portal Business Portal
Components 28
Tenant Platform
- Tenant Context
server/middleware/00.locale-market.ts - Tenant Setup
server/plugins/02.tenant-context.ts - Tenant Configuration
server/services/tenant-config.ts - Tenant Resolution
server/utils/tenant.ts - Service Layer
server/services/index.ts
Storefront Experience
- Storefront Routes
app/pages - Catalog and Search
app/pages/s/[query].vue - Product APIs
server/api/product-lists - Search API
server/api/search/products.get.ts - Catalog Services
server/services/product-lists.ts - Search Service
server/services/search.ts
Commerce Operations
- Cart and Checkout UI
app/components/checkout - Cart State
app/stores/cart.ts - Cart APIs
server/api/cart - Checkout APIs
server/api/checkout - Commerce Services
server/services/checkout.ts - Authentication
server/api/auth
Content and Business Portal
- CMS Experience
app/components/cms - CMS APIs
server/api/cms - CMS Service
server/services/cms.ts - Preview Listener
app/plugins/cms-preview-listener.client.ts - Business Portal
app/pages/portal - Portal APIs
server/api/portal/company.get.ts - Orders and Quotes
server/services/orders.ts
Other components
- Shopper
- Business User
- CMS Studio
- Geins Platform
Connections 25
- Shopper → Storefront Routes: browses
- Business User → Business Portal: manages account
- CMS Studio → Preview Listener: sends preview events
- Tenant Context → Tenant Resolution: resolves tenant
- Tenant Setup → Tenant Configuration: loads settings
- Tenant Resolution → Tenant Configuration: reads configuration
- Storefront Routes → Catalog and Search: renders routes
- Catalog and Search → Search API: fetches products
- Catalog and Search → Product APIs: fetches filters
- Search API → Search Service: dispatches search
- Product APIs → Catalog Services: dispatches listing
- Cart and Checkout UI → Cart State: updates cart
- Cart and Checkout UI → Cart APIs: requests cart
- Cart and Checkout UI → Checkout APIs: submits checkout
- Cart APIs → Service Layer: uses services
- Checkout APIs → Service Layer: uses services
- Service Layer → Commerce Services: exports checkout
- Commerce Services → Geins Platform: uses commerce platform
- Authentication → Service Layer: uses services
- CMS Experience → CMS APIs: requests content
- CMS APIs → CMS Service: dispatches content
- CMS Service → Geins Platform: loads CMS data
- Business Portal → Portal APIs: requests company data
- Business Portal → Orders and Quotes: supports order workflows
- Orders and Quotes → Geins Platform: uses commerce platform