Skip to content

AdiyaTakhell/Clinic-Management-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅ MediCare CMS โ€” Clinic Management System (MERN Stack)

MediCare CMS is a modern, full-stack Clinic Management System designed to simplify day-to-day clinic operations. It streamlines patient registration, live queue management, billing, and medical record tracking while maintaining a clean, low-cognitive-load user experience.

The application is built with the MERN stack and features the custom โ€œPulseโ€ Design System โ€” a teal-and-slate visual language optimized for clarity, speed, and trust in medical environments.


Demo Credentials

This repository contains demo accounts for testing purposes only.
Please note that these credentials are not for production use.

Accounts

Receptionist Account

Doctor Account

Notes

  • These accounts are provided for demonstration and testing only.
  • Do not reuse these passwords in real environments.
  • For production systems, always use secure, unique passwords and follow best practices for authentication.

๐Ÿ“‘ Table of Contents


๐Ÿš€ Key Features

๐Ÿฅ Receptionist Dashboard

  • Patient Registration: Fast entry for new and returning patients
  • Smart Search: Lookup by patient name or phone number
  • Live Queue Management: Waiting, In-Progress, and Completed states
  • Token Generation: Automatic token assignment per doctor
  • Doctor Availability: Real-time doctor status
  • Daily Overview: Patient count, live queue, and daily revenue

๐Ÿ‘จโ€โš•๏ธ Doctor Dashboard

  • Live Queue View: See assigned patients in real time
  • Digital Prescriptions: Add diagnosis, medicines, dosage, and notes
  • Medical History: View complete patient visit timeline
  • Vitals Recording: BP, weight, temperature, etc.
  • Prescription Printing: Professional printable Rx format

๐Ÿ’ณ Billing & Invoicing

  • One-Click Billing: Generate invoices from completed appointments
  • Payment Tracking: Cash, Card, and UPI
  • Thermal / A4 Printing: Browser-based printing via react-to-print
  • Revenue Tracking: Daily billing overview

๐Ÿ“‚ Patient Records

  • Medical Timeline: Chronological vertical history view
  • Past Prescriptions: Easily accessible visit records
  • Fast Lookup: By Patient ID or Name

๐Ÿ” Security & UX

  • Role-Based Access Control: Doctor & Receptionist roles
  • JWT Authentication
  • Responsive Design: Desktop, Tablet, Mobile
  • Interactive Feedback: Toasts, loaders, and error states

๐Ÿ› ๏ธ Tech Stack

Frontend

  • React (Vite)
  • Tailwind CSS (Custom Pulse Theme)
  • TanStack Query (React Query)
  • React Router DOM
  • Lucide React (Icons)
  • React Hot Toast
  • React-to-Print

Backend

  • Node.js
  • Express.js
  • MongoDB (Mongoose)
  • JWT Authentication

โš™๏ธ Installation & Setup

Prerequisites

  • Node.js v18+
  • npm or yarn
  • MongoDB (local or Atlas)

1๏ธโƒฃ Clone the Repository

git clone https://github.com/yourusername/medicare-cms.git
cd medicare-cms

2๏ธโƒฃ Backend Setup

cd server
npm install

Create a .env file inside /server:

PORT=5000
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_super_secret_key

Start the backend:

npm run dev

3๏ธโƒฃ Frontend Setup

cd client
npm install

Create a .env file inside /client:

VITE_API_BASE_URL=http://localhost:5000/api/v1

Start the frontend:

npm run dev

Frontend runs at:

http://localhost:5173

๐Ÿ“‚ Project Structure

src/
โ”œโ”€โ”€ api/
โ”‚   โ””โ”€โ”€ axios.js            # Axios instance with interceptors
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ Layout.jsx          # Sidebar & main layout
โ”‚   โ”œโ”€โ”€ InvoiceReceipt.jsx  # Printable invoice
โ”‚   โ”œโ”€โ”€ Login.jsx
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ pages/
โ”‚   โ”œโ”€โ”€ ReceptionistDashboard.jsx
โ”‚   โ”œโ”€โ”€ DoctorDashboard.jsx
โ”‚   โ”œโ”€โ”€ PatientHistory.jsx
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ context/
โ”‚   โ””โ”€โ”€ AuthContext.jsx     # Auth & role handling
โ””โ”€โ”€ main.jsx                # App entry point

๐Ÿ“ก API Endpoints Overview

Method Endpoint Description
POST /auth/login User authentication
POST /users Create staff user
GET /users/doctors Fetch doctors
GET /appointments/today Todayโ€™s live queue
POST /appointments Register appointment
POST /patients Register patient
POST /invoices Generate & mark bill paid

๐ŸŽจ Design System (Pulse)

The Pulse Design System ensures consistency and medical-grade clarity:

  • Primary: Teal-600 (#0D9488) โ€” Actions & confirmations

  • Background: Slate-50 (#F8FAFC) โ€” Reduced eye strain

  • Surface: White (#FFFFFF) โ€” Cards & modals

  • Text:

    • Headings: Slate-900
    • Secondary: Slate-500

๐Ÿ–จ๏ธ Printing System

This app uses a frontend-only print architecture:

  1. Hidden React components (PrintInvoice, PrintPrescription)
  2. Data injected on action completion
  3. Browser print dialog triggered
  4. Users choose Save as PDF or Thermal Printer

โœ” No backend PDF generation โœ” Works on all modern browsers


๐Ÿ‘จโ€๐Ÿ’ป Creating Staff Users (Required)

โš ๏ธ There is no Admin UI yet. Doctors and Receptionists must be created using Postman.

Create a Doctor

POST http://localhost:5000/api/users

{
  "name": "Dr. John Smith",
  "email": "doctor@clinic.com",
  "password": "123",
  "role": "Doctor",
  "specialization": "Cardiologist"
}

Create a Receptionist

{
  "name": "Sarah Jones",
  "email": "reception@clinic.com",
  "password": "123",
  "role": "Receptionist"
}

Once created, log in via the frontend.


๐Ÿ”ฎ Future Enhancements

  • Admin Dashboard (UI-based staff management)
  • Appointment Scheduling (Calendar View)
  • Laboratory Management (Upload reports)
  • Patient Portal (Self-service access)
  • Inventory & Medicine Stock Management

๐Ÿค Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit changes
  4. Push to branch
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License.

Copyright (c) 2026 TAKHELLAMBAM ADIYA SINGH

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction.

See the LICENSE file for full license text.

Releases

No releases published

Packages

 
 
 

Contributors

Languages