Skip to content

MinaMalakH/MAIO-Medical-All-In-One

Repository files navigation

πŸ₯ MAIO - Medical Appointment Integration Online

Node.js React Next.js MongoDB License

MAIO is a comprehensive, enterprise-grade telemedicine platform connecting patients, doctors, and healthcare administrators. It features real-time communication, secure payment processing, intelligent appointment scheduling, and complete medical records management.

This repository contains the complete monorepo structure with three main applications:


πŸ“ Project Overview

MAIO/
β”œβ”€β”€ MAIO-Backend/          # Express.js REST API & WebSocket server
β”œβ”€β”€ MAIO-front/            # React patient/doctor portal
β”œβ”€β”€ maiodashboard/         # Next.js admin dashboard
└── README.md             # This file

What is MAIO?

MAIO bridges the gap between patients and healthcare providers through:

βœ… Seamless Appointment Booking - Real-time availability with instant confirmation
βœ… Secure Telemedicine - Real-time chat and video consultation support
βœ… Medical Records Management - Centralized patient health data and prescriptions
βœ… Integrated Payments - Stripe-powered secure payment processing
βœ… Admin Dashboard - Complete platform management and analytics
βœ… Scalable Architecture - Production-ready microservices approach


🎯 Quick Start

Option 1: Run All Services (Recommended for Development)

# Terminal 1: Backend Service
cd MAIO-Backend
npm install
npm start
# Server runs on http://localhost:5000

# Terminal 2: Patient/Doctor Portal
cd MAIO-front
npm install
npm run dev
# Frontend runs on http://localhost:5173

# Terminal 3: Admin Dashboard
cd maiodashboard
npm install
npm run dev
# Dashboard runs on http://localhost:3000

Option 2: Using Docker (Coming Soon)

docker-compose up -d

πŸ“š Detailed Documentation

Backend API

Complete backend documentation with setup instructions, API endpoints, database schemas, and WebSocket implementation.

β†’ MAIO-Backend README

Key Features:

  • Express.js 5.2 REST API
  • MongoDB database with Mongoose ORM
  • JWT authentication & role-based access control
  • Socket.io real-time communication
  • Stripe payment integration
  • Nodemailer email service
  • Multi-file upload with Multer

Patient & Doctor Portal

React-based frontend for patient appointment booking, medical history management, real-time doctor consultation, and payment processing.

β†’ MAIO-Front README

Key Features:

  • React 19.2 with TypeScript
  • Vite ultra-fast build tool
  • TanStack React Query for server state
  • Redux Toolkit for global state
  • Stripe payment integration
  • Socket.io real-time messaging
  • Responsive design with Tailwind CSS & DaisyUI

Admin Dashboard

Next.js-based administration platform for managing users, verifying doctors, tracking appointments, and viewing platform analytics.

β†’ Admin Dashboard README

Key Features:

  • Next.js 16.0 framework
  • Server-side rendering & static generation
  • Comprehensive user management
  • Doctor verification workflow
  • Dashboard metrics & analytics
  • Tailwind CSS for styling

πŸ—οΈ Architecture Overview

System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Client Layer                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Patient Portal   β”‚ Doctor Portal    β”‚ Admin Dashboard  β”‚
β”‚  (MAIO-front)    β”‚  (MAIO-front)    β”‚ (maiodashboard)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚                β”‚                    β”‚
           β”‚  REST API      β”‚  WebSocket         β”‚
           β”‚  HTTP/HTTPS    β”‚  Socket.io         β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚                β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚   MAIO Backend (API Server)             β”‚
        β”‚   Express.js 5.2 + Node.js              β”‚
        β”‚   - Authentication & Authorization      β”‚
        β”‚   - Business Logic & Controllers        β”‚
        β”‚   - WebSocket Server                    β”‚
        β”‚   - File Upload Handler                 β”‚
        β”‚   - Payment Processing                  β”‚
        β”‚   - Email Service                       β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚   Data & External Services             β”‚
        β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
        β”‚  MongoDB   β”‚  Stripe    β”‚  Nodemailer  β”‚
        β”‚  Database  β”‚  Payments  β”‚  Email       β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack Summary

