How coderhoper/bolt works
Hardware Business Manager is a multi-tenant business operations app. Users enter a tenant workspace, authenticate, and reach role-aware inventory, sales, purchasing/receiving, staff, and reporting screens. The repository also includes a separate platform-owner control plane for tenant provisioning and support, plus payment and inbound-document integrations. The main app routing and tenant bootstrap are excerpted; several domain screens and integrations are represented by README capabilities or filenames, so their internal call paths are not asserted.
Main entry points: App.tsx App router · TenantBootstrap.tsx Tenant bootstrap · index.ts Document processor · OwnerOperations.tsx Owner operations
Components 26
Tenant workspace
- Tenant bootstrap
project/src/TenantBootstrap.tsx - App router
project/src/App.tsx - Authentication
project/src/context/AuthContext.tsx - Tenant Supabase client
project/src/lib/supabase.ts
Business operations
- Inventory and products
project/src/pages/Products.tsx - Stock movements
project/src/pages/StockMovements.tsx - Sales
project/src/pages/Sales.tsx - Purchases and suppliers
project/src/pages/Purchases.tsx - Receiving documents
project/src/pages/Receiving.tsx - Automation
project/src/pages/Automation.tsx
Finance and oversight
- Dashboard
project/src/pages/Dashboard.tsx - Finance and reports
project/src/pages/Reports.tsx - Employees and salaries
project/src/pages/Employees.tsx - Audit logs
project/src/pages/AuditLogs.tsx
Platform control plane
- Owner console
project/src/owner/OwnerConsole.tsx - Owner operations
project/src/owner/OwnerOperations.tsx - Tenant provisioning
project/supabase-owner/supabase/functions/owner-provisioning/index.ts - Tenant migrations
project/supabase-owner/supabase/functions/owner-provisioning/tenantMigrations.ts - Tenant support bridge
project/supabase-owner/supabase/functions/tenant-bridge/index.ts
External integrations
- Payment gateway
project/supabase/functions/payment-gateway/index.ts - Document processor
project/supabase/functions/process-receiving-document/index.ts - WhatsApp webhook
project/supabase/functions/whatsapp-webhook/index.ts - Supabase services
- Azure Document Intelligence
- OpenAI
Other components
- Business user
Connections 26
- Business user → Tenant bootstrap: opens tenant
- Tenant bootstrap → Supabase services: resolves tenant
project/src/TenantBootstrap.tsx - Tenant bootstrap → Tenant Supabase client: sets connection
project/src/TenantBootstrap.tsx - Tenant bootstrap → App router: renders app
project/src/TenantBootstrap.tsx - App router → Authentication: provides auth
project/src/App.tsx - Authentication → Tenant Supabase client: authenticates through
project/src/context/AuthContext.tsx - App router → Inventory and products: routes to
project/src/App.tsx - App router → Stock movements: routes to
project/src/App.tsx - App router → Sales: routes to
project/src/App.tsx - App router → Purchases and suppliers: routes to
project/src/App.tsx - App router → Receiving documents: routes to
project/src/App.tsx - App router → Automation: routes to
project/src/App.tsx - App router → Dashboard: routes to
project/src/App.tsx - App router → Finance and reports: routes to
project/src/App.tsx - App router → Employees and salaries: routes to
project/src/App.tsx - App router → Audit logs: routes to
project/src/App.tsx - Tenant provisioning → Tenant migrations: loads migrations
project/supabase-owner/supabase/functions/owner-provisioning/index.ts - Tenant provisioning → Supabase services: configures tenant
- Owner console → Owner operations: delegates operations
- Owner operations → Tenant provisioning: requests provisioning
- Owner operations → Tenant support bridge: uses support bridge
- Sales → Payment gateway: initiates payment
- Receiving documents → Document processor: submits document
- WhatsApp webhook → Document processor: processes inbound document
- Document processor → Azure Document Intelligence: scans document
project/supabase/functions/process-receiving-document/index.ts - Document processor → OpenAI: extracts fields
project/supabase/functions/process-receiving-document/index.ts