SmartCare is a backend system built using FastAPI to manage blood donors, blood requests, and secure user authentication. The system is designed with a scalable, layered architecture and focuses on real-world backend practices such as role-based access, request lifecycle management, and efficient data handling.
- User registration with secure password hashing
- JWT-based authentication
- Role-based access control (Patient / Donor / Admin)
- Donor profile creation
- Availability tracking
- Blood group & location-based matching
-
Create blood requests
-
Request lifecycle management:
pending → accepted → completed
-
Donor assignment to requests
-
Business rule validations (blood group & location match)
-
Filters donors based on:
- Blood group
- Location
- Availability
- “My Requests” API for patients
- Donor-specific request dashboard
- State transition validation
- Role-based permissions enforcement
- Clean API structure
- Pagination for large datasets
- Filtering APIs (e.g., status-based filtering)
- Performance optimization for queries
- FastAPI
- PostgreSQL
- SQLAlchemy
- Pydantic
- JWT Authentication
The project follows a layered architecture:
API Layer → Service Layer → Repository Layer → Database
- API Layer: Handles HTTP requests & responses
- Service Layer: Business logic (matching, validation, workflows)
- Repository Layer: Database interactions
- Database: PostgreSQL
git clone https://github.com/VivekKumarMahato/SmartCare.git
cd SmartCare
pip install -r requirements.txt
uvicorn app.main:app --reloadAfter running the server:
User → Register/Login → Get JWT Token
↓
Patient → Create Blood Request
↓
Donor → View Matching Requests → Accept
↓
Admin → Complete Request
↓
System → Updates donor availability
- Docker containerization
- Advanced search & sorting
- Blood compatibility logic (universal donors/receivers)
- Notification system (email/SMS)
- AI-based features (prediction & optimization)
🟢 Actively in development 🔄 Currently enhancing APIs with pagination and filtering for scalable data handling
Vivek Kumar Mahato