Skip to content

sayeed-mahdii/nexcare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

NEXCARE Healthcare System

A comprehensive healthcare management system built for CSE616 Capstone Project at the University of Chittagong.

NEXCARE Node.js React MySQL

πŸ“‹ Overview

NEXCARE is a full-stack healthcare management system that enables:

  • Patients to book appointments, view lab reports, and manage their health records
  • Doctors to manage appointments and view patient history
  • Administrators to manage users, departments, and branches
  • Pathologists to upload and manage lab reports

πŸš€ Features

Patient Portal

  • Online appointment booking with multi-step wizard
  • View and download lab reports
  • Medical history management
  • Real-time notifications

Doctor Dashboard

  • Today's appointments overview
  • Patient history and records
  • Appointment status management
  • Lab report access

Admin Panel

  • User management (CRUD)
  • Department management
  • Branch management
  • System statistics dashboard

Pathologist Portal

  • Lab report upload
  • Report status management
  • Patient assignment

πŸ› οΈ Tech Stack

Backend

  • Runtime: Node.js with Express.js
  • Database: MYSQL with Prisma ORM
  • Authentication: JWT
  • Real-time: Socket.io
  • Password Hashing: bcryptjs

Frontend

  • Framework: React 18 with Vite
  • Styling: TailwindCSS
  • Routing: React Router v6
  • HTTP Client: Axios
  • Notifications: React Hot Toast
  • Icons: Lucide React

πŸ“ Project Structure

nexcare/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ prisma/
β”‚   β”‚   β”œβ”€β”€ schema.prisma          # Database schema
β”‚   β”‚   └── seed.js                # Seed data
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/           # Route handlers
β”‚   β”‚   β”œβ”€β”€ middleware/            # Auth & role middleware
β”‚   β”‚   β”œβ”€β”€ routes/                # API routes
β”‚   β”‚   └── index.js               # Entry point
β”‚   └── package.json
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   β”‚   β”œβ”€β”€ contexts/              # React contexts
β”‚   β”‚   β”œβ”€β”€ pages/                 # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ admin/             # Admin pages
β”‚   β”‚   β”‚   β”œβ”€β”€ doctor/            # Doctor pages
β”‚   β”‚   β”‚   β”œβ”€β”€ patient/           # Patient pages
β”‚   β”‚   β”‚   β”œβ”€β”€ pathologist/       # Pathologist pages
β”‚   β”‚   β”‚   └── public/            # Public pages
β”‚   β”‚   └── services/              # API services
β”‚   └── package.json
└── README.md

πŸ”§ Installation

Prerequisites

  • Node.js 18 or higher
  • MySQL 8.0 or higher
  • npm or yarn

Backend Setup

  1. Navigate to backend directory: cd backend

  2. Install dependencies: npm install

  3. Create .env file: env DATABASE_URL="mysql://username:password@localhost:3306/nexcare_db" JWT_SECRET="your-super-secret-jwt-key-change-in-production" PORT=5000

  4. Generate Prisma client and run migrations: npx prisma generate npx prisma migrate dev --name init

  5. Seed the database: npm run seed

  6. Start the server: npm run dev

Frontend Setup

  1. Navigate to frontend directory: cd frontend

  2. Install dependencies: npm install

  3. Start the development server: npm run dev

The app will be available at http://localhost:5173

πŸ” Demo Accounts

After seeding the database, you can use these accounts:

Role Email Password
Admin admin@nexcare.com Password123!
Doctor dr.rahman@nexcare.com Password123!
Patient rahim@email.com Password123!
Pathologist pathologist@nexcare.com Password123!

πŸ“‘ API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login
  • GET /api/auth/me - Get current user
  • PUT /api/auth/profile - Update profile

Appointments

  • GET /api/appointments/slots - Get available slots
  • POST /api/appointments - Book appointment
  • GET /api/appointments - List appointments
  • PUT /api/appointments/:id - Update appointment
  • DELETE /api/appointments/:id - Cancel appointment

Doctors

  • GET /api/doctors - List all doctors
  • GET /api/doctors/:id - Get doctor details
  • GET /api/doctors/my/dashboard - Doctor dashboard

Patients

  • GET /api/patients/my/dashboard - Patient dashboard
  • GET /api/patients/my/appointments - Patient appointments
  • GET /api/patients/my/lab-reports - Patient lab reports

Lab Reports

  • POST /api/lab-reports - Create lab report
  • GET /api/lab-reports - List lab reports
  • PUT /api/lab-reports/:id - Update lab report

Admin

  • GET /api/users - List users
  • POST /api/users - Create user
  • PUT /api/users/:id - Update user
  • DELETE /api/users/:id - Delete user
  • GET /api/departments - List departments
  • GET /api/branches - List branches

🎨 UI Features

  • Modern Design: Clean, professional healthcare UI
  • Responsive: Works on desktop, tablet, and mobile
  • Animations: Smooth transitions and micro-interactions
  • Dark/Light: Optimized color palette for readability
  • Accessibility: Proper contrast and keyboard navigation

πŸ”’ Security Features

  • JWT-based authentication
  • Password hashing with bcrypt
  • Role-based access control
  • Protected API routes
  • Input validation

πŸ“± Screenshots

Home Page

Premium landing page with hero section, services, testimonials, and CTA. WhatsApp Image 2026-03-30 at 8 46 39 AM

Login/Register

Beautiful split-screen layout with form validation. WhatsApp Image 2026-03-30 at 8 47 02 AM

Patient Dashboard

Stats overview, upcoming appointments, and lab reports. WhatsApp Image 2026-03-30 at 8 58 02 AM (1)

Doctor Dashboard

Today's schedule, patient list, and appointment management. WhatsApp Image 2026-03-30 at 8 58 02 AM

Admin Dashboard

System statistics, user management, and configuration.

WhatsApp Image 2026-03-30 at 8 58 00 AM

πŸ§ͺ Testing

Backend tests

cd backend npm test

Frontend tests

cd frontend npm test

πŸ“ License

This project is developed for CSE616 Capstone Project at University of Chittagong.

πŸ‘₯ Contributors

  • Project Lead: CSE616 Students
  • Course: CSE616 Capstone Project
  • Institution: University of Chittagong

πŸ“§ Contact

For questions or support, please contact:


Made with ❀️ for better healthcare management img.shields.io

About

A full-stack healthcare management platform that allows patients to book appointments/lab test, manage health records/lab reports. Doctors can manage appointments and patient histories. Admins can handle user, department, and branch management. Built with Node, Express, React, MySQL, Prisma ORM, featuring RBAC, JWT authentication, and notifications

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages