Additional Resources
Key Files for Reference
-
ondeliv-backend.js- Main application entry point -
app/models/index.js- Database model aggregation -
app/middleware/authJwt.js- Authentication logic -
app/utility/check-fee.util.js- Fee calculation logic -
app/utility/waybill.util.js- Waybill utilities
Third-Party Documentation
- Express.js - Web framework
- Sequelize - ORM documentation
- Passport.js - Authentication
- AJV - JSON Schema validation
- JWT - JSON Web Tokens
Recommended Reading
- Start with
ondeliv-backend.jsto understand application initialization - Review
app/routes/auth.routes.jsfor authentication flow - Study
app/controllers/waybill/create-waybill.controller.jsfor core business logic - Examine
app/models/scans.model.jsfor tracking data structure - Check
app/controllers/3p/for courier integration patterns
Appendix
Status Code Reference
| Code | Description | Usage |
|---|---|---|
| BKD | Booked | Initial waybill creation |
| PKD | Packed | Package prepared for shipping |
| HND | Handover | Transferred to courier/hub |
| DPT | Departure | Left origin hub |
| TRS | Transit | In transit between hubs |
| ARV | Arrival | Arrived at destination hub |
| RCV | Receiving | Received at DC |
| OFD | Out for Delivery | With delivery driver |
| DLV | Delivered | Successfully delivered |
| PRB | Problem | Issue encountered |
| RTN | Return | Package being returned |
| CNL | Cancel | Shipment cancelled |
Service Type Codes
| Code | Description |
|---|---|
| REG | Regular Service |
| EXP | Express Service |
| CARGO | Cargo Service |
| SAME | Same Day Delivery |
| NEXT | Next Day Delivery |
Problem Type Codes
| Code | Description |
|---|---|
| DMG | Damaged |
| LST | Lost |
| RFS | Refused by Recipient |
| INC | Incomplete Address |
| CLO | Closed/Not Available |
| WTH | Weather Issues |
| OTH | Other |
No Comments