22 · Business Hub & reports
Owner-facing operational hub and sales/ops report tree — and the important split between main DB live reports and analytics DB services.
Business Hub (per-tenant owner ops)
Not Master Admin. Tenant owner/manager operational dashboard.
| UI | Status |
|---|---|
/business-hub BusinessHubDashboard | Live |
/business-hub/payment-hub | Live |
| analytics-hub · operations-hub · integration-hub routes | Some App placeholders — API may still exist |
API /api/business-hub
| Path | Purpose |
|---|---|
GET /status | Plan / feature flags snapshot |
GET /analytics-hub/metrics | Revenue / transactions style metrics |
GET /payment-hub/status | Payment methods live (cash/card/crypto/gift…) |
GET /operations-hub/status | Offline queue / isolation health-ish |
GET /integration-hub/status | Webhooks / API key status |
GET /transaction-hub/overview | Success/fail rates |
GET /reports-hub/summary | Report summary |
GET /people-hub/analytics | Staff/customer counts style |
Also aggregates audit visibility for owners (ties to audit taxonomy / analytics DB logs).
Reports UI
| Path | Report |
|---|---|
/reports/sales/summary | Sales summary |
…/items · trends · categories · teams | Breakdowns |
…/modifiers · gift-cards · vendors | More sales cuts |
/inventory/reports/* | COGS, aging, sell-through, projected profit |
| Ops reports (API) | activity, labor, kitchen — UI may vary |
Dashboard home also pulls report/dashboard endpoints.
Reports API (sample)
/api/reports (+ alias /reports) · session + tenant
/sales/summary|items|trends|categories|teams|modifiers|gift-cards|vendors/payments/*methods, voids, cash-drawers, …/accounting/*taxes, fees, reconciliation/operations/*activity, labor, kitchen/inventory/*cogs, aging, …
Also: /api/dashboard, /api/pos-analytics, /api/customer-analytics, salesAnalytics services.
Data plane caution
flowchart LR MAIN[(tenant main DB
live operational queries)] ANAL[(dev-analytics-slug
audit · analytics services)] R1[reports.sales.controller
often main] R2[salesAnalytics / posAnalytics
analytics connection] MAIN --> R1 ANAL --> R2 R1 -.->|may disagree| R2
Audit finding S8-3
Two reporting paths exist without a fully documented reconciliation story.
Side-by-side “today’s sales” on hub vs reports UI can theoretically diverge if analytics is delayed.
Verify with real numbers before trusting both screens as identical truth.
Gaps
- Some Business Hub sub-routes still Placeholder in App.jsx while APIs exist
- Payment methods report route may still be placeholder UI
- Virtual terminal placeholder
- Parallel dashboard route files (NEW/simple/OLD history)
File anchors
| Concern | Path |
|---|---|
| Business hub API | business-hub.routes.js |
| Hub UI | pages/business-hub/* |
| Reports API | reports.routes.js · controllers/reports.* |
| Reports UI | pages/reports/** |
| Analytics services | salesAnalytics · posAnalytics · customerAnalytics |
| OAO | 12 Business Analytics · 16 business-center HTML |