# 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](https://expressjs.com/) - Web framework
- [Sequelize](https://sequelize.org/) - ORM documentation
- [Passport.js](http://www.passportjs.org/) - Authentication
- [AJV](https://ajv.js.org/) - JSON Schema validation
- [JWT](https://jwt.io/) - JSON Web Tokens

### Recommended Reading

1. Start with `ondeliv-backend.js` to understand application initialization
2. Review `app/routes/auth.routes.js` for authentication flow
3. Study `app/controllers/waybill/create-waybill.controller.js` for core business logic
4. Examine `app/models/scans.model.js` for tracking data structure
5. 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 |