How 1younesalloui/medibook works
This is a role-based medical appointment booking system. Patients register or sign in, find doctors, and request appointments; doctors and assistants manage schedules and requests, while doctors record consultations. Administrators have account-management and system-overview capabilities. The frontend routes users to role-oriented pages and sends requests through a shared API client to a Django REST API, whose domain views, serializers, and models implement identity, doctors, appointments, and clinical records. PDF consultation output is documented by the backend tree, though its exact invocation is not established by the excerpts.
Main entry points: App.jsx Application routes · api.js HTTP API client · urls.py Django REST API · views.py User API views
Components 26
Frontend experience
- Application routes
frontend/src/App.jsx - Role dashboards
frontend/src/pages/Dashboard.jsx - Doctor search
frontend/src/pages/DoctorsList.jsx - Doctor profile
frontend/src/pages/DoctorProfile.jsx - Practice profile
frontend/src/pages/DoctorMyProfile.jsx - Appointment management
frontend/src/pages/Appointments.jsx - Consultation pages
frontend/src/pages/Consultations.jsx - Consultation form
frontend/src/components/ConsultationForm.jsx - HTTP API client
frontend/src/services/api.js
Identity and access
- Authentication context
frontend/src/context/AuthContext.jsx - User API views
backend/users/views.py - User serializers
backend/users/serializers.py - User and patient
backend/users/models.py - Role permissions
backend/core/permissions.py
Doctor directory
- Doctor API views
backend/doctors/views.py - Doctor serializers
backend/doctors/serializers.py - Doctor availability
backend/doctors/models.py
Appointments
- Appointment API views
backend/appointments/views.py - Booking validation
backend/appointments/serializers.py - Appointment records
backend/appointments/models.py
Clinical records
- Consultation API views
backend/consultations/views.py - Consultation serializers
backend/consultations/serializers.py - Consultation records
backend/consultations/models.py - Consultation PDF output
backend/consultations/pdf_generator.py
Other components
- Patient, doctor, admin
- Django REST API
backend/core/urls.py
Connections 40
- Patient, doctor, admin → Application routes: uses
frontend/src/App.jsx - Application routes → Authentication context: provides auth
frontend/src/App.jsx - Application routes → Role dashboards: routes to
frontend/src/App.jsx - Application routes → Doctor search: routes to
frontend/src/App.jsx - Application routes → Doctor profile: routes to
frontend/src/App.jsx - Application routes → Practice profile: routes to
frontend/src/App.jsx - Application routes → Appointment management: routes to
frontend/src/App.jsx - Application routes → Consultation pages: routes to
frontend/src/App.jsx - Authentication context → HTTP API client: requests identity
frontend/src/context/AuthContext.jsx - Role dashboards → HTTP API client: loads dashboard data
frontend/src/pages/Dashboard.jsx - Doctor search → HTTP API client: searches doctors
frontend/src/pages/DoctorsList.jsx - Doctor profile → HTTP API client: loads profile
frontend/src/pages/DoctorProfile.jsx - Practice profile → HTTP API client: updates profile
frontend/src/pages/DoctorMyProfile.jsx - Appointment management → HTTP API client: manages bookings
frontend/src/pages/Appointments.jsx - Consultation pages → HTTP API client: loads records
frontend/src/pages/Consultations.jsx - Appointment management → Consultation form: opens form
frontend/src/pages/Appointments.jsx - Consultation pages → Consultation form: opens form
frontend/src/pages/Consultations.jsx - Consultation form → HTTP API client: saves consultation
frontend/src/components/ConsultationForm.jsx - HTTP API client → Django REST API: calls API
README.md - Django REST API → User API views: routes identity
- Django REST API → Doctor API views: routes doctors
- Django REST API → Appointment API views: routes appointments
- Django REST API → Consultation API views: routes consultations
- User API views → User serializers: serializes users
backend/users/views.py - User API views → User and patient: reads user data
backend/users/views.py - User API views → Role permissions: checks roles
backend/users/views.py - User serializers → User and patient: creates profiles
backend/users/serializers.py - Doctor API views → Doctor serializers: serializes doctors
backend/doctors/views.py - Doctor API views → Doctor availability: reads availability
backend/doctors/views.py - Doctor API views → Role permissions: checks roles
backend/doctors/views.py - Doctor serializers → Doctor availability: serializes availability
backend/doctors/serializers.py - Appointment API views → Booking validation: validates requests
backend/appointments/views.py - Appointment API views → Appointment records: manages records
backend/appointments/views.py - Booking validation → Appointment records: checks conflicts
backend/appointments/serializers.py - Booking validation → Doctor serializers: embeds doctor data
backend/appointments/serializers.py - Booking validation → User serializers: embeds patient data
backend/appointments/serializers.py - Consultation API views → Consultation serializers: serializes records
backend/consultations/views.py - Consultation API views → Consultation records: manages records
backend/consultations/views.py - Consultation API views → Role permissions: checks access
backend/consultations/views.py - Consultation serializers → Consultation records: serializes records
backend/consultations/serializers.py