Skip to content

About

Modern Next.js frontend for HealthSphere featuring role-based dashboards, appointment booking, bed allocation workflows, responsive UI, and seamless integration with a FastAPI backend—deployed on Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation


🌐 HealthSphere Frontend

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.

HealthAI Banner


🚀 Live Web App (Vercel): 👉 https://health-sphere-frontend-eight.vercel.app

⚠️ Important: The frontend requires the backend server to be running (deployed on Render) to function correctly.

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.


🧭 Application Overview

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

🏗️ Architecture Overview

┌─────────────────────┐
│     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)      │
└─────────────────────┘

⚙️ Tech Stack — Frontend

🚀 Core Technologies

Next.js React TypeScript


🎨 Styling & UI

Tailwind CSS Dark Mode


🔐 Authentication & State

JWT Context API


📊 Data Visualization

Recharts


☁️ Deployment & Hosting

Vercel GitHub


🔗 Backend Dependency (Very Important)

This frontend will NOT work independently.

You must have the backend running first:

The frontend communicates with backend APIs using:

NEXT_PUBLIC_API_BASE_URL=https://health-sphere-c2a3.onrender.com

Make sure this environment variable is set in Vercel → Project → Settings → Environment Variables.


🛠️ Local Development Setup

# 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

⚠️ Backend must be running for login & dashboards to work.


🔐 User Roles Supported

Role Capabilities
Admin User management, Doctor approval, Bed allocation, Analytics
Doctor Appointments, MediSlot approval, HealthAI verification
Patient Book appointments, Request beds, View status, HealthAI

📌 Key Features

  • ✅ Role-based sidebar & routing
  • ✅ Protected pages with auth guards
  • ✅ Real-time appointment & bed status updates
  • ✅ Clean, professional dark UI
  • ✅ Fully deployed & production-ready

🚀 Deployment

Frontend is deployed using Vercel:

  • Automatic builds on GitHub push
  • Optimized Next.js production build
  • Secure HTTPS access

📄 License

This project is built for learning, portfolio, and demonstration purposes.


About

Modern Next.js frontend for HealthSphere featuring role-based dashboards, appointment booking, bed allocation workflows, responsive UI, and seamless integration with a FastAPI backend—deployed on Vercel.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages