How rizwankharadi/backend works
FinSync360 is an Express ERP backend for company-scoped accounting, inventory, and related financial workflows. Users reach business operations through HTTP routes; controllers apply domain logic and persist records, while reporting and AI expose summaries. Tally synchronization is a distinct bidirectional integration, and payments, GST, communications, and licensing are additional capabilities documented in the README. The sampled files establish selected controller-to-service/model calls and database setup; unsampled route wiring and several integrations are represented only where documented, without asserting their internal call chains.
Main entry points: routes Business routes · server.js Express server · index.js Accounting and inventory records · tallyWebSocketService.js Tally agent socket
Components 24
API and access
- Express server
src/server.js - Authentication
src/routes/auth.js - Business routes
src/routes
ERP operations
- Voucher operations
src/controllers/voucherController.js - Inventory operations
src/controllers/inventoryController.js - Financial operations
src/controllers - Business masters
src/controllers/masterController.js
Insights and assistance
- Financial reports
src/controllers/reportController.mjs - AI questions
src/controllers/aiController.js - Intent routing
src/services/aiQueryRouter.js - Business summaries
src/services/aiQueryHandlers.js
Integrations
- Tally operations
src/controllers/tallyController.js - Tally sync
src/services/tallySyncService.js - Tally agent socket
src/services/tallyWebSocketService.js - Payment processing
src/services/paymentService.js - GST compliance
src/controllers/gstController.mjs - Notifications
src/services/notificationService.js
Persistence
- Accounting and inventory records
src/models/index.js - Session management
src/services/sessionService.js - MySQL database
src/config/database.js
Other components
- ERP client
- Tally system
- Razorpay
- GSTN
Connections 29
- ERP client → Express server: sends requests
- Express server → Authentication: mounts routes
- Express server → Business routes: mounts routes
- Authentication → Session management: manages sessions
- Business routes → Voucher operations: dispatches vouchers
- Business routes → Inventory operations: dispatches inventory
- Business routes → Financial operations: dispatches finance
- Business routes → Business masters: dispatches masters
- Business routes → Financial reports: dispatches reports
- Business routes → AI questions: dispatches questions
- Voucher operations → Accounting and inventory records: reads and writes
- Inventory operations → Accounting and inventory records: reads and writes
- Financial operations → Accounting and inventory records: reads and writes
- Business masters → Accounting and inventory records: reads and writes
- Financial reports → Accounting and inventory records: queries records
- AI questions → Intent routing: classifies questions
- AI questions → Business summaries: runs summaries
- Business summaries → Accounting and inventory records: queries records
- Express server → MySQL database: connects on startup
- MySQL database → Accounting and inventory records: defines models
- Express server → Tally sync: initializes sync
- Express server → Tally agent socket: initializes socket
- Voucher operations → Tally agent socket: pushes vouchers
- Inventory operations → Tally agent socket: pushes items
- Tally operations → Tally sync: coordinates sync
- Tally agent socket → Tally system: exchanges data
- Tally sync → Tally system: synchronizes
- Payment processing → Razorpay: processes payments
- GST compliance → GSTN: integrates