How azuliatech/chobo works
Chobo is a mobile-first point-of-sale and store-management product with a NestJS API. The main workflow is staff using the mobile app to manage inventory and record sales locally, then synchronize workspace data with the API; the app also supports accounts, staff workspaces, debts, payments, notifications, and subscriptions. The sampled sync code shows local database access and several API transfers. Some domain modules are represented from the source index and file tree rather than inspected implementation, so uncertain links are omitted.
Main entry points: App.tsx App navigation · syncService.ts Data synchronization · prisma.service.ts PostgreSQL access · sales.service.ts Sales processing
Components 23
Mobile app
- App navigation
apps/mobile/App.tsx - Sales screens
apps/mobile/src/screens/SellScreen.tsx - Inventory screen
apps/mobile/src/screens/InventoryScreen.tsx - Transaction history
apps/mobile/src/screens/TransactionScreen.tsx - Login screen
apps/mobile/src/screens/LoginScreen.tsx - Currency settings
apps/mobile/src/hooks/useCurrency.ts
Identity and workspace
- Auth state
apps/mobile/src/store/authStore.ts - Authentication API
apps/api/src/auth/auth.service.ts - JWT guard
apps/api/src/auth/auth.guard.ts - Workspace roles
apps/api/src/auth/roles.guard.ts - Workspace management
apps/api/src/workspace/workspace.service.ts
Store operations
- Product management
apps/api/src/products/products.service.ts - Sales processing
apps/api/src/sales/sales.service.ts - Customer records
apps/api/src/customers/customers.service.ts - Debt tracking
apps/api/src/debts/debts.service.ts - Payments
apps/api/src/payments/payments.service.ts
Data and integrations
- Data synchronization
apps/mobile/src/services/syncService.ts - Local SQLite
apps/mobile/src/db/index.ts - Subscription service
apps/mobile/src/services/revenueCatService.ts - Notifications
apps/api/src/notifications/notifications.service.ts - PostgreSQL access
apps/api/src/prisma/prisma.service.ts
Other components
- Store staff
- External services
Connections 22
- Store staff → App navigation: uses
apps/mobile/App.tsx - App navigation → Sales screens: renders
apps/mobile/App.tsx - App navigation → Inventory screen: renders
apps/mobile/App.tsx - App navigation → Transaction history: renders
apps/mobile/App.tsx - App navigation → Login screen: renders
apps/mobile/App.tsx - Login screen → Auth state: uses
apps/mobile/src/screens/LoginScreen.tsx - Auth state → Subscription service: logs in
apps/mobile/src/store/authStore.ts - App navigation → Local SQLite: restores products
apps/mobile/App.tsx - App navigation → Data synchronization: builds headers
apps/mobile/App.tsx - Data synchronization → Local SQLite: reads and updates
apps/mobile/src/services/syncService.ts - Data synchronization → Product management: syncs products
apps/mobile/src/services/syncService.ts - Data synchronization → Customer records: syncs customers
apps/mobile/src/services/syncService.ts - Data synchronization → Debt tracking: syncs debts
apps/mobile/src/services/syncService.ts - Data synchronization → Payments: syncs payments
apps/mobile/src/services/syncService.ts - Authentication API → PostgreSQL access: reads and writes
apps/api/src/auth/auth.service.ts - Workspace roles → PostgreSQL access: checks membership
apps/api/src/auth/roles.guard.ts - Workspace management → PostgreSQL access: reads and writes
apps/api/src/workspace/workspace.service.ts - Sales processing → PostgreSQL access: reads and writes
apps/api/src/sales/sales.service.ts - Sales processing → Notifications: creates notifications
apps/api/src/sales/sales.service.ts - Customer records → PostgreSQL access: reads and writes
apps/api/src/customers/customers.service.ts - Debt tracking → PostgreSQL access: reads and writes
apps/api/src/debts/debts.service.ts - App navigation → External services: uses purchases
apps/mobile/App.tsx