How sayemr0018/dokanbhai__dbmslab works
DokanBhai is a bilingual shop ledger and POS for Bangladeshi retailers, with a separate platform-admin area. A shop owner registers or signs in by mobile number, manages shop-specific catalog and contacts, then records sales and payments; the dashboard and hisab ledger surface sales, stock, and dues. Supabase is used when configured, with a device-local copy only when it is not. The tree and excerpts establish the app entry points and some auth/data behavior; several screen-to-data calls and admin internals were not sampled, so uncertain links are omitted.
Main entry points: App.jsx App router · AuthContext.jsx Shop and admin auth · data.js Shop data access · supabaseClient.js Supabase service
Components 28
Shop Access
- App router
src/App.jsx - Home and tour
src/pages/LandingPage.jsx - Shop registration
src/pages/RegisterPage.jsx - Phone login
src/components/PhoneGateScreen.jsx - Shop and admin auth
src/context/AuthContext.jsx
Shop Operations
- Dashboard and import
src/pages/DashboardScreen.jsx - Products and stock
src/pages/InventoryScreen.jsx - Categories
src/pages/CategoriesScreen.jsx - Suppliers
src/pages/VendorsScreen.jsx - POS checkout
src/pages/NewSaleScreen.jsx - Sales history
src/pages/SalesScreen.jsx - Customers
src/pages/CustomersScreen.jsx - Due ledger
src/pages/HisabScreen.jsx
Data Services
- Ledger import
src/lib/ledgerImport.js - Payment reminders
src/lib/reminders.js - Shop profile
src/lib/dokanProfile.js - Shop data access
src/lib/data.js - Local store
src/lib/localDb.js
Platform Admin
- Admin login
src/pages/admin/AdminLogin.jsx - Admin overview
src/pages/admin/AdminDashboard.jsx - Admin data access
src/lib/adminApi.js - Shop administration
src/pages/admin/AdminShops.jsx - Product administration
src/pages/admin/AdminProducts.jsx - Admin reports
src/pages/admin/AdminReports.jsx
Other components
- Shop owner
- Supabase service
src/lib/supabaseClient.js - Supabase database
- WhatsApp or SMS
Connections 32
- Shop owner → App router: opens app
- App router → Home and tour: routes home
- App router → Shop registration: routes register
- App router → Phone login: routes login
- App router → Dashboard and import: routes shop
- App router → Products and stock: routes shop
- App router → Categories: routes shop
- App router → Suppliers: routes shop
- App router → POS checkout: routes shop
- App router → Sales history: routes shop
- App router → Customers: routes shop
- App router → Due ledger: routes shop
- App router → Admin login: routes admin
- App router → Admin overview: routes admin
- App router → Shop administration: routes admin
- App router → Product administration: routes admin
- App router → Admin reports: routes admin
- Shop registration → Shop and admin auth: registers shop
- Phone login → Shop and admin auth: checks phone
- Shop and admin auth → Shop profile: loads shop profile
- Shop and admin auth → Shop data access: sets shop scope
- Shop and admin auth → Supabase service: syncs profile
- Dashboard and import → Ledger import: imports ledger
- POS checkout → Shop data access: creates sale
- Due ledger → Shop data access: records payment
- Due ledger → Payment reminders: prepares reminder
- Payment reminders → WhatsApp or SMS: opens message channel
- Shop data access → Local store: uses offline store
- Shop data access → Supabase service: uses configured service
- Supabase service → Supabase database: reads and writes
- Admin overview → Admin data access: loads overview
- Admin data access → Supabase service: requests admin data