2spentest /
bloodhound_client
A Python script for importing custom Cypher queries into BloodHound Community Edition (CE)
40/100 healthLoading repository data…
rmezanur521-boop / repository
A Community Blood Donation REST API built with FastAPI, PostgreSQL & SQLAlchemy — featuring JWT auth, role-based access control, donor management, and blood request tracking. fastapi python postgresql sqlalchemy alembic jwt rest-api blood-donation clean-architecture pydantic
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A production-ready REST API for managing community blood donation activities — built with FastAPI, PostgreSQL, and Clean Architecture principles.
Community Blood Donation API is a backend system designed to connect blood donors with requesters in emergency situations. It provides a complete platform for donor registration, blood request management, and real-time availability tracking — all secured with JWT-based authentication and role-based access control.
This project follows Clean Architecture principles with a clear separation of concerns:
Request → Router → Service → Repository → Database
community_blood_donation/ │ ├── app/ │ ├── main.py # App entry point │ ├── core/ # Config, security, exceptions │ ├── database/ # DB engine and session │ ├── models/ # SQLAlchemy ORM models │ ├── schemas/ # Pydantic request/response models │ ├── repositories/ # Database query layer │ ├── services/ # Business logic layer │ ├── routers/ # API endpoint definitions │ └── dependencies/ # Auth guards and role checkers │ ├── alembic/ # Database migrations ├── requirements.txt ├── .env └── README.md
| Technology | Purpose |
|---|---|
| Python 3.12 | Core language |
| FastAPI | Web framework |
| PostgreSQL | Relational database |
| SQLAlchemy 2.0 | ORM |
| Alembic | Database migrations |
| python-jose | JWT token generation |
| Passlib + Bcrypt | Password hashing |
| Pydantic v2 | Data validation |
| Pydantic-Settings | Environment config |
| Uvicorn | ASGI server |
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ │ users │ │ donors │ │ blood_requests │ ├─────────────┤ ├──────────────┤ ├─────────────────┤ │ id │──┐ │ id │ │ id │ │ full_name │ └───▶│ user_id (FK) │ │ patient_name │ │ email │ │ blood_group │ │ blood_group │ │ password_ │ ┌───▶│ phone │ │ hospital_name │ │ hash │ │ │ city │ │ required_date │ │ role │ │ │ address │ │ contact_number │ │ created_at │ │ │ last_ │ │ status │ └─────────────┘ │ │ donation_ │ │ created_by (FK)─┘ │ │ date │ │ created_at │ │ │ is_available │ └─────────────────┘ │ └──────────────┘ └─── (one-to-one with users)
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST | /api/v1/auth/register | Register new user | Public |
POST | /api/v1/auth/login | Login and get token | Public |
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST | /api/v1/donors/ | Create donor profile | Donor, Admin |
GET | /api/v1/donors/ | List all donors (paginated) | All roles |
GET | /api/v1/donors/{id} | Get donor by ID | All roles |
PUT | /api/v1/donors/{id} | Update donor profile | Owner, Admin |
PATCH | /api/v1/donors/{id}/availability | Toggle availability | Owner, Admin |
| Method | Endpoint | Description | Access |
|---|---|---|---|
POST | /api/v1/requests/ | Create blood request | Requester, Admin |
GET | /api/v1/requests/ | List all requests | All roles |
GET | /api/v1/requests/{id} | Get request by ID | All roles |
PATCH | /api/v1/requests/{id}/status | Update request status | Owner, Admin |
DELETE | /api/v1/requests/{id} | Delete request | Owner, Admin |
| Method | Endpoint | Description | Access |
|---|---|---|---|
GET | /api/v1/dashboard/ | Get platform statistics | Admin only |
git clone https://github.com/your-username/community-blood-donation-api.git
cd community-blood-donation-api
python -m venv .venv
# Windows
.venv\Scripts\activate
# Mac / Linux
source .venv/bin/activate
pip install -r requirements.txt
Create a .env file in the root directory:
DATABASE_URL=postgresql://postgres:yourpassword@localhost:5432/community_blood_db
SECRET_KEY=your-super-secret-key-change-this-in-production
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=60
CREATE DATABASE community_blood_db;
alembic revision --autogenerate -m "initial migration"
alembic upgrade head
uvicorn app.main:app --reload
| Interface | URL |
|---|---|
| Swagger UI | http://localhost:8000/docs |
| ReDoc | http://localhost:8000/redoc |
| Health Check | http://localhost:8000/ |
| Role | Description |
|---|---|
| Admin | Full access — manage all donors, requests, and view dashboard |
| Donor | Can create/update own donor profile and view requests |
| Requester | Can create and manage blood requests |
curl -X POST http://localhost:8000/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"full_name": "Rahim Uddin",
"email": "rahim@example.com",
"password": "securepassword",
"role": "donor"
}'
curl -X POST http://localhost:8000/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "rahim@example.com",
"password": "securepassword"
}'
curl -X POST http://localhost:8000/api/v1/donors/ \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
-d '{
"blood_group": "B+",
"phone": "01711234567",
"city": "Dhaka",
"address": "Mirpur, Dhaka"
}'
Mezan — Software Engineer & Diploma Engineering Student
This project is licensed under the MIT License. Feel free to use, modify, and distribute.
Selected from shared topics, language and repository description—not editorial ratings.
2spentest /
A Python script for importing custom Cypher queries into BloodHound Community Edition (CE)
40/100 healthVaraxion /
Sahay - A predictive disaster intelligence and rapid emergency response platform. Features ML-driven river flood forecasting (ARIMA), CNN-based rainfall analysis, a lightning-fast blood bank locator, and interactive disaster SOPs. Built for DSN3099 Engineering Project in Community Service @ VIT
53/100 healthAkashK1546 /
A complete DBMS project designed to streamline and digitalize blood donation, request tracking, and hospital management. Built using MySQL, Python, and Streamlit, this system provides an intuitive and efficient way to manage donors, recipients, hospitals, blood requests, and donations.
rezwan578 /
A full-stack health management system built with Flask, offering health data tracking, community-based blood donation network, and fitness calculators.
37/100 healthSridhar636146591 /
Campus Community Hub — A student platform for sharing notes, discovering events, blood donation, book exchange, lost & found, clubs, and study tools like Pomodoro timer, quiz, and a 2026 interactive calendar. Built with Flask & Python.
49/100 healthRohit-Patel-Techie /
CampusLifeLine is a web platform designed to connect students and campus communities with life‑saving resources like blood donors, urgent requests, and emergency support services. It provides a fast and reliable way to search for donors and coordinate help in critical moments.
41/100 health