Skip to content

Repository files navigation

HealSync Pro

A modern hospital management and patient queue system built with React, TypeScript, Vite, and Zustand. This project is a role-based healthcare dashboard designed to model real hospital operations across patient, receptionist, doctor, and admin workflows.

Hospital management dashboard

1) What this app does

HealSync Pro helps manage a healthcare facility by combining:

  • patient appointment booking
  • live queue tracking
  • walk-in patient intake
  • receptionist queue management
  • doctor consultation workflows
  • hospital analytics and reporting
  • secure-feeling role-based portal navigation

This app is built as a frontend-first hospital management dashboard and is designed to be extended into a full production platform later.

2) What is new in this version

This version improves the application from a pure demo mockup into a more realistic frontend foundation.

Major updates

  • validated login credentials instead of always-authenticated mock access
  • persistent session handling for login state
  • improved role-based behavior for patient, receptionist, doctor, and admin views
  • fixed route consistency issues for patient history navigation
  • added triage logic for walk-in patient intake
  • queue items can now carry red/yellow/green priority status
  • basic regression testing added to protect auth and triage logic
  • project documentation improved for easier onboarding

3) Triage feature in this app

The triage feature is part of the receptionist workflow.

Triage purpose

When a patient arrives without a scheduled appointment, the receptionist can assess their condition and classify the patient into one of these categories:

  • Red Flag: immediate attention required
  • Yellow Flag: urgent but not critical; faster review needed
  • Green Flag: routine / non-urgent handling

Triage inputs used

The app evaluates urgency using values such as:

  • chief complaint
  • pain score
  • systolic blood pressure
  • pulse
  • oxygen saturation

How it works

  1. In the receptionist portal, open the Walk-In Registration page.
  2. Enter patient information.
  3. Fill the triage fields.
  4. The app calculates triage severity automatically.
  5. The triage result is attached to the queue ticket.
  6. The queue management page shows the status with a badge.

This ensures the live queue reflects triage urgency and not just the normal waiting order.

4) Portal structure

Patient portal

  • dashboard
  • appointment booking
  • live queue status
  • upcoming visits
  • appointment history
  • notifications
  • profile

Receptionist portal

  • queue management
  • walk-in registration
  • appointments
  • patient directory
  • doctor availability
  • triage-based intake assessment

Doctor portal

  • consultation queue
  • schedule
  • patient details
  • profile status

Admin portal

  • executive dashboard
  • analytics
  • doctor management
  • patient management
  • appointments data
  • departments
  • reports
  • system settings

5) Tech stack

  • React 19
  • TypeScript
  • Vite
  • React Router DOM
  • Zustand
  • Tailwind CSS
  • Lucide React
  • Recharts
  • Axios
  • Socket.IO Client
  • Vitest

6) Before you clone and run the app

Prerequisites

Make sure the following are installed on your machine:

  • Node.js 18 or newer
  • npm
  • Git

Important note

This project uses seeded mock data and is primarily a frontend-first hospital management demo. It does not require a backend API to work locally, but the architecture is structured so it can later connect to a real database and server.

7) Step-by-step setup

Step 1: Clone the repo

git clone <your-repository-url>
cd medical-queue

Step 2: Install dependencies

npm install

This installs all frontend dependencies required to run the app.

Step 3: Start the development app

npm run dev

This starts the Vite dev server.

Open the app here:

Step 4: Build the app for production

npm run build

This creates a production-ready build in the dist folder.

Step 5: Run tests

npm test -- --run

This validates the core auth and triage logic using Vitest.

8) Demo login credentials

These are the built-in seeded user accounts for the app:

  • Patient: alexander.w@example.com / password123
  • Receptionist: clara.reception@citycare.org / password123
  • Doctor: sarah.jenkins@citycare.org / password123
  • Admin: raymond.admin@citycare.org / password123

Use them to switch between the different dashboards.

9) Where the important app logic lives

medical-queue/
├── src/
│   ├── App.tsx                     # route setup and portal layout
│   ├── components/                # reusable UI components
│   ├── data/
│   │   └── mockData.ts            # seeded hospital, doctor, patient, queue data
│   ├── layouts/                   # public and portal layouts
│   ├── pages/
│   │   ├── patient/
│   │   ├── receptionist/
│   │   ├── doctor/
│   │   └── admin/
│   ├── services/
│   │   ├── api.ts                 # API wrapper setup
│   │   └── socketService.ts       # simulated live queue updates
│   ├── store/
│   │   ├── useAuthStore.ts        # authentication/session state
│   │   ├── useQueueStore.ts       # queue and triage logic
│   │   ├── useThemeStore.ts       # dark/light mode
│   │   └── useToastStore.ts       # toast notifications
│   ├── types/
│   │   └── index.ts               # app data models and enums
│   └── main.tsx
├── package.json
├── vite.config.ts
├── tsconfig.json
├── index.html
├── README.md
└── dist/                         # production build output

10) Production-ready direction

This app is a strong frontend foundation for a real hospital management platform. The next production stages would typically include:

  • backend API integration
  • database persistence
  • JWT authentication and refresh tokens
  • patient record management
  • audit logging
  • role-based permission enforcement
  • deployment pipeline and cloud hosting
  • EMR integration for prescriptions and consultations

11) Notes and limitations

  • The app uses mock data for a realistic demo experience.
  • Queue updates are simulated in the frontend for demonstration purposes.
  • The triage logic is rule-based and designed for UI validation and demo workflows.
  • This is a strong base before connecting to a real hospital backend system.

12) License

This project is intended for learning, prototyping, and internal demo usage unless a separate license is added by the repository owner.

13) Project status

Status: demo-to-production frontend foundation completed, with improved auth flow, triage assessment, and queue workflow updates for a more realistic hospital management experience.

About

medical system : to solve the issue of queue and quick treatment

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages