How 534b64/shop_manager works
Shop Manager is a shop ERP/POS for customer accounts, job quoting and order tracking, inventory, payments, point-of-sale, invoices and returns, reporting, settings, and audit. The user workflow starts with sign-in, then role-gated pages call the Fastify API; domain routes perform business operations against SQLite and return data to the client. The graph includes documented major capabilities and sampled route-to-service dependencies. Unsampled subsystems are represented at their existing directories; edges are omitted where the supplied excerpts and README do not establish a relationship.
Main entry points: routes.tsx Page routing · app.ts Fastify API · edit.routes.ts Job management · service.ts Authentication
Components 25
Client experience
- Application shell
src/App.tsx - Page routing
src/routes.tsx - API and session
src/lib/api.ts - Dashboard
src/pages/dashboard - Customer accounts
src/modules/customers - Jobs and quotes
src/modules/jobs - Inventory workflows
src/modules/inventory - POS and drawer
src/modules/pos - Payments
src/modules/payments - Reports
src/pages/reports - Settings and audit
src/pages/settings
Shop operations
- Customer management
server/modules/customers/routes.ts - Job management
server/modules/jobs/edit.routes.ts - Inventory and counts
server/modules/inventory/cycle-counts.routes.ts - Materials
server/modules/materials/routes.ts
Sales and finance
- Sales and invoices
server/modules/sales/invoices.routes.ts - Payments and credit
server/modules/payments/routes.ts
API and governance
- Authentication
server/modules/auth/service.ts - Domain rules
shared/domain.ts - Audit trail
server/modules/audit/service.ts - Shop settings
server/modules/settings/service.ts - Fastify API
server/app.ts
Persistence
- SQLite database
server/db/index.ts - Domain schema
server/db/schema
Other components
- Shop user
Connections 39
- Shop user → Application shell: uses
src/App.tsx - Application shell → Page routing: renders
src/App.tsx - Application shell → API and session: checks session
src/App.tsx - Page routing → Dashboard: routes to
src/routes.tsx - Page routing → Customer accounts: routes to
src/routes.tsx - Page routing → Jobs and quotes: routes to
src/routes.tsx - Page routing → Inventory workflows: routes to
src/routes.tsx - Page routing → POS and drawer: routes to
src/routes.tsx - Page routing → Payments: routes to
src/routes.tsx - Page routing → Reports: routes to
src/routes.tsx - Page routing → Settings and audit: routes to
src/routes.tsx - Application shell → Authentication: refreshes session
src/App.tsx - API and session → Fastify API: sends API requests
- Fastify API → Authentication: registers routes
server/app.ts - Fastify API → Customer management: registers routes
server/app.ts - Fastify API → Job management: registers routes
server/app.ts - Fastify API → Inventory and counts: registers routes
server/app.ts - Fastify API → Materials: registers routes
server/app.ts - Fastify API → Payments and credit: registers routes
server/app.ts - Fastify API → Sales and invoices: registers routes
server/app.ts - Customer management → SQLite database: reads and writes
server/modules/customers/routes.ts - Job management → SQLite database: reads and writes
server/modules/jobs/edit.routes.ts - Inventory and counts → SQLite database: reads and writes
server/modules/inventory/cycle-counts.routes.ts - Payments and credit → SQLite database: reads and writes
server/modules/payments/routes.ts - Sales and invoices → Payments and credit: records refunds
server/modules/sales/invoices.routes.ts - Customer management → Payments and credit: reads credit balance
server/modules/customers/routes.ts - Job management → Sales and invoices: checks invoice
server/modules/jobs/edit.routes.ts - Job management → Payments and credit: checks payments
server/modules/jobs/edit.routes.ts - Job management → Authentication: requires approval
server/modules/jobs/edit.routes.ts - Customer management → Authentication: requires approval
server/modules/customers/routes.ts - Payments and credit → Authentication: requires approval
server/modules/payments/routes.ts - Inventory and counts → Authentication: requires approval
server/modules/inventory/cycle-counts.routes.ts - Sales and invoices → Authentication: requires approval
server/modules/sales/invoices.routes.ts - Customer management → Audit trail: records changes
server/modules/customers/routes.ts - Job management → Audit trail: records changes
server/modules/jobs/edit.routes.ts - Fastify API → SQLite database: runs migrations
server/app.ts - SQLite database → Domain schema: uses schema
server/db/index.ts - Inventory and counts → Domain rules: uses domain rules
server/modules/inventory/cycle-counts.routes.ts - Sales and invoices → Domain rules: uses invoice rules
server/modules/sales/invoices.routes.ts