Healthcare Predictor Architecture

Production-ready full-stack ML application demonstrating enterprise-level architecture, modern DevOps practices, and scalable machine learning deployment.

System Architecture Overview

Healthcare Predictor ArchitectureProduction Full-Stack ML ApplicationUserHealthcare ProfessionalFrontend TierNext.js 14 + ReactTailwind CSSProfessional UI/UXDeployed on VercelAPI TierFastAPI (Python)CORS + PydanticREST EndpointsDeployed on RailwayML/Data TierRandom Forest Classifier (310MB)scikit-learn + joblibHealthcare Dataset (Kaggle)GitHub Releases + LFSInfrastructure & DevOpsGitHubRailwayVercelHTTPS/TLSDocker

Data Flow: User Input → Form Validation → API Request → ML Inference → JSON Response → UI Update

Frontend Stack

  • Next.js 14 with App Router
  • React 18 with Hooks
  • Tailwind CSS
  • Lucide React Icons
  • TypeScript Ready

Backend Stack

  • FastAPI (Python 3.12)
  • Pydantic Validation
  • CORS Middleware
  • Uvicorn ASGI Server
  • REST API Design

ML/AI Stack

  • scikit-learn 1.6.1
  • Random Forest Classifier
  • Pandas Data Processing
  • Joblib Model Serialization
  • 22 Feature Engineering

Key Technical Achievements

Large Model Deployment

Successfully deployed 310MB Random Forest model using GitHub LFS and dynamic loading

CORS Integration

Configured cross-origin resource sharing for seamless frontend-backend communication

Real-time Predictions

Sub-second response times with optimized model inference and API design

Production Deployment

Multi-platform deployment with Vercel CDN and Railway containerization

Professional UI/UX

Enterprise-grade interface with comprehensive error handling and validation

DevOps Pipeline

Git-based CI/CD with automatic deployments and infrastructure as code

Technical Challenges Solved

  • Large File Hosting: GitHub's 100MB limit required LFS implementation and GitHub Releases strategy
  • CORS Configuration: Cross-origin policies needed careful configuration for production domains
  • Platform Limitations: Railway's serverless constraints required external model storage solution
  • API Design: RESTful endpoints with proper validation, error handling, and response formatting

Performance Metrics

Model Size310 MB
Feature Count22 inputs
API Response Time~500ms
Model Loading Time~30 seconds
Frontend Load Time~1.2 seconds
Concurrent UsersScalable

Development Approach

1

Planning

Architecture design, technology selection, and requirements analysis

2

Development

Iterative development with Streamlit prototype evolving to production API

3

Integration

Frontend-backend integration with comprehensive error handling

4

Deployment

Production deployment with monitoring, security, and scalability

Ready to Experience the Application?

See the healthcare predictor in action and test the real-time ML predictions.