HealthSphere is a modern, role-based healthcare web application frontend built with Next.js. It connects to the HealthSphere backend (FastAPI) to provide a complete hospital management experience for Admins, Doctors, and Patients.
🚀 Live Web App (Vercel): 👉 https://health-sphere-frontend-eight.vercel.app
First create the users in backend at https://health-sphere-c2a3.onrender.com/docs at register endpoints then login as those users using above link.
The frontend handles:
- 🔐 Authentication & Role-based Routing
- 🧑⚕️ Doctor Dashboards (Appointments, MediSlot)
- 🧑🦽 Patient Dashboards (Appointments, Bed Requests, HealthAI)
- 🛠️ Admin Panel (Users, Doctors, Bed Allocation, Analytics)
- 📊 Charts, Status Badges, Real-time UI updates
┌─────────────────────┐
│ Frontend │
│ (Next.js, Vercel) │
│ │
│ • UI / UX │
│ • Auth Context │
│ • Role Guards │
│ • API Calls │
└─────────▲───────────┘
│ HTTPS (REST API)
▼
┌─────────────────────┐
│ Backend │
│ (FastAPI, Render) │
│ │
│ • Auth (JWT) │
│ • MediSlot │
│ • Bed Allocation │
│ • HealthAI │
│ • Admin APIs │
└─────────▲───────────┘
│
▼
┌─────────────────────┐
│ Database │
│ (PostgreSQL) │
└─────────────────────┘
This frontend will NOT work independently.
You must have the backend running first:
- Backend Repo: 👉 HealthSphere Backend https://github.com/AKHIL-SAURABH/HealthSphere-Backend
- Backend Live URL (Render): 👉 https://health-sphere-c2a3.onrender.com/
The frontend communicates with backend APIs using:
NEXT_PUBLIC_API_BASE_URL=https://health-sphere-c2a3.onrender.comMake sure this environment variable is set in Vercel → Project → Settings → Environment Variables.
# Clone repo
git clone https://github.com/your-username/health-sphere-frontend.git
cd health-sphere-frontend
# Install dependencies
npm install
# Run locally
npm run dev➡️ App runs at: http://localhost:3000
| Role | Capabilities |
|---|---|
| Admin | User management, Doctor approval, Bed allocation, Analytics |
| Doctor | Appointments, MediSlot approval, HealthAI verification |
| Patient | Book appointments, Request beds, View status, HealthAI |
- ✅ Role-based sidebar & routing
- ✅ Protected pages with auth guards
- ✅ Real-time appointment & bed status updates
- ✅ Clean, professional dark UI
- ✅ Fully deployed & production-ready
Frontend is deployed using Vercel:
- Automatic builds on GitHub push
- Optimized Next.js production build
- Secure HTTPS access
This project is built for learning, portfolio, and demonstration purposes.
