How swastikaroy336-lab/rx-reader-ai-05587 works
This is a prescription-management web app. Users can sign in, upload prescriptions for analysis, review extracted prescription and medicine details, and search for medicine information. The dashboard and prescription-detail pages provide the main follow-up workflow. Supabase supplies authentication, storage, and data access; edge functions handle medicine search and prescription analysis. The upload component and analysis function were not excerpted, so their connection is shown as unverified.
Main entry points: client.ts Supabase client · ProtectedRoute.tsx Route guard · App.tsx App routes · Index.tsx Landing page
Components 15
Application routing
- App routes
src/App.tsx - Landing page
src/pages/Index.tsx
Identity and access
- Sign-in modal
src/components/AuthModal.tsx - Auth state
src/hooks/useAuth.tsx - Route guard
src/components/ProtectedRoute.tsx - Supabase client
src/integrations/supabase/client.ts - Landing auth entry
src/components/Header.tsx
Prescription workflow
- Prescription upload
src/components/UploadSection.tsx - Prescription analysis
supabase/functions/analyze-prescription/index.ts - Prescription dashboard
src/pages/Dashboard.tsx - Prescription detail
src/pages/PrescriptionDetail.tsx
Medicine information
- Medicine search
src/components/SearchMedicine.tsx - Medicine lookup
supabase/functions/search-medicine/index.ts
Other components
- User
- Supabase services
Connections 19
- User → App routes: opens
- App routes → Landing page: routes to
src/App.tsx - App routes → Route guard: protects routes
src/App.tsx - Route guard → Prescription dashboard: renders
src/App.tsx - Route guard → Prescription detail: renders
src/App.tsx - Landing page → Landing auth entry: renders
src/pages/Index.tsx - Landing page → Prescription upload: renders
src/pages/Index.tsx - Landing auth entry → Sign-in modal: opens
src/components/Header.tsx - Sign-in modal → Supabase client: authenticates
src/components/AuthModal.tsx - Auth state → Supabase client: reads auth state
src/hooks/useAuth.tsx - Route guard → Auth state: checks session
src/components/ProtectedRoute.tsx - Prescription upload → Supabase client: uses client
src/components/UploadSection.tsx - Prescription upload → Prescription analysis: submits for analysis
- Prescription analysis → Supabase services: processes prescription
- Prescription dashboard → Supabase client: loads prescriptions
src/pages/Dashboard.tsx - Prescription detail → Supabase client: loads prescription data
src/pages/PrescriptionDetail.tsx - Prescription dashboard → Medicine search: renders
src/pages/Dashboard.tsx - Medicine search → Supabase client: invokes function
src/components/SearchMedicine.tsx - Medicine search → Medicine lookup: requests lookup
src/components/SearchMedicine.tsx