# Blood Bank Management System
A full-stack application for connecting hospitals and individual blood donors. This project consists of a frontend built with Next.js and a backend built with Django.
## Project Structure
blood_bank_management_system/
│
├── backend/bloodbank_backend/ # Django backend
│ ├── bloodbank_backend/ # Django app for blood bank management
│ ├── manage.py # Django management script
│ └── ... # Other Django project files and apps
│
└── frontend/ # Next.js frontend
├── app/ # Next.js app router pages
├── public/ # Public assets
├── components/ # React components
├── next.config.js # Next.js configuration
├── package.json # Node.js dependencies
└── ... # Other Next.js project files
- Node.js and npm (for the frontend)
- Python and pip (for the backend)
- Django and Django REST framework (for the backend)
-
Navigate to the
backend
directory:cd backend
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows use: ./.venv/Scripts/activate
-
Install the required Python packages:
pip install -r requirements.txt
-
Apply the database migrations:
python manage.py migrate
-
Create a superuser (admin):
python manage.py createsuperuser
-
Run the Django development server:
python manage.py runserver
The backend will be available at
http://localhost:8000/
.
-
Navigate to the
frontend
directory:cd ../frontend
-
Install the required Node.js packages:
npm install
-
Run the Next.js development server:
npm run dev
The frontend will be available at
http://localhost:3000/
.
- Backend: Update the
backend/settings.py
file with your desired configuration for database, CORS, etc. - Frontend: Update
frontend/next.config.js
and other environment variables as needed.
- User Registration:
POST /api/register/hospital/
- Register a new hospital -
- User Registration:
POST /api/register/donor/
- Register a new donor
- User Registration:
- User Login:
POST /api/login/
- Authenticate users - User Logout:
POST /api/logout/
- Session management for users - Get Donors:
GET /api/donor_data/
- Retrieve a list of donors
This project is licensed under the MIT License - see the LICENSE file for details.
- Django - A high-level Python web framework.
- Next.js - A React framework for server-rendered applications.
- Tailwind CSS - A utility-first CSS framework.