Loading repository data…
Loading repository data…
moeez4316 / repository
TABEEB is a healthcare management platform that streamlines patient, doctor, and administrative workflows through a secure, scalable, and modern full-stack architecture.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A full-stack digital healthcare platform connecting patients and doctors, built for the Pakistani market.
TABEEB is a monorepo healthcare platform with three user roles — Patients, Doctors, and Admins. It handles the complete care journey: discovering doctors, booking appointments, video consultations via Jitsi, digital prescriptions, medical record management, online payments (Safepay/PKR), and AI-assisted health queries powered by Google Gemini.
| Layer | Technology |
|---|---|
| Frontend | Next.js 15, React 19, TypeScript, Tailwind CSS v4 |
| State | Redux Toolkit + Redux Persist, TanStack Query v5 |
| Backend | Node.js, Express.js, TypeScript |
| Database | MySQL via Prisma ORM |
| Auth | Firebase Auth (client) + Firebase Admin SDK (server) |
| Realtime | Socket.io with optional Redis adapter |
| Video Calls | Jitsi Meet (self-hosted, JWT-based) |
| File Storage | Cloudinary |
| Payments | Safepay (PKR, sandbox + production) |
Resend (transactional emails via tabeebemail.me) |
| AI | Google Gemini API (gemini-2.5-flash) |
| Infra | Docker, Nginx, PM2 |
TABEEB-Healthcare/
│
├── TabeebFrontend/ # Next.js 15 app
│ └── src/
│ ├── app/
│ │ ├── Patient/ # Patient dashboard
│ │ │ ├── dashboard/
│ │ │ ├── appointments/
│ │ │ ├── book-appointment/
│ │ │ ├── prescriptions/
│ │ │ ├── medication/
│ │ │ ├── medical-records/
│ │ │ ├── doctors/
│ │ │ ├── payment/
│ │ │ ├── reviews/
│ │ │ ├── blogs/
│ │ │ ├── ai-chat/
│ │ │ └── image-analysis/
│ │ ├── Doctor/ # Doctor dashboard
│ │ │ ├── Dashboard/
│ │ │ ├── Appointments/
│ │ │ ├── Calendar/
│ │ │ ├── availability/
│ │ │ ├── verification/
│ │ │ ├── Reviews/
│ │ │ ├── blogs/
│ │ │ └── ai-chat/
│ │ ├── admin/ # Admin panel
│ │ │ ├── dashboard/
│ │ │ ├── verification/
│ │ │ ├── users/
│ │ │ ├── doctors/
│ │ │ ├── analytics/
│ │ │ ├── complaints/
│ │ │ ├── financial-aid/
│ │ │ ├── payments/
│ │ │ ├── inbox/
│ │ │ ├── platform-reviews/
│ │ │ ├── blogs/
│ │ │ ├── admins/
│ │ │ └── login/
│ │ ├── auth/ # Login, registration, role selection
│ │ ├── doctors/ # Public doctor discovery
│ │ ├── blogs/ # Public blog listing
│ │ └── landing-page/
│ ├── components/
│ ├── lib/ # API clients, hooks
│ ├── store/ # Redux slices & store
│ └── types/
│
├── TabeebBackend/
│ └── tabeeb_backend/
│ └── src/
│ ├── routes/ # 20 route files (see API section)
│ ├── controllers/ # 25 controllers
│ ├── services/ # Business logic
│ ├── middleware/ # Auth, rate limiter, validators
│ ├── realtime/ # Socket.io server
│ ├── lib/ # Prisma + Mongoose clients
│ ├── config/ # Firebase, Resend config
│ └── utils/ # Auto-slot generation, scrapers
│
├── TabeebBackend/ML_Server/ # MedLlama Node.js service (legacy)
├── docker-compose.yml
├── docker-compose.prebuilt.yml
├── nginx/
├── start-local.ps1 # Windows startup script
└── start-local.sh # Linux/Mac startup script
user:{uid}, role:{role}, doctor:{uid}, patient:{uid}appointment.updated, verification.updated| Prefix | Description |
|---|---|
GET /api/health | Health check |
/api/user | User profile |
/api/auth | OTP, verify-link, password reset |
/api/doctor | Doctor profiles, public search |
/api/patient | Patient data |
/api/appointments | Booking, status management |
/api/availability | Weekly templates, daily slots |
/api/prescriptions | Prescription CRUD |
/api/records | Medical records (Cloudinary + MySQL) |
/api/video-calls | Jitsi token generation |
/api/reviews | Doctor ratings & reviews |
/api/platform-reviews | Platform-level reviews |
/api/blogs | Doctor blog articles |
/api/upload | Cloudinary file uploads |
/api/email | Triggered emails |
/api/ai | Gemini chat, doc summarization, medicine search |
/api/safepay | Payment session, webhook, redirect |
/api/verification | PMDC lookup, doctor verification |
/api/admin | Admin management, analytics, complaints |
git clone https://github.com/moeez4316/TABEEB-Healthcare.git
cd TABEEB-Healthcare
# Configure .env files (see below), then:
docker-compose up --build
Windows:
.\start-local.ps1
Linux/Mac:
chmod +x start-local.sh && ./start-local.sh
Services run at:
http://localhost:3000http://localhost:5002# Backend
cd TabeebBackend/tabeeb_backend
npm install
cp .env.example .env # fill in values
npx prisma generate
npx prisma db push
npm run dev # :5002
# Frontend (new terminal)
cd TabeebFrontend
npm install
# create .env.local (see below)
npm run dev # :3000
TabeebBackend/tabeeb_backend/.envPORT=5002
NODE_ENV=development
# Database
DATABASE_URL="mysql://root:password@localhost:3306/tabeeb_db"
# Firebase Admin SDK
FIREBASE_PROJECT_ID="your-project-id"
FIREBASE_CLIENT_EMAIL="firebase-adminsdk-xxx@your-project.iam.gserviceaccount.com"
FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
# Cloudinary
CLOUDINARY_CLOUD_NAME="your_cloud_name"
CLOUDINARY_API_KEY="your_api_key"
CLOUDINARY_API_SECRET="your_api_secret"
# Resend (email)
RESEND_API_KEY="re_xxxxxxxxxxxx"
RESEND_FROM_EMAIL="noreply@yourdomain.com"
RESEND_REPLY_TO="support@yourdomain.com"
# Google Gemini AI
GEMINI_API_KEY="AIzaSy..."
GEMINI_MODEL="gemini-2.5-flash"
# Jitsi Video Calls
JITSI_APP_ID="your_app_id"
JITSI_APP_SECRET="your_app_secret"
JITSI_DOMAIN="your.jitsi.domain"
# Safepay (Pakistan payments)
SAFEPAY_API_KEY="sec_..."
SAFEPAY_SECRET_KEY="your_secret"
SAFEPAY_ENVIRONMENT="sandbox"
SAFEPAY_BASE_URL="https://sandbox.api.getsafepay.com"
SAFEPAY_WEBHOOK_URL="https://your-public-url/api/safepay/webhook"
FRONTEND_URL="http://localhost:3000"
# Admin bootstrap
BOOTSTRAP_SUPERADMIN_USERNAME="admin"
BOOTSTRAP_SUPERADMIN_EMAIL="admin@yourdomain.com"
BOOTSTRAP_SUPERADMIN_PASSWORD="SecurePassword@123"
ADMIN_JWT_SECRET="your-admin-jwt-secret"
ADMIN_SKIP_2FA=true # set false in production
# Socket.io
WS_PATH=/ws
WS_CORS_ORIGIN=http://localhost:3000
# Redis (optional — Socket.io horizontal scaling)
# REDIS_URL=redis://:password@localhost:6379/0
# Rate limiting
RATE_LIMIT_ENABLED=false
TabeebFrontend/.env.localNEXT_PUBLIC_API_URL=http://localhost:5002
NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSy...
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your-project-id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your-project.appspot.com
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=000000000000
NEXT_PUBLIC_FIREBASE_APP_ID=1:000000000000:web:xxxxx
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=G-XXXXXXXXXX
NEXT_PUBLIC_JITSI_APP_ID=your_jitsi_app_id
NEXT_PUBLIC_JITSI_SECRET=your_jitsi_secret
Note: Never commit
.envfiles. All env files are gitignored.
Production uses prebuilt Docker images with Nginx as reverse proxy:
# Build and push images (Windows)
.\build-and-push.ps1
# De