Skip to content

About

🌿 SwasthAshra – Your Health, Our Haven. Modern care, rooted in tradition, made smart and simple.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

SwasthAshra

SwasthAshra, meaning “Shelter of Health”, is an intelligent healthcare management platform built to reduce operational friction in hospitals and clinics. It is designed around one idea: replace fragmented, manual handoffs with a secure digital workflow that supports staff, doctors, pharmacy, and patients from appointment booking to discharge.

The project combines a React + Vite frontend with an Express + MySQL backend. It focuses on role-based access, patient workflow automation, discharge coordination, prescription handling, billing, documents, notifications, and reusable dashboards.

Project Vision

Modern healthcare systems often slow clinicians down with repeated data entry, disconnected tools, and long discharge cycles. SwasthAshra addresses that gap by centralizing patient data, simplifying approvals, and improving visibility across departments.

The platform is intended to support:

  • Faster patient onboarding and appointment scheduling.
  • Cleaner department handoffs with role-based access.
  • A more coordinated discharge workflow.
  • Better visibility into patient and operational status.
  • A more polished and understandable experience for demos, academic review, and real-world use.

Core Features

  • Patient registration and authentication with JWT-based sessions.
  • Role-based dashboards for patient, doctor, staff, and pharmacy users.
  • Appointment booking, viewing, cancellation, and management flows.
  • Protected routes and reusable authenticated layout patterns.
  • Discharge workflow support with PDF generation and review steps.
  • Prescription and pharmacy-related workflow screens.
  • Billing, documents, notifications, and patient profile support.
  • Landing page with branded visuals, motion, and product messaging.
  • Modular API structure for health, auth, appointments, patient, staff, doctor, billing, pharmacy, and discharge flows.

Research Context And System Gap

The project is grounded in a real operational problem: healthcare teams spend too much time on administration instead of care. Common gaps in legacy systems include:

  • Duplicate data entry across departments.
  • Limited real-time operational intelligence.
  • Fragmented patient journeys across multiple systems.
  • Slow discharge approvals caused by linear manual handoffs.
  • Usability issues that contribute to burnout and delay treatment.

SwasthAshra is positioned as a practical response to those issues by unifying key workflows into one coordinated platform.

Tech Stack

Frontend

  • React 19
  • Vite
  • React Router DOM 7
  • Tailwind CSS
  • Framer Motion
  • Axios
  • React Toastify
  • React Icons

Backend

  • Node.js
  • Express 5
  • MySQL2
  • JWT
  • bcrypt / bcryptjs
  • Multer
  • CORS
  • dotenv

Tooling

  • ESLint
  • Vite build pipeline
  • Modular Express route structure
  • SQL schema initialization script

Architecture Overview

SwasthAshra uses a client-server architecture:

  • The client provides a responsive SPA experience for dashboards, registration, and workflow screens.
  • The server exposes REST-style endpoints for authentication, appointments, patient management, pharmacy, billing, discharge, and related records.
  • MySQL acts as the shared source of truth for structured healthcare data.
  • Authentication and role checks protect sensitive routes and workflow actions.

This structure keeps the application easier to reason about while still supporting a broad healthcare workflow.

Repository Structure

swasthashra/
  client/
    public/photos/
    src/
      components/
      layouts/
      pages/
      utils/
  server/
    middleware/
    routes/
    sql/

Setup

Prerequisites

  • Node.js 18 or newer
  • MySQL 8 or compatible database

1. Install dependencies

cd server
npm install

cd ../client
npm install

2. Configure the backend

Create or update server/.env with your local environment values:

PORT=4000
DB_HOST=localhost
DB_USER=root
DB_PASS=your_password
DB_NAME=swasthashra
DB_PORT=3306
JWT_SECRET=your_secure_secret

If your local database uses different credentials or a different port, update those values accordingly.

3. Start the backend

cd server
npm run dev

4. Start the frontend

cd client
npm run dev

The client is configured to communicate with the API at http://localhost:4000/api.

Available Screens And Modules

  • Landing page for brand introduction and project presentation.
  • Authentication pages for login and registration flows.
  • Dashboard routing for different user roles.
  • Doctor dashboard for clinical workflow actions.
  • Patient dashboard for bookings and profile access.
  • Staff dashboard for operational handling.
  • Pharmacy dashboard for dispensing-related workflows.
  • Appointment modal and reusable layout components.
  • Discharge PDF generation utility.

UI Screens And Visual Assets

The repository includes branded images and media in client/public/photos.

Brand Logo

Primary brand logo

This is the main full-width logo for standard branding use. It works best on light backgrounds where the project name needs to be prominent.

Compact Header Logo

Compact header logo

This version is designed for navigation bars, headers, and narrow spaces where the full logo would feel too heavy.

Verified Badge

Verified badge

This badge can be used to communicate trust, approval, or validation in presentation material and landing-page highlights.

Hero Visual

Hero visual

This is the main healthcare hero illustration used to introduce the product and establish the clinical setting.

Animated Background Video

The landing page also includes an animated hero video stored at swasthashra/client/public/photos/down.mp4.

It is used as a background or intro visual to make the landing experience feel more polished and dynamic.

System Requirements And Technical Notes

  • The application is intended for modern desktop and laptop browsers.
  • The backend depends on a working MySQL instance and valid credentials in .env.
  • JWT is used for session protection and role-aware navigation.
  • The project stores and reuses authentication details on the client for a smoother session experience.
  • The SQL initialization script in server/sql/init_all.sql can be used to prepare the database schema.

Limitations And Future Scope

The current architecture is strong for workflow automation, but the platform can be extended further with:

  • Telehealth and video consultation support.
  • Predictive analytics for staffing, inventory, or burnout risk.
  • Wearable and remote monitoring integration.
  • Smarter discharge orchestration and alerting.
  • Expanded interoperability with external hospital systems.

References

Project Summary

SwasthAshra is built as a coordinated healthcare operations hub rather than just a patient portal. Its value is in unifying the daily workflows that typically create delays, repeated work, and avoidable errors. The result is a more transparent, role-aware, and efficient healthcare experience.

About

🌿 SwasthAshra – Your Health, Our Haven. Modern care, rooted in tradition, made smart and simple.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages