A full-stack web application that leverages blockchain principles to track, transfer, and verify supply chain batch records with admin approval, tamper-proof history, and role-based access.
- Immutable ledger using blockchain data structures
- User-initiated batch transfers with admin approval workflow
- View detailed batch history: created, transferred, flagged
- Raise and manage concerns as an admin
- Flask-Login authentication for User/Admin roles
- Tested with unit tests for blockchain logic and user workflows
- Dockerized for easy deployment
- Python 3.11, Flask, Flask-Login
- HTML, CSS, Vanilla JS
- Docker, Docker Compose
- Jinja2 Templates
- Python unittest
supply_chain_blockchain/
├── app/
│ ├── admin/
│ ├── user/
│ ├── templates/
│ ├── static/
│ ├── utils.py
│ └── auth.py
├── blockchain/
│ ├── block.py
│ └── blockchain.py
├── data/
│ ├── ledger.json
│ └── concerns.json
├── tests/
│ ├── test_blockchain.py
│ ├── test_user_actions.py
│ └── test_admin_actions.py
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── main.py- Clone the repo
git clone https://github.com/hpk369/supply_chain_blockchain.git
cd supply_chain_blockchain- Install dependencies
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt- Run the app
python main.pyOpen your browser at http://127.0.0.1:9567
docker-compose build
docker-compose uppython -m unittest discover tests- User creates a new batch
- User initiates a transfer → saved as a pending block
- Admin can approve/deny the transfer from dashboard
- All actions are recorded in ledger.json with full traceability
- Concerns can be raised by Admin and viewed in history
This app is ideal for demonstrating:
- Understanding of blockchain principles
- Role-based authorization and state handling
- Clean architecture and secure web design
- Real-world logistics and auditing simulation