A production-grade healthcare Progressive Web App (PWA) designed to eliminate physical hospital waiting queues, automate outpatient (OP) registration, provide real-time hospital geolocation, and secure seamless medical payments.
π Access Live Application Β· π± Live PWA Demo Β· π« Report Issue
Have you ever visited a hospital or clinic and had to stand in a long, crowded queue for 2 to 3 hours just to get a doctor's appointment token?
MediQ turns your phone into a smart hospital reception desk:
- π₯ Find Nearby Clinics: Uses GPS to show you the closest hospitals and available specialist doctors.
- ποΈ Book Instant Tokens: Reserve your doctor consultation token from home so you don't waste hours in crowded waiting rooms.
- π³ Pay Safely Online: Pay the consultation fee securely via UPI, Card, or NetBanking with instant digital receipts.
- π¨ One-Click Emergency Assistance: Instantly locate nearest ICU beds and emergency hospital routes during urgent situations.
Physical hospital outpatient departments (OPDs) in developing and urban environments face persistent bottlenecks:
- Overcrowded Waiting Rooms: Patients wait 2 to 4 hours in waiting lobbies just to secure an initial doctor consultation token.
- Paper-Based Record Delays: Manual registration desks increase administrative overhead and human triage error.
- Emergency Dispatch Friction: Lack of real-time hospital bed discovery and distance calculation during acute medical emergencies.
MediQ solves these challenges through a unified digital health portal, enabling patients to discover healthcare centers, book verified consultation tokens remotely, pay consultation fees online, and access emergency services from any web or mobile device.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLIENT APPLICATION LAYER β
β β
β ββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ β
β β Responsive React 18 / TS β β Capacitor Native Android Appβ β
β β (Vite + Tailwind CSS) β β (Geolocation + Push Alerts) β β
β βββββββββββββββ¬βββββββββββββ ββββββββββββββββ¬βββββββββββββββ β
ββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ
β HTTPS REST / WebSocket Realtime β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SUPABASE CLOUD BACKEND LAYER β
β β
β ββββββββββββββββββββββββββ βββββββββββββββββββββββββ β
β β Supabase Auth & JWT β βββββββββββββΊ β PostgreSQL Database β β
β β (RBAC: Patient/Doctor) β β (RLS Protected Tables)β β
β ββββββββββββββββββββββββββ βββββββββββββ¬ββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββΌββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
β Razorpay Payment Gateway API β β Google Maps & Leaflet Geolocationβ
β (Secure Token Checkout & Receipt) β β (Hospital Discovery & Routing) β
βββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββ
- Remote Slot Booking: Patients schedule appointments by selecting specialty departments (General Medicine, Cardiology, Pediatrics, Orthopedics) and available doctors.
- Live Digital Token: Generates a real-time sequential token with estimated consultation timestamps, minimizing physical lobby waiting time.
- Real-time Geolocation: Leverages
@capacitor/geolocationand@react-google-maps/api/leafletto locate the patient. - Hospital Directory: Displays nearby registered primary health centers, multi-specialty clinics, and emergency hospitals sorted by distance.
- Seamless Checkout: Integrated checkout flow for OPD consultation and registration fees via Razorpay.
- Automated Receipts: Generates downloadable, tamper-proof payment and prescription receipts using
jspdf.
- One-Tap SOS: Instant emergency routing to the nearest trauma centers with direct hotline dialing.
- Bed Availability Overview: High-level availability indicators for emergency triage.
- Offline capability and home-screen installability via standard PWA service workers.
- Android native runtime wrapper configured via Capacitor 8 (
@capacitor/android,@capacitor/core).
| Layer | Technology | Purpose |
|---|---|---|
| Frontend Framework | React 18 + Vite | Blazing-fast component rendering and HMR development |
| Language | TypeScript | Strict compile-time type safety across medical models |
| Styling & UI | Tailwind CSS + shadcn/ui | Clean, accessible medical dashboard design system |
| Backend & Database | Supabase (PostgreSQL) | Managed relational database with Row Level Security (RLS) |
| Authentication | Supabase Auth | Secure email/password and session token management |
| State & Cache | TanStack Query (React Query) | Server-state caching and real-time query invalidation |
| Mapping & Location | Google Maps API & Leaflet | Geospatial hospital search and distance computation |
| Payments | Razorpay API | Secure transaction processing and webhook confirmation |
| Mobile Runtime | Capacitor 8 | Cross-platform native bridge for Android deployment |
| Hosting & CI/CD | Vercel | Global edge network hosting with automated Git deployments |
- Node.js: v18.0.0 or higher
- npm or bun
-
Clone the repository:
git clone https://github.com/ranjithbrs/mediq-web.git cd mediq-web -
Install dependencies:
npm install
-
Configure Environment Variables: Create a
.envfile in the root directory:VITE_SUPABASE_URL=https://your-supabase-project.supabase.co VITE_SUPABASE_ANON_KEY=your-supabase-anon-key VITE_RAZORPAY_KEY_ID=your-razorpay-key-id
-
Launch the development server:
npm run dev
Open
http://localhost:5173in your browser. -
Build for Production:
npm run build
To compile and preview the native Android application:
# Sync web assets to native Android project
npx cap sync android
# Open in Android Studio
npx cap open androidRanjith B
Full-Stack Developer & CSBS Undergraduate
Panimalar Engineering College, Chennai, India
- π Live Application: mediq-web-delta.vercel.app
- πΌ LinkedIn: linkedin.com/in/ranjith-b-csbs
- π» GitHub: @ranjithbrs
- π§ Email: ranjithb2k06@gmail.com
This project is licensed under the MIT License β see the LICENSE file for details.