Skip to content

Boaz-marube/Health_Bridge_App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

183 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ₯ Health Bridge

Health Bridge Logo

Your Digital Bridge to Better Healthcare

Live Demo License Node.js TypeScript


πŸ“Έ Application Preview

Health Bridge Application Preview

🌟 Overview

Health Bridge is a very comprehensive digital healthcare platform that revolutionizes the way patients, doctors, and healthcare staff interact. Built with modern web technologies, it provides seamless appointment booking, real-time queue management, AI-powered assistance, and secure medical record management.

✨ Key Features

  • πŸ” Multi-Role Authentication - Secure login for Patients, Doctors, and Staff
  • πŸ“… Smart Appointment Booking - Intuitive scheduling with real-time availability
  • ⏱️ Live Queue Management - Real-time queue updates and position tracking
  • πŸ€– AI Healthcare Assistant - Intelligent chatbot for health queries and support
  • πŸ“‹ Digital Medical Records - Secure storage and management of health records
  • πŸ’Š Prescription Management - Digital prescriptions and medication tracking
  • πŸ§ͺ Lab Results Integration - Seamless lab result viewing and management
  • πŸ“± Responsive Design - Optimized for desktop, tablet, and mobile devices
  • πŸ”” Real-time Notifications - Instant updates via WebSocket connections
  • πŸŒ™ Dark/Light Mode - User-preferred theme switching

πŸš€ Live Demo

🌐 Visit Health Bridge Live


πŸ› οΈ Technology Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS + Shadcn/ui
  • State Management: React Hooks + Context API
  • Authentication: JWT + NextAuth.js
  • Real-time: Socket.IO Client
  • Deployment: Vercel

Backend

  • Framework: NestJS
  • Language: TypeScript
  • Database: MongoDB Atlas
  • ODM: Mongoose
  • Authentication: JWT + Passport.js
  • Real-time: Socket.IO
  • Email Service: Nodemailer
  • Deployment: Render.com

Development Tools

  • Monorepo: Turborepo
  • Testing: Jest + Playwright
  • Code Quality: ESLint + Prettier
  • CI/CD: GitHub Actions
  • Package Manager: npm

πŸ‘₯ Team Members

Name Role
Boaz Marube Full Stack Developer
Bereket Eshete Full Stack Developer
Mahder Hawaz Full Stack Developer
Nuhamin Wondoson UI/UX Designer
June Kwamboka UI/UX Designer
Finlay Ndung'u UI/UX Designer
Sena Kebede GenAI Developer
Solomon GenAI Developer

πŸ“ Project Structure

health-bridge-app/
β”œβ”€β”€ πŸ“ apps/
β”‚   β”œβ”€β”€ πŸ“ frontendapp/          # Next.js Frontend Application
β”‚   β”‚   β”œβ”€β”€ πŸ“ app/              # App Router Pages & Components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ (auth)/       # Authentication Pages
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ (public)/     # Public Pages (About, Contact, etc.)
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ components/   # Reusable UI Components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ dashboard/    # Admin Dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ doctor/       # Doctor Portal
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ patient/      # Patient Portal
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ staff/        # Staff Portal
β”‚   β”‚   β”‚   └── πŸ“ lib/          # Utilities & Configurations
β”‚   β”‚   └── πŸ“ public/           # Static Assets
β”‚   └── πŸ“ backend/              # NestJS Backend API
β”‚       β”œβ”€β”€ πŸ“ src/              # Source Code
β”‚       β”‚   β”œβ”€β”€ πŸ“ auth/         # Authentication Module
β”‚       β”‚   β”œβ”€β”€ πŸ“ appointments/ # Appointment Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ doctors/      # Doctor Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ patients/     # Patient Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ staff/        # Staff Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ health-records/ # Medical Records
β”‚       β”‚   β”œβ”€β”€ πŸ“ prescriptions/  # Prescription Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ lab-results/    # Lab Results
β”‚       β”‚   β”œβ”€β”€ πŸ“ notifications/  # Notification System
β”‚       β”‚   β”œβ”€β”€ πŸ“ queue/          # Queue Management
β”‚       β”‚   β”œβ”€β”€ πŸ“ websocket/      # Real-time Communication
β”‚       β”‚   └── πŸ“ roles/          # Role-Based Access Control
β”‚       └── πŸ“ test/             # Test Files
β”œβ”€β”€ πŸ“ packages/
β”‚   └── πŸ“ utils/                # Shared Utilities
β”œβ”€β”€ πŸ“ tests/
β”‚   └── πŸ“ e2e/                  # End-to-End Tests
β”œβ”€β”€ πŸ“ .github/
β”‚   └── πŸ“ workflows/            # CI/CD Pipelines
β”œβ”€β”€ πŸ“„ turbo.json               # Turborepo Configuration
β”œβ”€β”€ πŸ“„ package.json             # Root Package Configuration
└── πŸ“„ README.md                # Project Documentation

πŸš€ Getting Started

Prerequisites

Ensure you have the following installed:

  • Node.js (v18 or higher)
  • npm (v8 or higher)
  • Git

πŸ“₯ Installation

  1. Clone the repository:

    git clone https://github.com/your-username/health-bridge-app.git
    cd health-bridge-app
  2. Install dependencies:

    npm install
  3. Set up environment variables:

    Frontend (.env.local):

    NEXT_PUBLIC_API_URL=http://localhost:5002
    NEXT_PUBLIC_AI_API_URL=https://health-bridge-app-3.onrender.com
    NEXTAUTH_SECRET=your-nextauth-secret
    NEXTAUTH_URL=http://localhost:3000

    Backend (.env):

    MONGODB_URI=your-mongodb-connection-string
    JWT_SECRET=your-jwt-secret
    PORT=5002
    NODE_ENV=development
    SMTP_HOST=smtp.gmail.com
    SMTP_PORT=587
    EMAIL_USER=your-email@gmail.com
    EMAIL_PASS=your-app-password
  4. Start development servers:

    # Start both frontend and backend
    npm run dev
    
    # Or start individually
    npm run dev:frontend  # Frontend: http://localhost:3000
    npm run dev:backend   # Backend: http://localhost:5002

πŸ“œ Available Scripts

Command Description
npm run dev Start both frontend and backend in development mode
npm run dev:frontend Start only Next.js frontend
npm run dev:backend Start only NestJS backend
npm run build Build both applications for production
npm run start Start production builds
npm run test Run all tests
npm run test:e2e Run end-to-end tests
npm run lint Lint all code
npm run type-check Type check TypeScript code

πŸ—οΈ Architecture Overview

Frontend Architecture

  • App Router: Next.js 14 with file-based routing
  • Component Structure: Modular, reusable components with Shadcn/ui
  • State Management: React Context API for global state
  • Authentication: JWT-based with role-based access control
  • Styling: Tailwind CSS with custom design system

Backend Architecture

  • Modular Design: NestJS modules for each feature domain
  • Database: MongoDB with Mongoose ODM
  • Authentication: JWT tokens with Passport.js strategies
  • Real-time: WebSocket connections for live updates
  • Security: CORS, rate limiting, input validation

Database Schema

  • Users: Patient, Doctor, Staff profiles
  • Appointments: Scheduling and management
  • Health Records: Medical history and records
  • Prescriptions: Digital prescription management
  • Queue: Real-time queue management
  • Notifications: System notifications

πŸ” Security Features

  • JWT Authentication: Secure token-based authentication
  • Role-Based Access Control: Different permissions for each user type
  • Password Hashing: bcrypt for secure password storage
  • Input Validation: Comprehensive data validation
  • Rate Limiting: API rate limiting to prevent abuse
  • CORS Configuration: Secure cross-origin resource sharing
  • Environment Variables: Sensitive data protection

πŸ§ͺ Testing

# Run unit tests
npm run test

# Run e2e tests
npm run test:e2e

# Run tests with coverage
npm run test:coverage

πŸš€ Deployment

Frontend (Vercel)

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables
  3. Deploy automatically on push to main branch

Backend (Render.com)

  1. Connect your GitHub repository to Render
  2. Configure environment variables
  3. Set build and start commands
  4. Deploy automatically on push to main branch

🀝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript best practices
  • Write tests for new features
  • Follow the existing code style
  • Update documentation as needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Thanks to all team members for their dedication and hard work
  • Special thanks to the open-source community for the amazing tools and libraries
  • Inspired by the need for better digital healthcare solutions

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages