How janiya-99/test-a works
Asipiya Asipbook is a Node.js/Express backend for a business-management platform. Its principal workflow is an authenticated client request entering the API, being dispatched to a domain controller, and reading or changing business data in MySQL before returning a result. The repository also exposes accounting, sales, inventory, purchasing, workforce, reporting, and customer-management capabilities. The graph uses explicit routing and service references where available; broader feature branches are documented by the README or indicated by the route/controller tree, so their internal links are intentionally limited.
Main entry points: server.js Express server · productDBService.js Product data · authController.js Authentication · invoiceController.js Invoice workflow
Components 23
API and identity
- Express server
server.js - Identity routes
routes/authRoutes.js - Authentication
controllers/authController.js - Branch services
services/branchDBService.js
Sales and finance
- Invoice workflow
controllers/invoiceController.js - Invoice data
services/invoiceDBService.js - Installment payments
controllers/installmentController.js - Installment data
services/installmentDBService.js - Accounting
controllers/accountingController.js
Inventory operations
- Product catalog
controllers/productController.js - Product data
services/productDBService.js - Goods receiving
controllers/grnController.js - Warehouse operations
controllers/warehouseController.js - Stock records
services/stockCardDBService.js
Business services
- Customer management
services/customerDBService.js - Reports and dashboard
services/reportDBService.js - Approvals
services/approvalService.js
Runtime and integrations
- Business database
db/db.js - Account-center database
db/db2.js - Socket.IO updates
server.js - Email service
utils/emailTransporter.js - File and Excel handling
utils/multerConfig.js
Other components
- API client
Connections 37
- API client → Express server: sends requests
README.md - Express server → Identity routes: mounts routes
server.js - Identity routes → Authentication: dispatches to
routes/authRoutes.js - Authentication → Branch services: uses branch data
controllers/authController.js - Authentication → Customer management: uses customer data
controllers/authController.js - Authentication → Product data: uses product data
controllers/authController.js - Authentication → Account-center database: queries account data
controllers/authController.js - Express server → Invoice workflow: mounts API routes
server.js - Invoice workflow → Invoice data: uses invoice data
controllers/invoiceController.js - Invoice workflow → Product data: uses product data
controllers/invoiceController.js - Invoice workflow → Stock records: uses stock records
controllers/invoiceController.js - Invoice workflow → Socket.IO updates: emits updates
controllers/invoiceController.js - Express server → Installment payments: mounts routes
server.js - Installment payments → Installment data: calls data service
controllers/installmentController.js - Installment payments → Invoice data: updates invoice balance
controllers/installmentController.js - Installment payments → Business database: recalculates credit logs
controllers/installmentController.js - Express server → Product catalog: mounts API routes
server.js - Product catalog → Product data: uses product data
routes/productRoutes.js - Express server → Goods receiving: mounts API routes
server.js - Goods receiving → Product data: uses product data
controllers/grnController.js - Goods receiving → Stock records: uses stock records
controllers/grnController.js - Goods receiving → Accounting: calls accounting
controllers/grnController.js - Express server → Warehouse operations: mounts API routes
server.js - Warehouse operations → Product data: uses product data
controllers/warehouseController.js - Warehouse operations → Stock records: uses stock records
controllers/warehouseController.js - Warehouse operations → Account-center database: queries company data
controllers/warehouseController.js - Product data → Business database: queries business data
services/productDBService.js - Product data → Account-center database: queries branch data
services/productDBService.js - Invoice data → Business database: queries business data
services/invoiceDBService.js - Installment data → Business database: queries payment data
services/installmentDBService.js - Branch services → Account-center database: queries branch data
services/branchDBService.js - Express server → Socket.IO updates: attaches Socket.IO
server.js - Express server → Reports and dashboard: uses dashboard service
server.js - Express server → Accounting: exposes accounting
- Express server → Approvals: exposes approval flows
- Authentication → Email service: sends email
controllers/authController.js - Express server → File and Excel handling: supports uploads