How arjwan307/almahasibpro works
AlMahasib Pro is an incomplete, multi-tenant business-management product with three point-of-sale modes, commerce and inventory workflows, finance, workforce, and mobile-representative operations. The main user workflow is cashier sale entry, local/offline handling, and server-side API processing; the README documents sync and offline capability. The API excerpt shows route handlers invoking store operations, while runtime startup wires the API to MongoDB or memory. Several domain modules are represented by README-backed directory nodes because their implementation files were not sampled; the documented PostgreSQL direction conflicts with the sampled startup configuration, so no runtime PostgreSQL connection is asserted.
Main entry points: app.js API Routes · server.js Runtime Startup · pos-ui.js POS Cashier · mongo-store.js Mongo Store
Components 24
User Interfaces
- POS Cashier
public/pos-ui.js - Offline Sync
public/offline-sync.js - Commerce UI
public/commerce-ui.js - Representative UI
public/representative-ui.js
API And Security
- API Routes
apps/api/src/app.js - HTTP Validation
apps/api/src/lib/http.js - Password Security
apps/api/src/lib/security.js - Role Permissions
apps/api/src/permissions.js - Decimal Arithmetic
apps/api/src/lib/decimal.js - Runtime Startup
server.js
Business Workflows
- Catalog And Inventory
apps/api/src/modules/catalog - Purchasing
apps/api/src/modules/purchasing - Sales And Returns
apps/api/src/modules/sales - POS And Shifts
apps/api/src/modules/pos - Accounting And Treasury
apps/api/src/modules/accounting - Field Representatives
apps/api/src/modules/representatives - Employees And Payroll
apps/api/src/modules/payroll - Audit
apps/api/src/modules/audit - Operation Sync
apps/api/src/modules/sync
Persistence
- Memory Store
apps/api/src/store/memory-store.js - Mongo Store
apps/api/src/store/mongo-store.js - PostgreSQL Store
apps/api/src/store/postgres-store.js - Database Migrations
database/migrations
Other components
- Business User
Connections 26
- Business User → POS Cashier: enters sales
README.md - POS Cashier → Offline Sync: queues offline
README.md - POS Cashier → API Routes: submits requests
README.md - Commerce UI → API Routes: uses API
README.md - Representative UI → API Routes: syncs operations
README.md - Offline Sync → API Routes: syncs operations
README.md - API Routes → HTTP Validation: validates routes
apps/api/src/app.js - API Routes → Password Security: verifies passwords
apps/api/src/app.js - API Routes → Role Permissions: checks roles
apps/api/src/permissions.js - API Routes → Decimal Arithmetic: validates amounts
apps/api/src/app.js - API Routes → Catalog And Inventory: handles domain requests
README.md - API Routes → Purchasing: handles purchases
README.md - API Routes → Sales And Returns: handles sales
README.md - API Routes → POS And Shifts: handles cashier shifts
README.md - API Routes → Accounting And Treasury: supports finance
README.md - API Routes → Field Representatives: supports field sales
README.md - API Routes → Employees And Payroll: supports payroll
README.md - API Routes → Audit: supports audit
README.md - API Routes → Operation Sync: processes sync
README.md - Runtime Startup → API Routes: creates app
server.js - Runtime Startup → Memory Store: selects memory
server.js - Runtime Startup → Mongo Store: selects MongoDB
server.js - Mongo Store → Memory Store: extends behavior
apps/api/src/store/mongo-store.js - API Routes → Memory Store: calls store
- API Routes → Mongo Store: calls store
- PostgreSQL Store → Database Migrations: uses migrations