Medbook is a comprehensive platform designed to streamline the process of booking medical appointments, managing doctor and patient profiles, facilitating real-time consultations, and handling secure payments. The project is built using a modern tech stack to ensure a seamless and efficient user experience.
- Frontend: React.js (hosted on Netlify)
- Backend: Supabase (PostgreSQL-based BaaS)
- Database: SQLite (for local development) → Supabase (production)
- Authentication: Supabase Auth (JWT-based)
- Payment Gateway: Razorpay
- Real-time Features: Supabase Realtime (WebSockets)
- Signup & Login: JWT-based Supabase Auth
supabase.auth.signUp(): User registrationsupabase.auth.signInWithPassword(): User loginsupabase.auth.signOut(): Logout
- Users Table: Stores user details (patients & doctors)
- Doctors Table: Stores doctor profiles & availability
- Appointments Table: Stores booking details
- Book Appointment:
supabase.from('appointments').insert({...}) - Fetch Appointments:
supabase.from('appointments').select('*') - Cancel Appointment:
supabase.from('appointments').delete().eq('id', appointment_id)
- Generate Payment Link:
/api/payment/create - Verify Transaction:
/api/payment/verify - Process Refund:
/api/payment/refund/:id
- Live Chat:
supabase.channel('chat').on('INSERT', callback).subscribe() - Video Consultation: WebRTC API
- Frontend: Netlify
- Backend: Supabase Functions & DB
- Database: SQLite (for local development), PostgreSQL (via Supabase in production)
- User signs up using Supabase Auth
- Books an appointment (stored in Supabase DB)
- Makes payment via Razorpay
- Gets a confirmation & joins consultation via WebRTC
- Doctor updates the prescription & notes
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/chiragSahani/medbook.git cd medbook -
Install dependencies:
npm install
-
Set up environment variables for Supabase, Razorpay, and other configurations.
-
Start the development server:
npm start
We welcome contributions to improve Medbook. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch). - Make your changes and commit them (
git commit -m 'Add some feature'). - Push to the branch (
git push origin feature-branch). - Open a pull request.
This project is licensed under Apache-2.0 License.
