How mohamedyaakoubi/documed works
DocuMed is a doctor–patient healthcare management web application. Its main workflow is patient discovery and appointment booking, followed by doctor-side appointment and record management; patients can also review their dashboard and maintain profiles. The graph retains the documented authentication, clinic, and medical-record capabilities. Source excerpts show Firebase-backed role lookup, appointment discovery, and profile updates; several other capabilities are represented from README claims and the source tree, so their internal call paths are not asserted.
Main entry points: app Next.js routes · ClientDashboard.tsx Patient dashboard · docDashboard.tsx Doctor dashboard · auth.ts Authentication
Components 20
User experience
- Next.js routes
src/app - Home and discovery
src/components/Home.tsx
Care workflows
- Patient dashboard
src/components/ClientDashboard.tsx - Doctor dashboard
src/components/docDashboard.tsx - Appointment booking
src/components/MakeAppointment.tsx - Appointment management
src/components/Appointments.tsx - Medical records
src/components/DocInsertion.tsx - Patient history
src/components/PatientRecord.tsx - Clinic and specialty data
src/lib/constants.ts
Identity and profiles
- Doctor profile
src/components/DoctorParams.tsx - Patient profile
src/components/ClientParams.tsx - Account registration
src/components/ClientSignUp.tsx - Authentication
src/lib/auth.ts - Role and user context
src/contexts/UserContext.tsx
Application platform
- Firebase clients
src/lib/firebase.ts - Firestore
- Firebase Authentication
- Form validation
src/lib/validation/clientSchema.ts
Other components
- Patients
- Doctors
Connections 35
- Patients → Next.js routes: uses
README.md - Doctors → Next.js routes: uses
README.md - Next.js routes → Home and discovery: renders
src/app/page.tsx - Next.js routes → Patient dashboard: renders
src/app/client-dashboard/page.tsx - Next.js routes → Doctor dashboard: renders
src/app/doc-dashboard/page.tsx - Next.js routes → Appointment booking: renders
src/app/make-appointment/page.tsx - Next.js routes → Medical records: renders
src/app/doc-insertion/page.tsx - Next.js routes → Patient history: renders
- Next.js routes → Appointment management: renders
- Patients → Home and discovery: discovers care
- Patients → Appointment booking: requests appointment
- Doctors → Doctor dashboard: manages care
- Doctor dashboard → Appointment management: manages
- Doctor dashboard → Medical records: maintains
- Patients → Patient dashboard: views history
- Patient dashboard → Firestore: reads appointments and clinics
src/components/ClientDashboard.tsx - Patient dashboard → Role and user context: reads user role
src/components/ClientDashboard.tsx - Appointment booking → Firestore: schedules
- Medical records → Firestore: stores records
- Patient history → Firestore: reads history
- Patients → Account registration: registers
- Account registration → Firebase Authentication: creates account
src/components/ClientSignUp.tsx - Patients → Authentication: signs in
- Doctors → Authentication: signs in
- Authentication → Firebase Authentication: authenticates
src/lib/auth.ts - Authentication → Firestore: looks up roles
src/lib/auth.ts - Role and user context → Firestore: queries role profiles
src/contexts/UserContext.tsx - Patient profile → Firestore: updates profile
src/components/ClientParams.tsx - Doctors → Doctor profile: updates profile
- Doctor profile → Firestore: updates profile
- Firebase clients → Firebase Authentication: initializes
src/lib/firebase.ts - Firebase clients → Firestore: initializes
src/lib/firebase.ts - Home and discovery → Clinic and specialty data: uses catalog
src/components/Home.tsx - Account registration → Form validation: validates form
src/components/ClientSignUp.tsx - Patient profile → Form validation: validates form
src/components/ClientParams.tsx