A modern, full-stack healthcare management application built with Spring Boot 4.0.2 and React, designed to streamline patient and doctor management with secure authentication.
- Overview
- Features
- Tech Stack
- Prerequisites
- Installation
- Configuration
- Running the Application
- API Endpoints
- Database Schema
- Contributing
- License
The Healthcare Management System is a comprehensive solution for managing healthcare operations. It provides a secure platform for:
- User Authentication: Email-based registration with OTP verification
- Patient Management: Complete patient records including medical history, allergies, and medications
- Doctor Management: Doctor profiles with specializations, availability, and consultation fees
- Role-Based Access: Secure access control with JWT authentication
This system aims to digitize and simplify healthcare administration, making it easier for healthcare providers to manage patient information and appointments efficiently.
- β Email-based user registration
- β OTP verification for email confirmation
- β JWT token-based authentication
- β Password encryption with BCrypt
- β Secure session management
- β Create, read, update, and delete patient records
- β Comprehensive patient profiles (personal info, medical history, allergies)
- β Emergency contact information
- β Blood group and vital statistics
- β Search patients by name
- β Doctor profiles with specialization and qualifications
- β License number verification
- β Consultation fees (in-person and online)
- β Available days and consultation hours
- β Filter doctors by specialization or department
- β Soft delete functionality (records marked inactive, not deleted)
- β Global exception handling
- β Input validation
- β RESTful API design
- β CORS support for frontend integration
- Framework: Spring Boot 4.0.2
- Language: Java 25 (LTS)
- Database: Oracle Database 23ai Free
- Security: Spring Security + JWT
- ORM: JPA/Hibernate
- Build Tool: Maven
- Email: JavaMailSender (SMTP)
- Framework: React 18
- Build Tool: Vite
- Styling: Tailwind CSS v4
- HTTP Client: Axios
- Routing: React Router v7
Before you begin, ensure you have the following installed:
- JDK 25 (or JDK 17/21)
- Maven 3.6+
- Oracle Database 23ai Free (or any Oracle DB version)
- Node.js 18+ and npm (for frontend)
- Git
git clone https://github.com/yourusername/healthcare-management-system.git
cd healthcare-management-systemDownload and install Oracle Database 23ai Free:
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
Create database user:
sqlplus sys as sysdba
CREATE USER HEALTHCARE_USER IDENTIFIED BY YourPassword123;
GRANT CONNECT, RESOURCE TO HEALTHCARE_USER;
GRANT CREATE SESSION TO HEALTHCARE_USER;
GRANT CREATE TABLE TO HEALTHCARE_USER;
GRANT CREATE SEQUENCE TO HEALTHCARE_USER;
GRANT UNLIMITED TABLESPACE TO HEALTHCARE_USER;
EXIT;cd backend
./mvnw clean installcd frontend
npm installEdit backend/src/main/resources/application.properties:
# Database
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:FREE
spring.datasource.username=HEALTHCARE_USER
spring.datasource.password=YourPassword123
# Email (Gmail)
spring.mail.username=your-email@gmail.com
spring.mail.password=your-gmail-app-password
# JWT Secret (change this!)
jwt.secret=your-super-secret-jwt-key-minimum-256-bits-longGet Gmail App Password:
- Go to Google Account β Security
- Enable 2-Step Verification
- App Passwords β Generate new app password
- Copy the 16-character password
Create frontend/.env:
VITE_API_BASE_URL=http://localhost:8080cd backend
./mvnw spring-boot:runBackend will run on: http://localhost:8080
cd frontend
npm run devFrontend will run on: http://localhost:5173
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/auth/signup |
Register new user |
| POST | /api/auth/verify |
Verify email with OTP |
| POST | /api/auth/login |
Login user |
| POST | /api/auth/resend-otp |
Resend OTP |
| GET | /api/auth/health |
Health check |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/patients |
Get all patients |
| GET | /api/patients/{id} |
Get patient by ID |
| POST | /api/patients |
Create new patient |
| PUT | /api/patients/{id} |
Update patient |
| DELETE | /api/patients/{id} |
Delete patient (soft) |
| GET | /api/patients/search?name={name} |
Search patients |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/doctors |
Get all doctors |
| GET | /api/doctors/{id} |
Get doctor by ID |
| POST | /api/doctors |
Create new doctor |
| PUT | /api/doctors/{id} |
Update doctor |
| DELETE | /api/doctors/{id} |
Delete doctor (soft) |
| GET | /api/doctors/search?name={name} |
Search doctors |
| GET | /api/doctors/specialization/{spec} |
Get by specialization |
| GET | /api/doctors/department/{dept} |
Get by department |
- USERS - User authentication and profiles
- OTPS - Email verification codes
- PATIENTS - Patient records and medical history
- DOCTORS - Doctor profiles and availability
USER_SEQOTP_SEQPATIENT_SEQDOCTOR_SEQ
curl -X POST http://localhost:8080/api/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "john@example.com",
"password": "Password123",
"name": "John Doe"
}'curl -X POST http://localhost:8080/api/patients \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"phone": "+1234567890",
"dateOfBirth": "1990-05-15",
"gender": "FEMALE",
"bloodGroup": "O+"
}'Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a 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 - see the LICENSE file for details.
Your Name
- GitHub: @AnilaAnilaN
- LinkedIn: Anila Nawaz
- Email: anilanawaz531@gmail.com
For support, email anilanawaz531@gmail.com or open an issue in the repository.