How medicore-project/medicore-frontend works
This is a clinic-management web application for staff and patients. Staff authenticate to reach role-protected workflows for appointments and schedules, patient records, clinic administration, and reporting. Patients can use public booking: identify themselves, choose an appointment, and join or review a waitlist. The frontend pages and booking flow invoke API modules, which share an HTTP client for backend requests. The README is only a Vite template, so product capabilities are inferred from the source tree and index; unsampled page details and backend behavior are not established here.
Main entry points: client.ts API HTTP client · App.tsx Route application · BookingFlow.tsx Public booking flow · appointments.ts Appointment services
Components 21
Application entry
- Route application
src/App.tsx
Identity and access
- Authentication state
src/contexts/AuthContext.tsx - Role guard
src/routes/ProtectedRoute.tsx - API HTTP client
src/api/client.ts
Booking and scheduling
- Public booking flow
src/components/booking/BookingFlow.tsx - Booking services
src/api/booking.ts - Booking token
src/api/bookingToken.ts - Appointments and schedules
src/pages/AppointmentsPage.tsx - Appointment services
src/api/appointments.ts - Waitlist services
src/api/waitlist.ts
Patient care
- Patient search
src/pages/PatientSearchPage.tsx - Patient services
src/api/patients.ts - Prescription editing
src/components/patients/PrescriptionFormModal.tsx - Records and patient pages
src/pages
Clinic operations
- Dashboard data
src/hooks/useDashboardData.ts - Dashboard calculations
src/utils/dashboard.ts - Service tariffs
src/pages/ServiceTariffsPage.tsx - Tariff services
src/api/serviceTariffs.ts - Reports and administration
src/pages
Other components
- Staff or patient
- Clinic backend
Connections 25
- Staff or patient → Route application: opens
src/App.tsx - Route application → Role guard: protects routes
src/App.tsx - Role guard → Authentication state: checks identity
src/routes/ProtectedRoute.tsx - Route application → Public booking flow: routes to
src/App.tsx - Route application → Appointments and schedules: routes to
src/App.tsx - Authentication state → API HTTP client: authenticates through
src/contexts/AuthContext.tsx - API HTTP client → Clinic backend: sends requests
src/api/client.ts - Public booking flow → Booking services: calls
src/components/booking/BookingFlow.tsx - Public booking flow → Appointment services: calls
src/components/booking/BookingFlow.tsx - Public booking flow → Waitlist services: calls
src/components/booking/BookingFlow.tsx - Public booking flow → Booking token: uses
src/components/booking/BookingFlow.tsx - Booking services → API HTTP client: requests through
src/api/booking.ts - Appointment services → API HTTP client: requests through
src/api/appointments.ts - Waitlist services → API HTTP client: requests through
src/api/waitlist.ts - Appointments and schedules → Appointment services: loads schedules
src/pages/AppointmentsPage.tsx - Dashboard data → Appointment services: loads appointments
src/hooks/useDashboardData.ts - Dashboard data → Waitlist services: loads waitlist
src/hooks/useDashboardData.ts - Dashboard data → Dashboard calculations: plans dashboard
src/hooks/useDashboardData.ts - Patient search → Patient services: searches patients
src/pages/PatientSearchPage.tsx - Patient services → API HTTP client: requests through
src/api/patients.ts - Prescription editing → Records and patient pages: supports patient care
- Service tariffs → Tariff services: manages tariffs
src/pages/ServiceTariffsPage.tsx - Tariff services → API HTTP client: requests through
src/api/serviceTariffs.ts - Route application → Records and patient pages: routes to
src/App.tsx - Route application → Reports and administration: routes to
src/App.tsx