Layer Technology Version
Backend API Node.js + Express 5.2
Database MongoDB 9.0+
Frontend React 19.2
Admin Next.js 16.0
Real-time Socket.io 4.8+
Styling Tailwind CSS 4.1
Authentication JWT -
Payments Stripe 20.1+

πŸ“‹ Features Breakdown

πŸ” User Management

  • Patient Registration: Medical history, allergies, emergency contacts
  • Doctor Registration: Verification documents, specialization, experience
  • Admin Accounts: Full platform access and management
  • Role-Based Access Control: Granular permission system
  • Profile Management: Complete user profile editing

πŸ₯ Appointment System

  • Smart Availability: Real-time slot availability
  • Calendar Integration: Interactive appointment scheduling
  • Automatic Confirmation: Email notifications
  • Status Tracking: Real-time appointment status
  • Cancellation & Rescheduling: Flexible appointment management

πŸ’¬ Real-Time Communication

  • Live Chat: WebSocket-based messaging
  • Typing Indicators: Real-time typing status
  • Online Status: User availability detection
  • Message History: Persistent conversation storage
  • Notifications: Real-time alerts for events

πŸ“„ Medical Records

  • Medical History: Comprehensive patient health records
  • Prescription Management: Digital prescriptions
  • Document Storage: Secure file uploads
  • Health Metrics: Vital signs and measurements
  • Document Search: Quick access to records

πŸ’³ Payment Processing

  • Stripe Integration: Secure payment gateway
  • Multiple Payment Methods: Credit/debit card support
  • Invoice Generation: Automated receipts
  • Payment History: Transaction tracking
  • Refund Management: Easy refund processing

πŸ“Š Analytics & Dashboard

  • Key Metrics: Real-time platform statistics
  • User Analytics: Registration and engagement tracking
  • Appointment Analytics: Booking trends and patterns
  • Revenue Tracking: Payment analytics
  • Doctor Performance: Consultation metrics

πŸš€ Deployment

Development Environment

All three services run locally on different ports for development:

Production Deployment

Backend (Heroku/Railway)

cd MAIO-Backend
git push heroku main

Frontend (Vercel/Netlify)

# Vercel (Recommended for Next.js)
cd MAIO-front
vercel deploy

Admin Dashboard (Vercel)

cd maiodashboard
vercel deploy

Environment Variables

Each service requires specific environment variables. See individual README files for detailed configuration.


🀝 Contributing

Getting Started with Development

  1. Fork the Repository

    git clone https://github.com/your-username/MAIO.git
    cd MAIO
  2. Create Feature Branch

    git checkout -b feature/amazing-feature
  3. Make Changes

    • Follow code style guidelines
    • Write descriptive commit messages
    • Add comments for complex logic
  4. Commit & Push

    git commit -m 'Add amazing feature'
    git push origin feature/amazing-feature
  5. Open Pull Request

    • Describe your changes
    • Reference related issues
    • Wait for code review

Code Style & Standards

  • Backend: Node.js/Express.js best practices
  • Frontend: React hooks and functional components
  • Admin: Next.js app router conventions
  • Language: English for all code comments and documentation

Testing

Each service should include tests:

  • Unit tests for business logic
  • Integration tests for APIs
  • Component tests for UI

πŸ”’ Security Considerations

Authentication & Authorization

  • JWT tokens with secure refresh mechanism
  • HTTP-only cookies for token storage
  • Role-based access control (RBAC)
  • Secure password hashing with bcryptjs

Data Protection

  • HTTPS/TLS encryption in transit
  • Database encryption at rest
  • Sensitive data masking in logs
  • GDPR-compliant soft deletion

API Security

  • Request rate limiting
  • Input validation & sanitization
  • CORS configuration
  • SQL injection prevention
  • XSS protection with Helmet.js

Payment Security

  • PCI-DSS compliance via Stripe
  • No sensitive card data stored
  • Secure PaymentIntent handling
  • Webhook signature verification

πŸ“ž Support & Contact

Issue Reporting

  • Bugs: Create issue with reproduction steps
  • Features: Describe use case and expected behavior
  • Documentation: Report unclear or missing documentation

Community Channels

  • GitHub Issues: Bug reports and feature requests
  • GitHub Discussions: General questions and ideas
  • Email: support@maio-health.com (if applicable)

