Toasted ERP is a role-based Enterprise Resource Planning prototype for the pharmaceutical industry. It covers the full lifecycle from drug formulation research through production, quality release, logistics, and customer order fulfillment — with each role strictly scoped to its functional requirements.
- Submit new drug formulations (AES-256 encrypted payload, duplicate name prevented)
- View the formulation vault
- Search formulations by name
- Demand forecasting based on monthly volume input
- Create production batches linked to a formulation
- Request raw materials linked to a specific batch (max 100,000 units)
- View all production batches and their status
- View production batches with linked formulation and material approval status
- Release (or withhold) batches based on full batch detail
- Review raw material requests submitted by Production Manager
- Approve requests (automatically deducts from inventory) or reject them
- Manage inventory stock levels (max ±100,000 per update)
- Schedule deliveries linked to approved customer orders (no past dates)
- Reschedule existing deliveries
- Assign transport vehicles to scheduled deliveries
- Register with establishment details (pharmacy/hospital name, email, phone, business license)
- Place orders from available inventory (max 100,000 units)
- Track delivery status including scheduled date and assigned transport
- Contact sales staff via chat
- View and edit registration details
- View and approve or reject customer orders
- Respond to customer chat messages
Researcher submits Formulation
↓
Production Manager creates Batch → linked to Formulation
↓
Production Manager requests Raw Materials → linked to Batch
↓
Warehouse Staff reviews requests → Approve (deducts inventory) / Reject
↓
Regulatory Affairs reviews Batch → sees Formulation + material approval status → Release
↓
Delivery Manager schedules Delivery → picks an Approved customer order
↓
Customer tracks Delivery → sees scheduled date and transport vehicle
- Role-Based Access Control: Every route is protected with a
@require_rolesdecorator. Roles are strictly scoped — no cross-role access. - AES-256 Encryption: Drug formulation payloads are encrypted at rest. Only Researchers can decrypt them.
- Audit Logging: All significant actions (batch creation, material requests, inventory changes, order approvals, deliveries) are logged with actor, role, and timestamp.
- Input Validation: Duplicate names/IDs are blocked at submission. Quantity limits enforced at both frontend and backend. Past delivery dates rejected.
- Multi-Role Authentication: Separate accounts per role. Password reset requires username and role match.
- Backend: Python / Flask / SQLAlchemy / Flask-Babel
- Database: SQLite (auto-migrated on startup)
- Frontend: Jinja2 / Bootstrap 5 / Bootstrap Icons
- Security: bcrypt password hashing, AES-256-GCM encryption
- i18n: English / Thai (ภาษาไทย)
Select a role from the landing page and use:
- Username:
aaaa - Password:
aaaa
Customer accounts must be registered manually as they require establishment details.
Live Demo: toasted-prototype.onrender.com
⚠️ The app may take a few minutes to wake up on first load.
Run locally:
pip install -r requirements.txt
python main.py

