An open API service indexing awesome lists of open source software.

https://github.com/karanhimadri/prescripto-backend-springboot

A comprehensive healthcare management platform built with Spring Boot that connects patients with healthcare providers, enabling seamless appointment booking, profile management, and secure payment processing.
https://github.com/karanhimadri/prescripto-backend-springboot

java-17-maven jpa-hibernate jwt-authentication loombok multi-role-authentication mysql-database razorpay-payment spring-boot spring-mvc spring-security tomcat-server

Last synced: 8 months ago
JSON representation

A comprehensive healthcare management platform built with Spring Boot that connects patients with healthcare providers, enabling seamless appointment booking, profile management, and secure payment processing.

Awesome Lists containing this project

README

          

# πŸ₯ Prescripto - Cloud-Ready Healthcare Management System

> **A production-grade, cloud-deployed Spring Boot application demonstrating full-stack development, DevOps practices, and enterprise-level architecture**

[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-3.5.3-brightgreen.svg)](https://spring.io/projects/spring-boot)
[![Java](https://img.shields.io/badge/Java-17+-orange.svg)](https://www.oracle.com/java/)
[![MySQL](https://img.shields.io/badge/MySQL-8.0+-blue.svg)](https://www.mysql.com/)
[![Docker](https://img.shields.io/badge/Docker-Containerized-blue.svg)](https://www.docker.com/)
[![Render](https://img.shields.io/badge/Deployed-Render.com-success.svg)](https://render.com/)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

## πŸš€ Project Overview

Prescripto is a **fully-deployed, cloud-ready healthcare management backend** that showcases modern software development practices, from code to production deployment. This project demonstrates expertise in **Spring Boot development**, **cloud deployment**, **DevOps workflows**, and **production-ready architecture**.

## πŸ’Ό Professional Skills Demonstrated

### πŸ—οΈ **Backend Development Excellence**
- **Spring Boot** ecosystem mastery with secure, scalable architecture
- **RESTful API** design with proper HTTP methods and status codes
- **JWT Authentication** with role-based access control (RBAC)
- **Database modeling** with JPA/Hibernate and MySQL optimization
- **Payment integration** with Razorpay API for secure transactions

### ☁️ **DevOps & Cloud Deployment**
- **Docker containerization** for consistent development-to-production environments
- **Cloud deployment** on Render.com using both Docker and GitHub integration
- **Database hosting** on Railway with environment-based configuration
- **Application monitoring** with Spring Boot Actuator and health endpoints
- **Service availability** management with UptimeRobot monitoring

### πŸ” **Security & Production Readiness**
- **Spring Security** implementation with JWT filter chains
- **Environment-based configuration** with secure credential management
- **File upload handling** with security validations
- **CORS configuration** for cross-origin security
- **Production monitoring** with health checks and observability

## ✨ Key Features & Achievements

### 🎯 **What I Built and Deployed**
- βœ… **JWT-secured REST APIs** for Patients, Doctors, and Admins with role-based access
- βœ… **Dockerized Spring Boot application** for consistent dev-to-deploy environments
- βœ… **Cloud deployment** to Render.com using both Docker and GitHub-based methods
- βœ… **Cloud database integration** with Railway MySQL using environment variables
- βœ… **Payment processing** with Razorpay API for appointment transactions
- βœ… **File management system** for image uploads with static file serving
- βœ… **Health monitoring** endpoints (`/actuator/health`, `/v1/`) for observability
- βœ… **Production-ready configuration** with security and monitoring best practices

## πŸ› οΈ Technology Stack & Architecture

| **Category** | **Technology** | **Purpose** |
|--------------|----------------|-------------|
| **Backend Framework** | Spring Boot 3.5.3 | RESTful API development with enterprise features |
| **Language** | Java 17+ | Modern Java with latest language features |
| **Database** | MySQL 8.0+ (Railway Cloud) | Relational database with cloud hosting |
| **Security** | Spring Security + JWT | Stateless authentication with role-based access |
| **Payment** | Razorpay API | Secure payment processing for healthcare services |
| **DevOps** | Docker + Render.com | Containerization and cloud deployment |
| **Monitoring** | Spring Actuator | Application health and metrics monitoring |
| **Architecture** | MVC + Repository Pattern | Clean, maintainable code structure |

### �️ **Enterprise Architecture Pattern**
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Controllers β”‚ ──▢│ Services β”‚ ──▢│ Repositories β”‚
β”‚ (REST Layer) β”‚ β”‚ (Business Logic)β”‚ β”‚ (Data Access) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚
β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ DTOs β”‚ β”‚ Utilities β”‚ β”‚ JPA Entities β”‚
β”‚ (Data Transfer) β”‚ β”‚ (Helpers) β”‚ β”‚ (Database Maps) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## 🌐 Deployment & DevOps Workflow

### **Production Deployment Stack**
- **🐳 Docker Hub**: Container registry for application images
- **☁️ Render.com**: Cloud platform for application hosting
- **πŸ—„οΈ Railway**: Cloud MySQL database hosting
- **πŸ“Š UptimeRobot**: Service monitoring to prevent free-tier sleep
- **πŸ” Environment Variables**: Secure credential management

### **Deployment Methods Mastered**
1. **Docker-based Deployment**: Built, tagged, and pushed images to Docker Hub
2. **GitHub Integration**: Direct deployment from repository with auto-builds
3. **Environment Management**: Configured production variables via Render dashboard
4. **Database Connectivity**: Connected Spring Boot to cloud MySQL via environment configs

## οΏ½ Learning Outcomes & Professional Growth

### **Full-Stack Development Lifecycle Mastery**
- βœ… **Code β†’ Container β†’ Cloud**: Complete development-to-production pipeline
- βœ… **Production-Ready Design**: Security, monitoring, and role-based access control
- βœ… **DevOps Integration**: Docker workflows and cloud deployment strategies
- βœ… **Real-World Tools**: UptimeRobot, Railway, Actuator, and Spring Cloud concepts

### **Enterprise Development Practices**
- βœ… **Stateless Backend Architecture** with JWT authentication
- βœ… **SecurityFilterChain** implementation for fine-grained access control
- βœ… **Clean Architecture** with Controller β†’ Service β†’ Repository pattern
- βœ… **Environment-based Configuration** for development, testing, and production

## πŸš€ Quick Start Guide

### **Prerequisites**
- Java 17+, MySQL 8.0+, Docker (optional)
- Razorpay account for payment testing
- Cloud accounts: Render.com, Railway (for production deployment)

### **Local Development Setup**
```bash
# Clone and navigate to project
git clone https://github.com/karanhimadri/prescripto.git
cd prescripto

# Build and run application
./mvnw clean install
./mvnw spring-boot:run

# Access application
curl http://localhost:8080/v1/ # Health check
```

### **Docker Deployment**
```bash
# Build Docker image
docker build -t prescripto:latest .

# Run with volume mounting for uploads
docker run -p 8080:8080 -v $(pwd)/uploads:/app/uploads prescripto:latest

# Push to Docker Hub (production workflow)
docker tag prescripto:latest username/prescripto:latest
docker push username/prescripto:latest
```

## οΏ½ API Architecture & Endpoints

### **Security Implementation**
- **πŸ” JWT Authentication**: Stateless token-based security
- **πŸ›‘οΈ Role-Based Access**: Patient, Doctor, Admin authorization levels
- **πŸ”’ BCrypt Encryption**: Secure password hashing
- **🌐 CORS Configuration**: Cross-origin request security

### **Core API Endpoints**

#### **Public Access** (No Authentication)
```http
GET /v1/ # Health check & welcome
POST /v1/panel/login # Admin/Doctor authentication
GET /actuator/health # Application monitoring endpoint
```

#### **Patient Operations** (JWT Required)
```http
POST /patient/create-account # User registration
POST /patient/login # Patient authentication
GET /patient/me # Profile retrieval
POST /patient/book-appointment # Appointment booking
POST /patient/upload-patient-image # Profile image upload
```

#### **Admin Operations** (Admin JWT Required)
```http
POST /admin/create-doctor # Doctor onboarding with image upload
GET /admin/dashboard # Administrative overview
```

#### **Payment Processing** (JWT Required)
```http
POST /api/payment/create-order # Razorpay order creation
POST /api/payment/verify # Payment verification & completion
```

## οΏ½ Database Design & Cloud Integration

### **Production Database Architecture**
- **🌐 Railway Cloud MySQL**: Hosted database with environment-based connectivity
- **πŸ”„ Auto-Schema Management**: Hibernate DDL auto-updates for seamless deployments
- **πŸ“Š Entity Relationships**: JPA-mapped associations between core healthcare entities
- **πŸ” Query Optimization**: MySQL 8 dialect with performance tuning

### **Core Data Models**
| **Entity** | **Purpose** | **Key Features** |
|------------|-------------|------------------|
| `Admin` | System administration | BCrypt authentication, role management |
| `Patient/PatientInfo` | User management | Split model for auth vs. profile data |
| `Doctor` | Healthcare providers | Specialization tracking, image uploads |
| `Appointment` | Service bookings | Patient-doctor relationships, payment integration |
| `PaymentInfo` | Transaction records | Razorpay integration, payment verification |

## πŸ”§ Production Configuration Management

### **Environment-Based Security**
```bash
# Production Environment Variables (Render.com)
DATABASE_URL=mysql://railway-cloud-connection
RAZORPAY_KEY_ID=rzp_live_production_key
RAZORPAY_KEY_SECRET=production_secret_key
JWT_SECRET=64-character-production-secret
ADMIN_EMAIL=production-admin@domain.com
```

### **Cloud Configuration Features**
- βœ… **Secure credential management** via environment variables
- βœ… **Database connection pooling** for high-availability
- βœ… **File upload security** with multipart validation
- βœ… **CORS configuration** for frontend integration
- βœ… **Actuator endpoints** for monitoring and health checks

## πŸ“Š Project Impact & Professional Value

### **Technical Leadership Demonstrated**
- 🎯 **Full-Stack Ownership**: End-to-end development from database design to cloud deployment
- πŸ—οΈ **Architecture Design**: Scalable, maintainable code structure following enterprise patterns
- πŸ” **Security Implementation**: Production-grade authentication and authorization systems
- ☁️ **DevOps Integration**: Modern deployment workflows with containerization

### **Production-Ready Implementation**
- βœ… **Monitoring & Observability**: Health checks, metrics, and uptime monitoring
- βœ… **Payment Processing**: Secure financial transactions with signature verification
- βœ… **File Management**: Secure upload/download with proper validation
- βœ… **Database Optimization**: Connection pooling, query optimization, and cloud hosting

## 🎯 Resume-Ready Accomplishments

**"Developed and deployed a cloud-ready Spring Boot healthcare management system demonstrating:**
- **Backend Development**: RESTful APIs with JWT authentication and role-based access control
- **Cloud Deployment**: Dockerized application deployed to Render.com with Railway database integration
- **Payment Integration**: Secure Razorpay payment processing with transaction verification
- **DevOps Practices**: Container workflows, environment management, and production monitoring"

## οΏ½ Live Demo & Resources

### **Production Links**
- 🌐 **Live Application**: [Deployed on Render.com](https://prescripto-backend.onrender.com/v1/)
- πŸ’Ύ **Docker Image**: Available on Docker Hub
- πŸ“Š **Monitoring**: UptimeRobot health checks configured
- πŸ—„οΈ **Database**: Railway cloud MySQL hosting

### **Test Credentials**
- **Admin Login**: `admin@gmail.com` / `admin123`
- **Payment Testing**: Razorpay test mode enabled
- **Health Check**: `/actuator/health` endpoint active

## πŸ‘¨β€πŸ’» Developer Profile

**Himadri Karan**
*Backend Developer & Cloud Solutions Specialist*

- πŸ“§ **Email**: [Karanhimadri1234@gmail.com](mailto:Karanhimadri1234@gmail.com)
- πŸ’Ό **LinkedIn**: [linkedin.com/in/himadrikaran](https://linkedin.com/in/himadrikaran)
- 🌐 **Portfolio**: [Himadri.me](https://himadri.me)
- οΏ½ **GitHub**: [github.com/karanhimadri](https://github.com/karanhimadri)

---

## 🌟 Why This Project Matters

This project showcases the complete software development lifecycle that employers value:
- **Problem Solving**: Built a complex healthcare domain application
- **Modern Architecture**: Used current industry-standard frameworks and patterns
- **Production Deployment**: Handled real-world deployment challenges and solutions
- **Security Focus**: Implemented enterprise-level authentication and data protection
- **DevOps Integration**: Demonstrated modern development and deployment practices

---

⭐ **Star this repository to see more enterprise-level projects!**

πŸ“§ **Interested in collaboration?** Let's connect and build something amazing together.