πŸ“œ License

MAIO-Backend

Licensed under ISC License

MAIO-Front & Admin Dashboard

Licensed under MIT License

See individual LICENSE files in each directory for details.


πŸ—‚οΈ Repository Structure

MAIO/
β”‚
β”œβ”€β”€ MAIO-Backend/                    # Node.js Express API
β”‚   β”œβ”€β”€ controllers/                # Business logic
β”‚   β”œβ”€β”€ models/                     # MongoDB schemas
β”‚   β”œβ”€β”€ routes/                     # API endpoints
β”‚   β”œβ”€β”€ middleware/                 # Auth, validation, etc.
β”‚   β”œβ”€β”€ services/                   # External integrations
β”‚   β”œβ”€β”€ sockets/                    # WebSocket handlers
β”‚   β”œβ”€β”€ config/                     # Configuration files
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md                   # Backend documentation
β”‚
β”œβ”€β”€ MAIO-front/                      # React Patient/Doctor Portal
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ features/               # Feature modules
β”‚   β”‚   β”œβ”€β”€ pages/                  # Page components
β”‚   β”‚   β”œβ”€β”€ services/               # API services
β”‚   β”‚   β”œβ”€β”€ hooks/                  # Custom hooks
β”‚   β”‚   β”œβ”€β”€ store/                  # Redux configuration
β”‚   β”‚   β”œβ”€β”€ ui/                     # Reusable UI components
β”‚   β”‚   └── utils/                  # Utility functions
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ vite.config.ts
β”‚   └── README.md                   # Frontend documentation
β”‚
β”œβ”€β”€ maiodashboard/                   # Next.js Admin Dashboard
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ dashboard/              # Dashboard pages
β”‚   β”‚   β”œβ”€β”€ users/                  # User management
β”‚   β”‚   β”œβ”€β”€ doctors/                # Doctor management
β”‚   β”‚   β”œβ”€β”€ appointments/           # Appointment tracking
β”‚   β”‚   β”œβ”€β”€ components/             # Shared components
β”‚   β”‚   └── layout.js               # App layout
β”‚   β”œβ”€β”€ lib/                        # Utility functions
β”‚   β”œβ”€β”€ hooks/                      # Custom hooks
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ next.config.mjs
β”‚   └── README.md                   # Admin documentation
β”‚
└── README.md                         # This file (main documentation)

πŸ“ˆ Project Roadmap

Phase 1: MVP (Current)

  • βœ… Patient appointment booking
  • βœ… Doctor profile management
  • βœ… Real-time messaging
  • βœ… Payment processing
  • βœ… Admin dashboard basics

Phase 2: Q2 2026

  • πŸ”„ Video consultation integration
  • πŸ”„ Advanced scheduling algorithms
  • πŸ”„ Mobile app (React Native)
  • πŸ”„ Multi-language support

Phase 3: Q3 2026

  • πŸ“‹ AI-powered doctor recommendations
  • πŸ“‹ Insurance verification system
  • πŸ“‹ Advanced analytics & reporting
  • πŸ“‹ Prescription fulfillment integration

Phase 4: Q4 2026

  • 🎯 Telemedicine network expansion
  • 🎯 Blockchain for records (optional)
  • 🎯 International expansion
  • 🎯 Enterprise features

πŸ“Š Project Statistics

Component Lines of Code Files Dependencies
Backend ~5,000 50+ 12
Frontend ~4,500 60+ 25+
Admin ~2,000 35+ 8
Total ~11,500 145+ 45+

πŸ™ Acknowledgments

Special thanks to:

  • The open-source community
  • All contributors
  • Users and testers providing feedback

πŸ“§ Contact


πŸŽ“ Learning Resources

Backend Development

Frontend Development

Admin Dashboard


Made with ❀️ for better healthcare delivery

Live Demo Β· Report Bug Β· Request Feature Β· Contributing

Last Updated: January 2026 | Version: 1.0.0

About

Enterprise-grade telemedicine platform connecting patients, doctors, and administrators with real-time chat, video consultation support, appointment scheduling, medical records management, and secure Stripe payment processing. Built with Node.js, React, Next.js, MongoDB, and Socket.io.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors