How kushalkasparaju-star/mediqr-main works
MediQR is a React health-record app: patients register, maintain records, and present a generated QR code; providers use QR scanning to access patient information. App.tsx routes between home, login, registration, and role-specific dashboards. Patient and account data are persisted in browser localStorage, not a backend. The README documents QR scanning and hospital access, while sampled code confirms QR login and patient-profile record operations. Hospital-dashboard internals and home-page actions were not sampled, so those relationships are limited to documented or indexed evidence.
Main entry points: App.tsx App router · authService.ts Authentication service · PatientDashboard.tsx Patient dashboard · PatientProfileView.tsx Patient profile view
Components 17
App and navigation
- App router
App.tsx - Header navigation
components/Header.tsx - Footer
components/Footer.tsx - Home page
pages/HomePage.tsx
Identity and registration
- Login and QR scan
pages/LoginPage.tsx - Patient registration
pages/PatientRegistration.tsx - Authentication service
services/authService.ts - Account local storage
services/authService.ts
Patient records
- Patient service
services/patientService.ts - Patient local storage
services/patientService.ts - File encoding
utils/fileUtils.ts - Patient dashboard
pages/PatientDashboard.tsx - Record and user types
types.ts
Hospital access
- Hospital dashboard
pages/HospitalDashboard.tsx - Patient profile view
pages/PatientProfileView.tsx
Other components
- Patient
- Hospital provider
Connections 26
- Patient → Home page: visits
README.md - Hospital provider → Login and QR scan: signs in
README.md - App router → Home page: renders
App.tsx - App router → Login and QR scan: renders
App.tsx - App router → Patient registration: renders
App.tsx - App router → Patient dashboard: renders
App.tsx - App router → Hospital dashboard: renders
App.tsx - App router → Authentication service: checks session
App.tsx - App router → Header navigation: renders
App.tsx - App router → Footer: renders
App.tsx - Header navigation → App router: changes page
components/Header.tsx - Home page → App router: selects page
App.tsx - Login and QR scan → Authentication service: authenticates
pages/LoginPage.tsx - Patient registration → File encoding: encodes files
pages/PatientRegistration.tsx - Patient registration → Authentication service: registers patient
pages/PatientRegistration.tsx - Authentication service → Patient service: creates patient
services/authService.ts - Authentication service → Account local storage: reads and writes
services/authService.ts - Patient service → Patient local storage: reads and writes
services/patientService.ts - Patient dashboard → Patient service: loads and updates
pages/PatientDashboard.tsx - Patient dashboard → File encoding: encodes uploads
pages/PatientDashboard.tsx - Hospital dashboard → Patient profile view: opens profile
pages/HospitalDashboard.tsx - Patient profile view → Patient service: loads and updates
pages/PatientProfileView.tsx - Patient profile view → File encoding: encodes uploads
pages/PatientProfileView.tsx - Patient dashboard → Record and user types: uses records
pages/PatientDashboard.tsx - Patient profile view → Record and user types: uses records
pages/PatientProfileView.tsx - Hospital dashboard → Login and QR scan: scans patient QR
README.md