How hazim47/delivery-accounting works
This repository implements a delivery-accounting application: staff import order spreadsheets, review and manage statements, and access restaurant, daily-report, dashboard, and settlement views. The frontend routes these workflows to an Express API backed by Sequelize/PostgreSQL. The import handler and statement/restaurant controllers show key data operations; other dashboard and settlement capabilities are documented by route/controller names, but their internal wiring is not sampled, so those links are kept at the API boundary.
Main entry points: App.jsx Web routes · importController.js Spreadsheet import · axios.js HTTP client · app.js Express API
Components 27
Web application
- Web routes
delivery-accounting-frontend/src/App.jsx - Order import
delivery-accounting-frontend/src/pages/ImportOrders.jsx - Statements
delivery-accounting-frontend/src/pages/Statements.jsx - Statement review
delivery-accounting-frontend/src/pages/StatementDetails.jsx - Restaurant views
delivery-accounting-frontend/src/pages/Restaurants.jsx - Restaurant detail
delivery-accounting-frontend/src/pages/RestaurantDetails.jsx - Daily reports
delivery-accounting-frontend/src/pages/DailyReports.jsx - Dashboard
delivery-accounting-frontend/src/pages/Dashboard.jsx - HTTP client
delivery-accounting-frontend/src/api/axios.js
API and access
- Express API
delivery-accounting-backend/src/app.js - Import routes
delivery-accounting-backend/src/routes/importRoutes.js - Statement routes
delivery-accounting-backend/src/routes/statementRoutes.js - Restaurant routes
delivery-accounting-backend/src/routes/restaurantRoutes.js - Other API routes
delivery-accounting-backend/src/routes
Accounting workflows
- Spreadsheet import
delivery-accounting-backend/src/controllers/importController.js - Statement management
delivery-accounting-backend/src/controllers/statementController.js - Restaurant accounting
delivery-accounting-backend/src/controllers/restaurantController.js - Daily report aggregation
delivery-accounting-backend/src/services/dailyReportService.js - Other accounting controllers
delivery-accounting-backend/src/controllers
Persistence
- Database connection
delivery-accounting-backend/src/config/database.js - Orders
delivery-accounting-backend/src/models/Order.js - Import records
delivery-accounting-backend/src/models/ImportLog.js - Restaurants
delivery-accounting-backend/src/models/Restaurant.js - Drivers
delivery-accounting-backend/src/models/Driver.js - Daily reports
delivery-accounting-backend/src/models/DailyReport.js
Other components
- Accounting staff
- PostgreSQL
Connections 40
- Accounting staff → Web routes: uses
- Web routes → Order import: routes to
- Web routes → Statements: routes to
- Web routes → Statement review: routes to
- Web routes → Restaurant views: routes to
- Web routes → Restaurant detail: routes to
- Web routes → Daily reports: routes to
- Web routes → Dashboard: routes to
- Order import → HTTP client: requests
- Statements → HTTP client: requests
- Statement review → HTTP client: requests
- Restaurant views → HTTP client: requests
- Restaurant detail → HTTP client: requests
- Daily reports → HTTP client: requests
- Dashboard → HTTP client: requests
- HTTP client → Express API: HTTP calls
- Express API → Import routes: mounts
- Express API → Statement routes: mounts
- Express API → Restaurant routes: mounts
- Express API → Other API routes: mounts
- Import routes → Spreadsheet import: dispatches
- Statement routes → Statement management: dispatches
- Restaurant routes → Restaurant accounting: dispatches
- Other API routes → Other accounting controllers: dispatches
- Spreadsheet import → Database connection: opens transaction
- Spreadsheet import → Import records: creates and updates
- Spreadsheet import → Orders: bulk inserts
- Spreadsheet import → Restaurants: reads and creates
- Spreadsheet import → Drivers: reads and updates
- Spreadsheet import → Daily report aggregation: generates reports
- Daily report aggregation → Daily reports: reads and writes
- Statement management → Orders: reads and edits
- Statement management → Import records: reads and updates
- Restaurant accounting → Restaurants: reads and writes
- Restaurant accounting → Orders: queries orders
- Orders → PostgreSQL: persists
- Import records → PostgreSQL: persists
- Restaurants → PostgreSQL: persists
- Drivers → PostgreSQL: persists
- Daily reports → PostgreSQL: persists