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:
MAIO/
βββ MAIO-Backend/ # Express.js REST API & WebSocket server
βββ MAIO-front/ # React patient/doctor portal
βββ maiodashboard/ # Next.js admin dashboard
βββ README.md # This file
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
# 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:3000docker-compose up -dComplete backend documentation with setup instructions, API endpoints, database schemas, and WebSocket implementation.
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
React-based frontend for patient appointment booking, medical history management, real-time doctor consultation, and payment processing.
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
Next.js-based administration platform for managing users, verifying doctors, tracking appointments, and viewing platform analytics.
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
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β
ββββββββββββββ΄βββββββββββββ΄βββββββββββββββ
| 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+ |
- 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
- 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
- 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 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
- 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
- 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
All three services run locally on different ports for development:
- Backend: http://localhost:5000
- Frontend: http://localhost:5173
- Admin: http://localhost:3000
cd MAIO-Backend
git push heroku main# Vercel (Recommended for Next.js)
cd MAIO-front
vercel deploycd maiodashboard
vercel deployEach service requires specific environment variables. See individual README files for detailed configuration.
-
Fork the Repository
git clone https://github.com/your-username/MAIO.git cd MAIO -
Create Feature Branch
git checkout -b feature/amazing-feature
-
Make Changes
- Follow code style guidelines
- Write descriptive commit messages
- Add comments for complex logic
-
Commit & Push
git commit -m 'Add amazing feature' git push origin feature/amazing-feature -
Open Pull Request
- Describe your changes
- Reference related issues
- Wait for code review
- 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
Each service should include tests:
- Unit tests for business logic
- Integration tests for APIs
- Component tests for UI
- JWT tokens with secure refresh mechanism
- HTTP-only cookies for token storage
- Role-based access control (RBAC)
- Secure password hashing with bcryptjs
- HTTPS/TLS encryption in transit
- Database encryption at rest
- Sensitive data masking in logs
- GDPR-compliant soft deletion
- Request rate limiting
- Input validation & sanitization
- CORS configuration
- SQL injection prevention
- XSS protection with Helmet.js
- PCI-DSS compliance via Stripe
- No sensitive card data stored
- Secure PaymentIntent handling
- Webhook signature verification
- Bugs: Create issue with reproduction steps
- Features: Describe use case and expected behavior
- Documentation: Report unclear or missing documentation
- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: General questions and ideas
- Email: support@maio-health.com (if applicable)
Licensed under ISC License
Licensed under MIT License
See individual LICENSE files in each directory for details.
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)
- β Patient appointment booking
- β Doctor profile management
- β Real-time messaging
- β Payment processing
- β Admin dashboard basics
- π Video consultation integration
- π Advanced scheduling algorithms
- π Mobile app (React Native)
- π Multi-language support
- π AI-powered doctor recommendations
- π Insurance verification system
- π Advanced analytics & reporting
- π Prescription fulfillment integration
- π― Telemedicine network expansion
- π― Blockchain for records (optional)
- π― International expansion
- π― Enterprise features
| 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+ |
Special thanks to:
- The open-source community
- All contributors
- Users and testers providing feedback
- Email: contact@maio-health.com
- Website: https://maio-health.com
- GitHub: https://github.com/your-username/MAIO
- Issues: https://github.com/your-username/MAIO/issues
Live Demo Β· Report Bug Β· Request Feature Β· Contributing
Last Updated: January 2026 | Version: 1.0.0