How I Used MeDo to Build the Clinic Management System
🏥 What Problem My App Solves and Why I Built It
Managing a clinic involves juggling multiple responsibilities simultaneously — tracking patients, scheduling appointments, managing prescriptions, uploading lab results, handling billing, and monitoring staff — all while ensuring every role (Admin, Doctor, Staff, and Patient) sees only what they need to see.
Most small and mid-sized clinics either rely on paper records or expensive enterprise software that is too complex for everyday use. I built the Clinic Management System to solve this problem — a complete, modern, role-based web application that brings every aspect of clinic operations into one single platform, accessible from any device.
The system supports four distinct user roles:
- 👑 Admin — full system control and oversight
- 👨⚕️ Doctor — patient management and prescriptions
- 👩💼 Staff — appointments, billing, and lab results
- 🏥 Patient — personal health portal with 4-digit access code login
💬 How I Structured Conversations with MeDo
to Build This Project
I used MeDo as my primary development partner throughout the entire project — from initial architecture to final bug fixes. My approach was to break the project into focused, specific conversations rather than asking for everything at once.
My conversation structure followed this pattern:
Phase 1 — Foundation: I started by asking MeDo to help me design the overall system architecture — defining the four user roles, their permissions, and how they would interact with the system. MeDo helped me plan the Supabase database schema, RLS policies, and the role-based routing structure before writing a single line of code.
Phase 2 — Core Features: I worked through each major feature one at a time, asking MeDo to help me build:
- Authentication system with role-based routing
- Admin dashboard with clickable stat cards
- Patient portal with 4-digit access code login
- Appointment booking with smart doctor suggestions
- Prescription management with medicine search
- Lab results upload and display
- Automated billing system
- Health tracking with real-time charts
- Medical history aggregating all patient data
- Real-time notification system
- PDF export using jsPDF library
- Multi-language support (English, Hindi, Chinese)
Phase 3 — Bug Fixing and Polish: Whenever I encountered errors, I described the exact error message and behavior to MeDo, which then systematically identified root causes and provided precise fixes — from Supabase RLS policies to React routing issues to jsPDF integration errors.
Phase 4 — Demo Preparation: MeDo helped me create testing accounts with pre-populated realistic data so judges could immediately explore all features without any manual setup.
🌟 The Most Impressive Feature MeDo Helped
Me Create
The most impressive feature is the Intelligent Doctor Suggestion System combined with the Automated Billing Engine.
Intelligent Doctor Suggestion: When a patient or staff member books an appointment and types their illness or symptoms (e.g. "chest pain" or "skin rash"), the system automatically matches keywords against a specialization mapping table in Supabase and instantly suggests the most relevant doctors with their availability, experience, and time slots displayed as beautiful suggestion cards.
MeDo helped me design the complete illness-to- specialization mapping covering 15 medical specializations with 100+ keyword combinations, the Supabase query logic, the debounced search behavior, and the doctor card UI — all working together seamlessly.
Automated Billing Engine: Rather than manually creating bills, the system automatically creates and updates patient bills in real time whenever:
- A doctor marks an appointment as completed (consultation fee auto-added)
- A prescription is issued (medicine charges auto-added)
- A lab result is uploaded (test fee auto-added)
MeDo helped me design this as a Supabase PostgreSQL trigger system with JSONB line items, idempotency checks to prevent duplicate charges, and real-time Supabase subscriptions so patients see their bill update instantly in their portal without refreshing the page.
🔌 How I Used Plugins and API Integrations
to Extend Functionality
Supabase (Backend + Database + Auth): MeDo guided me through the complete Supabase integration including:
- PostgreSQL database with 12+ tables
- Row Level Security (RLS) policies for every table ensuring data privacy
- Supabase Auth for Admin, Doctor, and Staff (email/password) and a custom 4-digit access code system for Patients
- Supabase Realtime for live notifications and bill updates
- Supabase Storage for lab result files and profile photos
- PostgreSQL triggers for automated billing
jsPDF + jspdf-autotable (PDF Generation): MeDo helped me integrate jsPDF to generate professionally formatted PDF exports for:
- Complete Medical History reports
- Individual lab results, prescriptions, and invoices
- Admin bulk export reports (patients, billing, lab results, prescriptions) All PDFs include clinic branding, patient information, color-coded sections, page numbers, and confidentiality notices.
i18next + react-i18next (Multi-Language Support): MeDo helped me implement a complete multi-language system supporting English, Hindi (हिंदी), and Chinese (中文) with:
- Simple conversational translations (not formal/technical language)
- Language preference saved per user in Supabase
- Instant language switching without page reload
- Language switcher accessible on all pages including login
📊 Key Features Built with MeDo's Help
Core System: ✅ Four role-based dashboards (Admin, Doctor, Staff, Patient) ✅ Role-based route protection and sidebar navigation ✅ Real-time notifications (two-way between roles) ✅ Multi-language support (English, Hindi, Chinese) ✅ Professional PDF export for all record types
Patient Management: ✅ Patient self-registration with auto-generated 4-digit code ✅ Complete Patient Portal with health data access ✅ Health tracking with daily entries and trend charts ✅ Medical history aggregating all 5 data sections
Clinical Features: ✅ Smart appointment booking with doctor suggestions ✅ Prescription management with inventory-linked medicines ✅ Lab result upload, display, and PDF download ✅ Automated billing with real-time updates
Admin Features: ✅ Complete inventory management with low stock alerts ✅ Doctor profile management with scheduling ✅ Staff management and account creation ✅ Bulk data export reports
🎯 Why This Project Stands Out
What makes this project unique is that MeDo helped me think through not just the code — but the entire user experience, data architecture, security model, and edge cases at every step.
Every time I hit a bug or needed a new feature, MeDo provided structured, production-quality solutions with proper error handling, loading states, empty states, role-based access, and database-level security — not just quick fixes.
The result is a clinic management system that could realistically be deployed and used by an actual medical clinic — complete, secure, accessible in multiple languages, and ready for real-world use.
Built With
- i18next
- jspdf
- react
- supabase
Log in or sign up for Devpost to join the conversation.