How raaj-4320/stockflow-testing works
This is StockFlow, a browser-based retail inventory and business-management ERP. Staff authenticate, enter an admin or operator role, then use operational screens for sales, purchasing, customers, inventory, and finance; screens work with shared application state and supporting ledger, reporting, and integration services. The tree shows additional Telegram, WhatsApp, analytics, and export capabilities. The README is empty, and several major screens and storage modules were not excerpted, so those branches are represented without asserting undocumented call sequences.
Main entry points: storage.ts Shared application state · App.tsx App shell · RoleLoginModal.tsx Role login · roleSession.tsx Role session
Components 21
Access and shell
- App shell
App.tsx - Account authentication
services/auth.ts - Role login
components/auth/RoleLoginModal.tsx - Role session
src/auth/roleSession.tsx - Permission rules
src/auth/simplePermissions.ts
Store operations
- Inventory admin
pages/Admin.tsx - Sales
pages/Sales.tsx - Purchasing
pages/PurchasePanel.tsx - Customer management
pages/Customers.tsx - Customer account view
pages/CustomerView.tsx - Transactions
pages/Transactions.tsx
Finance and records
- Shared application state
services/storage.ts - Finance and cashbook
pages/Finance.tsx - Customer balances
services/customerBalanceView.ts - Reports and analytics
pages/Reports.tsx - Invoice and PDF output
services/pdf.ts
Messaging integrations
- Telegram publishing
services/telegram.ts - Telegram posts
pages/TelegramPosts.tsx - WhatsApp sharing
services/whatsappShare.ts - WhatsApp logs
pages/WhatsAppLogs.tsx
Other components
- Store staff
Connections 19
- Store staff → App shell: uses
App.tsx - App shell → Account authentication: loads session
App.tsx - App shell → Shared application state: loads state
App.tsx - App shell → Customer balances: calculates dues
App.tsx - App shell → Role login: presents login
App.tsx - Role login → Shared application state: reads operators
components/auth/RoleLoginModal.tsx - Role login → Role session: sets role
- Role session → Permission rules: stores access
src/auth/roleSession.tsx - Role session → Shared application state: loads profile
src/auth/roleSession.tsx - Finance and cashbook → Shared application state: reads and writes
pages/Finance.tsx - Customer balances → Shared application state: reads transactions
- Purchasing → Shared application state: uses shared state
pages/PurchasePanel.tsx - Inventory admin → Shared application state: uses shared state
pages/Admin.tsx - Sales → Shared application state: uses shared state
- Transactions → Shared application state: uses shared state
- Customer management → Shared application state: uses shared state
- Invoice and PDF output → Shared application state: loads profile
services/pdf.ts - Telegram posts → Telegram publishing: publishes via
- WhatsApp logs → WhatsApp sharing: tracks sharing