Skip to content

Repository files navigation

πŸ₯ Med-Varta

Real-Time Healthcare Communication & Case Management Platform

Vercel Next.js TypeScript Prisma Tailwind Clerk WebSockets

πŸ–₯️ Live Application Preview

Med-Varta Screenshot

☝️ Click the image to visit the live site. The preview auto-refreshes to match your latest deployment.

Med-Varta is a real-time healthcare coordination platform designed to improve communication between medical professionals, hospitals, and healthcare systems.

The platform enables patient tracking, case management, facility coordination, and real-time system updates using a scalable microservices architecture.

It is built with Next.js, TypeScript, Prisma, and WebSockets to ensure high performance and real-time synchronization.


πŸš€ Key Features

πŸ‘¨β€βš•οΈ Patient Management

  • Register and manage patient records
  • Track patient details and medical information
  • Centralized patient database

πŸ“‹ Case Management

  • Create and manage medical cases
  • Track case status and updates
  • Assign cases to healthcare facilities

⚑ Real-Time Updates

  • WebSocket-based communication
  • Instant updates across the system
  • Live event notifications

πŸ₯ Facility Management

  • Manage hospitals and medical facilities
  • Assign cases to facilities
  • Facility-based analytics

πŸ” Secure Authentication

  • Powered by Clerk
  • Role-based access control
  • Secure session handling

πŸ“Š Dashboard & Analytics

  • Real-time statistics
  • Healthcare activity insights
  • Case monitoring dashboard

🧠 System Architecture

Med-Varta follows a modular microservices architecture for scalability and performance.

Client (Next.js UI)
        β”‚
        β–Ό
API Layer (Next.js API Routes)
        β”‚
        β–Ό
Service Layer
 β”œβ”€β”€ Realtime Service
 β”œβ”€β”€ Priority Gateway
 └── Compression Service
        β”‚
        β–Ό
Database (Prisma ORM)

🧩 Microservices

⚑ Realtime Service

Handles WebSocket communication for live system updates.

🚦 Priority Gateway

Manages request prioritization to ensure important healthcare operations are processed first.

πŸ“¦ Compression Service

Optimizes data transfer between services to reduce bandwidth and improve speed.


πŸ›  Tech Stack

Frontend

  • Next.js 14
  • React
  • TypeScript
  • Tailwind CSS
  • shadcn/ui

Backend

  • Next.js API Routes
  • Node.js
  • WebSockets

Database

  • Prisma ORM
  • SQLite / relational database

Authentication

  • Clerk Authentication

Dev Tools

  • Bun
  • ESLint
  • PostCSS

πŸ“‚ Project Structure

Med-Varta
β”‚
β”œβ”€β”€ src
β”‚   β”œβ”€β”€ app
β”‚   β”‚   β”œβ”€β”€ api
β”‚   β”‚   β”‚   β”œβ”€β”€ auth
β”‚   β”‚   β”‚   β”œβ”€β”€ patients
β”‚   β”‚   β”‚   β”œβ”€β”€ cases
β”‚   β”‚   β”‚   β”œβ”€β”€ facilities
β”‚   β”‚   β”‚   └── dashboard
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ sign-in
β”‚   β”‚   └── sign-up
β”‚   β”‚
β”‚   β”œβ”€β”€ components
β”‚   β”‚   └── ui
β”‚   β”‚
β”‚   β”œβ”€β”€ hooks
β”‚   └── lib
β”‚
β”œβ”€β”€ mini-services
β”‚   β”œβ”€β”€ realtime-service
β”‚   β”œβ”€β”€ priority-gateway
β”‚   └── compression-service
β”‚
β”œβ”€β”€ prisma
β”œβ”€β”€ public
└── db

βš™οΈ Installation

1️⃣ Clone the repository

git clone https://github.com/Sadiqueahmed/Med-Varta-.git
cd Med-Varta

2️⃣ Install dependencies

Using bun

bun install

or using npm

npm install

3️⃣ Setup environment variables

Create a .env file

DATABASE_URL=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=

4️⃣ Setup database

npx prisma generate
npx prisma db push

5️⃣ Run development server

bun run dev

or

npm run dev

Application will start on

http://localhost:3000

πŸ”— API Endpoints

Authentication

/api/auth/me

Patients

/api/patients

Cases

/api/cases
/api/cases/:id

Facilities

/api/facilities

Dashboard

/api/dashboard/stats

Users

/api/users

Sync

/api/sync

Webhooks

/api/webhooks/clerk

πŸ§ͺ WebSocket Example

Example implementation available in:

examples/websocket

Includes:

  • WebSocket client
  • WebSocket server

🚧 Future Improvements

  • AI assisted diagnosis suggestions
  • Medical record encryption
  • Telemedicine video consultation
  • Mobile application support
  • Advanced analytics dashboard

🀝 Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create a feature branch

git checkout -b feature/new-feature
  1. Commit changes
git commit -m "Add new feature"
  1. Push to branch
git push origin feature/new-feature
  1. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License.


πŸ‘¨β€πŸ’» Author

Sadique Ahmed

GitHub
https://github.com/Sadiqueahmed

About

"Med-Varta," a low-bandwidth tele-triage system for Northeast India.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages