16 — Business Center

Unified hub: analytics, payments, operations, timeclock, reports

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

flowchart TB subgraph frontend [Frontend] BusinessHub[Business Hub UI] end subgraph api [API] Status[status] Analytics[analytics-hub] Payment[payment-hub] Ops[operations-hub] Tx[transaction-hub] Reports[reports-hub] People[people-hub] end subgraph db [Tenant DB] Invoices[(Invoices)] Staff[(Staff)] end BusinessHub --> Status BusinessHub --> Analytics BusinessHub --> Payment BusinessHub --> Ops BusinessHub --> Tx BusinessHub --> Reports BusinessHub --> People Analytics --> Invoices Reports --> Invoices People --> Staff People --> Invoices

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

EndpointPurpose
GET /statusBusiness name, tenant slug, plan, feature flags (pos, kiosk, analytics, inventory, staff, crypto)
GET /analytics-hub/metricsReal-time analytics: revenue, transactions, payment method breakdown, time-series (today/week/month)
GET /payment-hub/statusPayment methods available: cash, card, dogecoin, litecoin, giftcard; Stripe/crypto status
GET /operations-hub/statusOffline queue, multi-tenant isolation status
GET /integration-hub/statusWebhooks, API keys status
GET /transaction-hub/overviewTransaction counts, success rate, failed/pending (last N hours)
GET /reports-hub/summarySales, profit, inventory, transactions by period (today/week/month/year)
GET /people-hub/analyticsStaff count, customer count

Timeclock (HR)

Timeclock is part of HR, not Business Hub. See 10 — HR & Payroll.

RoutePurpose
POST /api/hr/timeclock/clock-inClock in
POST /api/hr/timeclock/clock-outClock out
POST /api/hr/timeclock/break-startStart break
POST /api/hr/timeclock/break-endEnd break
POST /api/tenant-time/punchToggle clock in/out (staff)
GET /api/tenant-time/statusCurrent clock status (clocked in/out)
GET /api/tenant-time/rosterTeam roster with clock status (managers)
POST /api/tenant-time/clock-out-staff/:staffIdManager 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:

See 20 — Audit for full audit schema and endpoints.

Transaction Tracking

Transaction Hub (/transaction-hub/overview) provides:

MetricSource
Total transactionsInvoices (last N hours)
Success ratepaid / total
Failed / pendingstatus = 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

SystemConnection
InvoicesRevenue, transactions, payment method breakdown
StaffPeople hub — staff count
CustomersPeople hub — customer count (from Invoices.customer_id)
AuditReports — financial, operational, transaction audit
PaymentsPayment hub — Stripe, crypto, gift card status
HR / TimeclockTimeclock routes — roster, punch status

Compliance & Forensics

For auditing and tracking purposes, Business Center surfaces:

Deep audit logs (who did what, when) are in 20 — Audit. Reports Hub and Transaction Hub aggregate that data for Business Center dashboards.