16 — Business Center
CEO Summary
The Business Center is a unified dashboard that aggregates analytics, payments status, operations, transaction tracking, reports, and people (staff/customer) analytics. It provides owners and managers a single place to see business health. Business value: Operational visibility, faster decision-making. Key metrics: Revenue, transaction count, staff/customer counts. If this breaks: Dashboard views fail; data remains in DB but not aggregated.
Architecture
What Business Center does not configure
The Business Hub UI (including its in-page settings search) is aimed at operational visibility — analytics, payment method status, transaction summaries, integrations, and similar. It does not replace Admin → Device management → Device registry (/admin/devices/manager) for register-level options such as Devices.metadata.posModules (e.g. enabling the forecourt / fuel panel on Modern POS). For those, use the device editor or raw metadata as documented in 13 — Bridge & Devices and 06 — POS & Invoicing. The main Admin home search (/admin) can surface “Device registry” via keywords when looking for fuel-related setup.
Overview
Base path: /api/business-hub
Route file: backend/routes/business-hub.routes.js
Auth: requireSessionAuth, tenantResolver
Frontend: /business-hub (roleConfig path)
Hub Endpoints
| Endpoint | Purpose |
|---|---|
| GET /status | Business name, tenant slug, plan, feature flags (pos, kiosk, analytics, inventory, staff, crypto) |
| GET /analytics-hub/metrics | Real-time analytics: revenue, transactions, payment method breakdown, time-series (today/week/month) |
| GET /payment-hub/status | Payment methods available: cash, card, dogecoin, litecoin, giftcard; Stripe/crypto status |
| GET /operations-hub/status | Offline queue, multi-tenant isolation status |
| GET /integration-hub/status | Webhooks, API keys status |
| GET /transaction-hub/overview | Transaction counts, success rate, failed/pending (last N hours) |
| GET /reports-hub/summary | Sales, profit, inventory, transactions by period (today/week/month/year) |
| GET /people-hub/analytics | Staff count, customer count |
Timeclock (HR)
Timeclock is part of HR, not Business Hub. See 10 — HR & Payroll.
| Route | Purpose |
|---|---|
| POST /api/hr/timeclock/clock-in | Clock in |
| POST /api/hr/timeclock/clock-out | Clock out |
| POST /api/hr/timeclock/break-start | Start break |
| POST /api/hr/timeclock/break-end | End break |
| POST /api/tenant-time/punch | Toggle clock in/out (staff) |
| GET /api/tenant-time/status | Current clock status (clocked in/out) |
| GET /api/tenant-time/roster | Team roster with clock status (managers) |
| POST /api/tenant-time/clock-out-staff/:staffId | Manager clock out a staff member |
Data: Timesheets table — staff_id, clock_in_at, clock_out_at, status
Feature Flags
buildFeatureFlags(plan) — Returns pos, kiosk, analytics, inventory, staff, crypto based on tenant plan (planFeatures.js).
Data Sources
Analytics, reports, people hub query tenant main DB: Invoices, Staff. Timeframe params: today, week, month, year.
Auditing & Tracking
The Business Center is the primary surface for auditing and tracking business operations. It aggregates data from multiple systems and surfaces it for compliance, dispute resolution, and operational visibility.
Audit Integration
Reporting Service (reporting.service.js) pulls audit data for Business Center reports:
- Financial audit: AuditService.getFinancialAuditSummaryWithTenantContext — payment, refund, revenue events
- Operational audit: AuditService.getAuditSummaryByEventTypeWithTenantContext — system activity by event type
- Transaction audit: POST /api/reports/transaction-audit — employee actions and transactions
See 20 — Audit for full audit schema and endpoints.
Transaction Tracking
Transaction Hub (/transaction-hub/overview) provides:
| Metric | Source |
|---|---|
| Total transactions | Invoices (last N hours) |
| Success rate | paid / total |
| Failed / pending | status = failed, pending |
Void/refund audit trails: VoidAuditLog, RefundAuditLog (transactions.routes).
Integration Hub
/integration-hub/status — webhooks active count, API keys status. Used for operational visibility and compliance (who has API access).
What Business Center Hooks Into
| System | Connection |
|---|---|
| Invoices | Revenue, transactions, payment method breakdown |
| Staff | People hub — staff count |
| Customers | People hub — customer count (from Invoices.customer_id) |
| Audit | Reports — financial, operational, transaction audit |
| Payments | Payment hub — Stripe, crypto, gift card status |
| HR / Timeclock | Timeclock routes — roster, punch status |
Compliance & Forensics
For auditing and tracking purposes, Business Center surfaces:
- Revenue and transaction counts by period
- Payment method breakdown (cash, card, crypto, gift card)
- Transaction success/failure rates
- Staff and customer analytics
- Integration status (webhooks, API keys)
Deep audit logs (who did what, when) are in 20 — Audit. Reports Hub and Transaction Hub aggregate that data for Business Center dashboards.