A comprehensive Blood Bank Management System built with Django REST Framework (Backend) and React (Frontend).
- User Management: Support for Donors, Blood Banks, and Admins
- Blood Inventory Management: Track blood stock levels by blood group
- Donation Management: Record and track blood donations
- Blood Request System: Request blood with urgency levels
- Donation Camps: Organize and manage blood donation camps
- Appointments: Schedule appointments for blood donation
- Real-time Geolocation: Auto-fill addresses using GPS location
- JWT Authentication: Secure token-based authentication with auto-refresh
- Django 4.2
- Django REST Framework
- PostgreSQL (or SQLite for local development)
- JWT Authentication (Simple JWT)
- Django Filter
- React 18
- Vite
- Ant Design
- React Router
- Axios
- Tailwind CSS
E_BloodBank/
├── backend/ # Django REST API
│ ├── accounts/ # User management
│ ├── bloodbank/ # Blood bank management
│ ├── donors/ # Donor and donation management
│ ├── inventory/ # Blood inventory
│ └── requests/ # Blood requests
├── frontend/ # React application
│ └── src/
│ ├── api/ # API client
│ ├── components/
│ ├── pages/
│ └── utils/
└── README.md
🚀 Quick Start? See QUICKSTART.md for the fastest way to get running!
📖 Detailed Guide? See LOCAL_SETUP.md for comprehensive setup instructions with troubleshooting.
- Navigate to backend directory:
cd backend- Create virtual environment:
python -m venv venv- Activate virtual environment:
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Run migrations:
python manage.py migrate- Create superuser:
python manage.py createsuperuser- Run development server:
python manage.py runserver- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Create
.envfile (optional):
VITE_API_BASE_URL=http://127.0.0.1:8000- Run development server:
npm run devPOST /api/auth/token/by-username-or-email/- LoginPOST /api/auth/refresh/- Refresh tokenPOST /api/accounts/signup/- SignupGET /api/accounts/me/- Get current user
GET /api/bloodbank/bloodbanks/- List blood banksGET /api/bloodbank/bloodbanks/my_inventory/- Get my inventoryPOST /api/bloodbank/camps/- Create donation camp
GET /api/donors/donors/- List donorsPOST /api/donors/donations/- Create donationPOST /api/donors/appointments/- Create appointment
GET /api/inventory/inventory/- List inventoryPOST /api/inventory/inventory/- Create inventory entry
GET /api/requests/requests/- List blood requestsPOST /api/requests/requests/- Create blood request
Create a .env file in the backend directory:
DATABASE_NAME=ebloodbank_db
DATABASE_USER=postgres
DATABASE_PASSWORD=your_password
DATABASE_HOST=localhost
DATABASE_PORT=5432
SECRET_KEY=your_secret_key
DEBUG=True
Create a .env file in the frontend directory:
VITE_API_BASE_URL=http://127.0.0.1:8000
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License.
- Daksh Verma
- Inspired by the official e-BloodBank system (https://ebloodbank.gov.in)