How mkmehmood/sarim works
This repository implements a multi-store sales, production, customer, representative, and finance management app. Users enter operational records through the business modules; those modules validate links and balances, save records locally, and synchronize changes across devices. The graph preserves the major domain areas and the data/sync layer. Evidence is limited to the README (empty) and sampled excerpts plus the SOURCE INDEX; unsampled modules are represented only where the tree establishes their presence, without speculative call edges.
Main entry points: main.js Module bootstrap · sync.js Cloud synchronization · factory.js Factory inventory · customers.js Customer records
Components 27
App entry
- Module bootstrap
modules/main.js
Business operations
- Admin records
modules/admin-data.js - Sales and calculations
modules/utilities-sales.js - Payments and expenses
modules/utilities-payments.js - Customer records
modules/customers.js - Factory inventory
modules/factory.js - Representative sales
modules/rep-sales.js - Production photos
modules/prod-photos.js - Finance rules
modules/finance.js
Record integrity
- Record relationships
modules/link-graph.js - Link validation
modules/link-guards.js - Save confirmation
modules/confirm-guard.js - Edit state
modules/edit-mode.js - Store identity
modules/store-keys.js
Data and sync
- Business context
modules/business.js - Cloud synchronization
modules/sync.js - Local data and utilities
modules/utilities-core.js - Formula storage
modules/formula-store.js
App experience
- Notifications
modules/notify.js - Dialogs and feedback
modules/dialog.js - Feedback UI
modules/feedback.js - Date selection
modules/custom-date-picker.js - PDF rendering
modules/pdf-canvas.js - Native capabilities
modules/native.js
Other components
- App user
- Cloud backend
- Local database
Connections 48
- App user → Module bootstrap: opens app
- Module bootstrap → Business context: initializes
modules/main.js - Module bootstrap → Admin records: loads
modules/main.js - Module bootstrap → Cloud synchronization: loads
modules/main.js - Module bootstrap → Local data and utilities: loads
modules/main.js - Module bootstrap → Sales and calculations: loads
modules/main.js - Module bootstrap → Payments and expenses: loads
modules/main.js - Module bootstrap → Customer records: loads
modules/main.js - Module bootstrap → Formula storage: loads
modules/main.js - Module bootstrap → Factory inventory: loads
modules/main.js - Module bootstrap → Representative sales: loads
modules/main.js - Module bootstrap → Production photos: loads
modules/main.js - Module bootstrap → Date selection: loads
modules/main.js - Sales and calculations → Record relationships: serializes calls
modules/utilities-sales.js - Payments and expenses → Record relationships: plans settlements
modules/utilities-payments.js - Payments and expenses → Link validation: checks settlement
modules/utilities-payments.js - Sales and calculations → Cloud synchronization: emits updates
modules/utilities-sales.js - Sales and calculations → Payments and expenses: refreshes payments
modules/utilities-sales.js - Sales and calculations → Local data and utilities: syncs tabs
modules/utilities-sales.js - Sales and calculations → Business context: reads business data
modules/utilities-sales.js - Payments and expenses → Business context: reads business data
modules/utilities-payments.js - Payments and expenses → Representative sales: refreshes views
modules/utilities-payments.js - Local data and utilities → Cloud synchronization: pushes changes
modules/utilities-core.js - Local data and utilities → Business context: loads records
modules/utilities-core.js - Local data and utilities → Factory inventory: validates formula stock
modules/utilities-core.js - Local data and utilities → Customer records: shows toast
modules/utilities-core.js - Cloud synchronization → Business context: loads data
modules/sync.js - Cloud synchronization → Payments and expenses: refreshes views
modules/sync.js - Cloud synchronization → Factory inventory: renders inventory
modules/sync.js - Cloud synchronization → Customer records: shows toast
modules/sync.js - Cloud synchronization → Cloud backend: syncs data
- Business context → Local data and utilities: loads UI state
modules/business.js - Business context → Local database: reads and writes
- Customer records → Link validation: checks sale deletion
modules/customers.js - Customer records → Business context: uses balance rules
modules/customers.js - Customer records → Factory inventory: gets sale values
modules/customers.js - Customer records → Dialogs and feedback: uses blocking dialog
modules/customers.js - Representative sales → Cloud synchronization: saves transactions
modules/rep-sales.js - Representative sales → Save confirmation: guards sale saves
modules/rep-sales.js - Representative sales → Factory inventory: gets sale price
modules/rep-sales.js - Representative sales → Customer records: shows confirmation
modules/rep-sales.js - Representative sales → Local data and utilities: notifies changes
modules/rep-sales.js - Factory inventory → Cloud synchronization: saves inventory
modules/factory.js - Factory inventory → Record relationships: finds payable links
modules/factory.js - Factory inventory → Payments and expenses: refreshes payment view
modules/factory.js - Factory inventory → Sales and calculations: calculates net cash
modules/factory.js - Factory inventory → Customer records: requests confirmation
modules/factory.js - Link validation → Record relationships: remaps references
modules/link-guards.js