How jushazen/bentatrack works
Bentatrack is a browser-based retail inventory and point-of-sale application. A cashier searches or scans products, builds a cart, and records a sale; sales, refunds, and restocks can be queued locally and synced to the server. The broader product includes catalog and stock management, reporting, supplier and category administration, and staff access controls. The graph follows documented imports and the sampled offline-sync/API path; several unsampled feature connections are intentionally not asserted.
Main entry points: checkout-form.tsx Checkout form · route.ts Sync endpoint · page.tsx Dashboard · sync.ts Offline sync
Components 23
App interface
Sales and refunds
- Checkout form
src/features/sales/checkout-form.tsx - Sales cart
src/features/sales/cart.ts - Sale actions
src/features/sales/actions.ts - Sales history
src/features/sales/queries.ts - Refunds
src/features/refunds/actions.ts - Refund records
src/features/refunds/queries.ts
Catalog and stock
- Product search
src/features/search/product-search.tsx - Product lookup
src/features/search/queries.ts - Product management
src/features/products/actions.ts - Inventory management
src/features/inventory/actions.ts - Stock history
src/features/inventory/history-list.tsx
Business operations
- Categories
src/features/categories/actions.ts - Suppliers
src/features/suppliers/actions.ts - Reports
src/features/reports/queries.ts - Staff management
src/features/users/actions.ts
Identity and offline
- Authentication
src/lib/auth.ts - Role permissions
src/lib/permissions.ts - Offline sync
src/lib/offline/sync.ts - Command outbox
src/lib/offline/outbox.ts - Sync endpoint
src/app/api/sync/route.ts
Other components
- Cashier
Connections 14
- Cashier → Checkout form: uses
- Checkout form → Product search: searches
src/features/sales/checkout-form.tsx - Checkout form → Sales cart: uses
src/features/sales/checkout-form.tsx - Product search → Product lookup: looks up
src/features/search/product-search.tsx - Checkout form → Offline sync: submits commands
src/features/sales/checkout-form.tsx - Offline sync → Command outbox: queues and replays
src/lib/offline/sync.ts - Offline sync → Sync endpoint: sends commands
src/lib/offline/sync.ts - Sync endpoint → Sale actions: dispatches sales
src/app/api/sync/route.ts - Sync endpoint → Refunds: dispatches refunds
src/app/api/sync/route.ts - Sync endpoint → Inventory management: dispatches restocks
src/app/api/sync/route.ts - Authentication → Role permissions: checks roles
src/lib/auth.ts - Dashboard → App shell: renders within
- Dashboard → Sales history: summarizes sales
- Dashboard → Product management: shows stock status