How abhishekghim/captoneproject works
Capital Radiology is a role-based MRI booking and clinic-workflow application. Patients book appointments and submit referrals; clinic staff register patients and coordinate scheduling and arrivals; technicians record scans; radiologists review imaging and finalize reports; patients and permitted referrers can then view results, while billing supports online payment and emailed invoices. Admin and super-admin dashboards cover operational oversight and staff access. The tree and README establish these product areas, but most of their page-to-hook wiring is unsampled; edges below are limited to documented flows and sampled server calls.
Main entry points: page.tsx Role dashboards · checkout/route.ts Checkout API · assistant/route.ts Assistant API · invoice/route.ts Invoice API
Components 31
Access and roles
- Sign in and signup
app/login/page.tsx - OAuth callback
app/auth/callback/route.ts - Role dashboards
app/(app)/dashboard/page.tsx
Clinic operations
- Patient registration
frontend/components/reception/PatientRegistry.tsx - Registration API
app/api/reception/patients/register/route.ts - Schedule and arrivals
frontend/components/reception/TodaysSchedule.tsx - Notification API
app/api/notifications/send/route.ts - Notification delivery
backend/lib/notifications/send.ts
Imaging and reports
- Scan queue
frontend/components/technician/TodaysQueue.tsx - Scan logging
frontend/components/technician/ScanLoggerForm.tsx - DICOM file storage
frontend/lib/storage.ts - DICOM review
frontend/components/radiologist/DicomViewer.tsx - DICOM parsing and rendering
frontend/lib/dicom/parse.ts - Report authoring
frontend/components/radiologist/ReportEditor.tsx
Patient services
- Appointment booking
app/(app)/dashboard/book/page.tsx - Referral submission
frontend/components/referring-doctor/NewReferralPanel.tsx - Reports and results
app/(app)/dashboard/results/page.tsx - Billing dashboard
app/(app)/dashboard/billing/page.tsx - Checkout API
app/api/payments/checkout/route.ts - Assistant widget
frontend/components/shared/AssistantWidget.tsx - Assistant API
app/api/assistant/route.ts
Administration
- Invoice API
app/api/payments/invoice/route.ts - Payment webhook
app/api/webhooks/stripe/route.ts - Admin workflows
frontend/components/admin/AdminDashboard.tsx - Staff directory
frontend/components/super-admin/StaffDirectoryPanel.tsx - Staff creation API
app/api/super-admin/staff/create/route.ts
Other components
- Patients and staff
- Supabase Auth
- Stripe
- Billing records
- OpenAI
Connections 34
- Patients and staff → Sign in and signup: signs in
- Sign in and signup → Supabase Auth: authenticates
- OAuth callback → Supabase Auth: exchanges code
- Supabase Auth → Role dashboards: routes by role
- Patients and staff → Role dashboards: uses dashboard
- Role dashboards → Appointment booking: opens booking
- Role dashboards → Referral submission: opens referrals
- Role dashboards → Patient registration: opens registration
- Patient registration → Registration API: registers patient
- Registration API → Supabase Auth: creates account
- Role dashboards → Schedule and arrivals: manages arrivals
- Role dashboards → Scan queue: opens queue
- Scan queue → Scan logging: records scan
- Scan logging → DICOM file storage: uploads series
- DICOM file storage → DICOM review: serves study URLs
- DICOM review → DICOM parsing and rendering: parses images
- Role dashboards → Report authoring: authors reports
- Role dashboards → Reports and results: views results
- Billing dashboard → Checkout API: starts payment
- Checkout API → Stripe: creates session
- Checkout API → Billing records: reads and updates
- Invoice API → Stripe: creates invoice
- Invoice API → Billing records: reads and updates
- Stripe → Payment webhook: sends events
- Payment webhook → Billing records: settles bill
- Role dashboards → Admin workflows: opens admin tools
- Role dashboards → Staff directory: opens staff tools
- Staff directory → Staff creation API: creates staff
- Staff creation API → Supabase Auth: invites account
- Assistant widget → Assistant API: sends chat
- Assistant API → Supabase Auth: verifies session
- Assistant API → OpenAI: requests response
- Notification API → Notification delivery: dispatches
- Notification delivery → Supabase Auth: reads recipient