How meding2904/dzommercial works
Azahar is a modular commerce framework, not just the skincare demo: customers browse and order through the storefront, while staff manage the ledger, fulfilment, catalogue, brand and plugins in web or desktop admin. The backend owns API behaviour and persistent state; plugins supply trade-specific capabilities. The README documents major features whose implementation was not sampled, so those are represented at directory level. Edges are limited to relationships visible in excerpts or explicitly documented; unsampled internal call paths are not inferred.
Main entry points: httpapi HTTP API · registry.go Plugin registry · +server.ts Web API proxy · (store) Storefront pages
Components 25
Customer storefront
- Storefront pages
frontend/src/routes/(store) - PC builder page
frontend/src/routes/(store)/build-your-pc/+page.server.ts - Web API proxy
frontend/src/routes/api/[...path]/+server.ts
Commerce backend
- HTTP API
backend/internal/httpapi - Checkout and orders
backend/internal/httpapi/handlers_checkout.go - Catalogue management
backend/internal/httpapi/handlers_admin_products.go - Courier fulfilment
backend/internal/httpapi/handlers_shipping.go - Accounts and sessions
backend/internal/httpapi/handlers_auth.go - Storefront branding
backend/internal/storefront/theme.go
Staff administration
- Web admin
frontend/src/routes/admin/(panel) - Desktop admin
desktop/frontend/app.js - Desktop API client
desktop/internal/api/request.go - Plugin administration
frontend/src/lib/plugins/admin
Plugin capabilities
- Plugin registry
backend/internal/plugins/registry.go - Oil shelf
backend/internal/plugins/oils/oils.go - Phone catalog
backend/internal/plugins/phone/devices.go - PC parts and builder
backend/internal/plugins/pcbuilder - AI analyst
backend/internal/plugins/ai - Code mode
backend/internal/plugins/codemode
Runtime and persistence
- Database
backend/internal/db/db.go - Commerce state
backend/internal/store - Audit outbox
backend/internal/auditbatch/batcher.go
Other components
- Customer
- Courier service
- AI provider
Connections 25
- Customer → Storefront pages: browses and orders
- Storefront pages → Web API proxy: requests API
frontend/src/routes/(store)/+page.server.ts - PC builder page → Web API proxy: loads plugin parts
frontend/src/routes/(store)/build-your-pc/+page.server.ts - Web API proxy → HTTP API: forwards requests
frontend/src/routes/api/[...path]/+server.ts - HTTP API → Checkout and orders: routes checkout
- HTTP API → Catalogue management: routes catalogue
- HTTP API → Courier fulfilment: routes fulfilment
- HTTP API → Accounts and sessions: routes accounts
- Web admin → Web API proxy: uses web API
- Desktop admin → Desktop API client: calls bridge API
desktop/frontend/app.js - Desktop API client → HTTP API: calls same API
- Plugin administration → Web API proxy: configures plugins
- HTTP API → Plugin registry: uses registered plugins
- Plugin registry → Oil shelf: registers plugin
- Plugin registry → Phone catalog: registers plugin
- Plugin registry → PC parts and builder: registers plugins
- Plugin registry → AI analyst: registers plugin
- Plugin registry → Code mode: registers plugin
- HTTP API → Commerce state: reads and writes
backend/internal/httpapi/handlers_auth.go - Commerce state → Database: persists state
- HTTP API → Courier service: creates parcels
- AI analyst → AI provider: requests analysis
backend/internal/plugins/ai/client.go - Code mode → AI provider: requests plans
backend/internal/plugins/codemode/client.go - HTTP API → Storefront branding: manages shop design
- HTTP API → Audit outbox: records changes