How barwaqt/server works
Barwaqt is a commerce and delivery API for customers, vendors, riders, finance staff, and administrators. The main workflow runs from customer discovery and COD checkout through independent vendor fulfillment, rider dispatch/delivery, cash reconciliation, and settlement. Authentication and administration support that workflow; catalog discovery, customer account features, notifications, maps, marketing, and support are additional capabilities. The README documents the business stages; sampled source confirms application mounting, authentication, and selected service calls, but not every workflow implementation.
Main entry points: app.js HTTP API · order.service.js Order workflow · rider.service.js Rider operations · finance.service.js Finance operations
Components 27
Access and API
- HTTP API
src/app.js - Authentication
src/services/auth.service.js - Phone authentication
src/services/phone-auth.service.js - Sessions
src/services/session.service.js - PostgreSQL
src/config/database.js
Commerce
- Catalog discovery
src/controllers/catalog.controller.js - Product search
src/services/search.service.js - Customer account
src/controllers/customer.controller.js - Order workflow
src/services/order.service.js
Fulfillment
- Vendor fulfillment
src/services/vendor.service.js - Dispatch and delivery
src/services/delivery.service.js - Rider operations
src/services/rider.service.js - Returns
src/services/return.service.js
Finance
- Finance operations
src/services/finance.service.js - Cash reconciliation
src/services/reconciliation.service.js
Operations
- Administration
src/services/admin.service.js - Marketing campaigns
src/services/marketing.service.js - Notifications
src/services/notification.service.js - Maps and location
src/services/maps.service.js - Support
src/services/support.service.js - Veevo SMS
src/services/veevo.service.js
Other components
- Customer
- Vendor
- Rider
- Finance staff
- Administrator
- SMS provider
Connections 35
- Customer → HTTP API: uses
- Vendor → HTTP API: uses
- Rider → HTTP API: uses
- Finance staff → HTTP API: uses
- Administrator → HTTP API: uses
- HTTP API → Authentication: routes auth
- HTTP API → Catalog discovery: routes catalog
src/app.js - HTTP API → Customer account: routes customer
src/app.js - HTTP API → Order workflow: routes orders
src/app.js - HTTP API → Finance operations: routes finance
src/app.js - Authentication → Sessions: creates sessions
src/services/auth.service.js - Phone authentication → Sessions: creates sessions
src/services/phone-auth.service.js - Phone authentication → Veevo SMS: sends SMS
src/services/phone-auth.service.js - Veevo SMS → SMS provider: sends messages
- Customer → Catalog discovery: discovers products
- Catalog discovery → Product search: supports search
src/routes/catalog.routes.js - Customer → Customer account: manages cart
- Customer → Order workflow: places COD order
- Order workflow → Vendor fulfillment: creates vendor orders
- Vendor → Vendor fulfillment: fulfills orders
- Vendor fulfillment → Dispatch and delivery: marks ready
- Dispatch and delivery → Rider operations: assigns rider
- Rider → Rider operations: updates delivery
- Rider operations → Returns: initiates returns
- Rider operations → Cash reconciliation: remits cash
- Finance staff → Cash reconciliation: records cash
- Cash reconciliation → Finance operations: enables settlement
- Finance staff → Finance operations: records settlements
- Administrator → Administration: manages platform
- Administrator → Marketing campaigns: manages campaigns
- Administrator → Support: manages support
- HTTP API → Notifications: serves notifications
src/app.js - HTTP API → Maps and location: serves maps
src/app.js - Order workflow → PostgreSQL: persists orders
- Finance operations → PostgreSQL: records finance
src/services/finance.service.js