A comprehensive digital platform connecting patients with healthcare providers, featuring appointment booking, prescription management, and secure communication.
- β¨ Features
- π οΈ Tech Stack
- ποΈ Architecture
- π Quick Start
- π± User Roles
- π§ Configuration
- π Database Schema
- π Security Features
- π API Documentation
- π Deployment
- π Contributing
- π License
- User Registration & Authentication - Secure account creation with JWT tokens
- Doctor Search & Discovery - Browse doctors by specialization, location, and availability
- Appointment Booking - Easy scheduling with real-time availability
- Appointment Management - View, reschedule, and cancel appointments
- Profile Management - Update personal information and medical history
- Review System - Rate and review doctors after appointments
- OAuth2 Integration - Quick login with Google accounts
- Professional Registration - Detailed profile setup with credentials verification
- Availability Management - Set working hours and days
- Appointment Dashboard - Manage incoming and scheduled appointments
- Patient Management - View patient history and medical records
- Prescription Management - Digital prescription creation and management
- Profile Customization - Professional profile with specializations
- Earnings Tracking - Monitor consultation fees and payments
- Doctor Verification - Approve/reject doctor registrations
- User Management - Manage patients and doctors
- Platform Analytics - System statistics and monitoring
- Content Management - Manage medical information and categories
- Security Oversight - Monitor system security and user activities
- Razorpay Integration - Secure payment processing
- Multiple Payment Methods - Credit cards, UPI, net banking
- Payment History - Track all transactions
- Angular 16.2.0 - Modern web framework
- Angular Material - UI component library
- Bootstrap 5.3.0 - Responsive design framework
- TypeScript 5.1.0 - Type-safe JavaScript
- RxJS 7.8.0 - Reactive programming
- Spring Boot 3.1.5 - Java application framework
- Spring Security - Authentication and authorization
- Spring Data JPA - Database abstraction layer
- Spring Boot OAuth2 - Social login integration
- JWT (JSON Web Tokens) - Stateless authentication
- ModelMapper - Object mapping utility
- MySQL 8.0 - Relational database management system
- JPA/Hibernate - Object-relational mapping
- Maven - Build automation and dependency management
- Razorpay Java SDK - Payment gateway integration
- Commons IO - File upload utilities
- Spring Boot Mail - Email notifications
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β (Angular) βββββΊβ (Spring Boot) βββββΊβ (MySQL) β
β Port: 4200 β β Port: 8081 β β Port: 3306 β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β β
β β β
βΌ βΌ βΌ
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β OAuth2 β β JWT Security β β File Storage β
β (Google) β β (Authentication)β β (Uploads) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Presentation Layer - Angular frontend with responsive UI
- Business Logic Layer - Spring Boot REST API
- Data Access Layer - JPA repositories and MySQL
- Security Layer - JWT authentication and OAuth2
- Integration Layer - Payment gateway and email services
- Java 17 or higher
- Node.js 18+ and npm
- MySQL 8.0+
- Maven 3.6+
git clone https://github.com/Gourav3308/Healthbridge.git
cd Healthbridge# Create MySQL database
mysql -u root -p
CREATE DATABASE healthprj;
USE healthprj;
# Import schema
mysql -u root -p healthprj < database/schema.sqlcd backend
# Update database credentials in application.yml
# Edit: src/main/resources/application.yml
# Update: datasource.username and datasource.password
# Build and run
mvn clean install
mvn spring-boot:runBackend will be available at: http://localhost:8081
cd frontend
# Install dependencies
npm install
# Update API endpoint in environment files
# Edit: src/environments/environment.ts
# Update: apiUrl to match your backend URL
# Start development server
ng serveFrontend will be available at: http://localhost:4200
- Visit
http://localhost:4200 - Register as a patient or doctor
- Admin login:
adminhealth@gmail.com/admin123
- Email:
adminhealth@gmail.com - Password:
admin123 - Access: Full platform management
- Registration: Public registration available
- Access: Book appointments, view doctors, manage profile
- Verification: Email verification required
- Registration: Professional registration with credentials
- Verification: Admin approval required before activation
- Access: Manage appointments, view patients, create prescriptions
# Database
spring:
datasource:
url: jdbc:mysql://localhost:3306/healthprj
username: your_username
password: your_password
# JWT
jwt:
secret: your-secret-key
expiration: 86400000
# Email (Gmail)
spring:
mail:
username: your-email@gmail.com
password: your-app-password
# OAuth2 (Google)
spring:
security:
oauth2:
client:
registration:
google:
client-id: your-google-client-id
client-secret: your-google-client-secret
# Razorpay
razorpay:
key:
id: your-razorpay-key-id
secret: your-razorpay-secretexport const environment = {
production: false,
apiUrl: 'http://localhost:8081/api',
razorpayKey: 'your-razorpay-key-id'
};- users - Base user information (patients, doctors, admins)
- patients - Extended patient profile and medical history
- doctors - Professional doctor information and credentials
- appointments - Appointment scheduling and management
- doctor_reviews - Patient reviews and ratings
- doctor_availability - Doctor working hours and availability
users (1:1) patients
users (1:1) doctors
patients (1:N) appointments
doctors (1:N) appointments
doctors (1:N) doctor_availability
- JWT Tokens - Stateless authentication with 24-hour expiration
- Role-Based Access Control - PATIENT, DOCTOR, ADMIN roles
- OAuth2 Integration - Google social login
- Password Encryption - BCrypt hashing
- CORS Configuration - Cross-origin request security
- Input Validation - Server-side validation for all inputs
- SQL Injection Prevention - JPA/Hibernate parameterized queries
- File Upload Security - Type and size validation
- Rate Limiting - Request throttling
- Secure Headers - CSRF protection and security headers
- Request Logging - Audit trail for security monitoring
POST /api/auth/login - User login
POST /api/auth/register - User registration
POST /api/auth/refresh - Token refresh
POST /api/auth/oauth2/google - Google OAuth2 login
GET /api/patients/profile - Get patient profile
PUT /api/patients/profile - Update patient profile
GET /api/patients/doctors - Search doctors
POST /api/patients/appointments - Book appointment
GET /api/doctors/profile - Get doctor profile
PUT /api/doctors/profile - Update doctor profile
GET /api/doctors/appointments - Get doctor appointments
PUT /api/doctors/appointments/:id - Update appointment status
GET /api/admin/doctors - Get all doctors
PUT /api/admin/doctors/:id/approve - Approve doctor
GET /api/admin/statistics - Platform statistics
-
Backend Deployment:
- Connect GitHub repository to Render
- Set build command:
mvn clean install - Set start command:
java -jar target/healthbridge-backend-1.0.0.jar - Configure environment variables
-
Frontend Deployment:
- Create new Static Site on Render
- Connect to your repository
- Set build command:
cd frontend && npm install && npm run build - Set publish directory:
frontend/dist
-
Backend Deployment:
- Connect GitHub repository to Railway
- Railway will auto-detect Spring Boot
- Configure database and environment variables
-
Frontend Deployment:
- Deploy as separate service
- Use static hosting with build configuration
# Database
DATABASE_URL=mysql://username:password@host:port/database
# JWT
JWT_SECRET=your-production-secret-key
# Email
MAIL_USERNAME=your-production-email
MAIL_PASSWORD=your-production-password
# OAuth2
GOOGLE_CLIENT_ID=your-production-google-client-id
GOOGLE_CLIENT_SECRET=your-production-google-client-secret
# Razorpay
RAZORPAY_KEY_ID=your-production-razorpay-key
RAZORPAY_SECRET=your-production-razorpay-secretWe welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Angular and Spring Boot best practices
- Write meaningful commit messages
- Add tests for new features
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Email: healthbridge13012002@gmail.com
- Issues: GitHub Issues
- Documentation: Check the
docs/folder for detailed guides
- Spring Boot Team - For the excellent framework
- Angular Team - For the powerful frontend framework
- Razorpay - For payment integration
- Google - For OAuth2 authentication
- MySQL - For reliable database management
Made with β€οΈ for better healthcare accessibility
Healthbridge - Connecting Healthcare, Building Trust