How nuby911/qr-dokter works
MediQR is a three-app, offline-first digital prescription system. The main workflow is: a doctor completes onboarding, creates and signs a prescription, then issues it as a compressed QR receipt; a patient can open and verify that prescription and show its QR to a pharmacy; the pharmacy scans and verifies it, matches prescribed items to local stock, and records dispensing. README documents these cross-app handoffs and capabilities. Source excerpts support the main component calls; unsampled internals are represented only where documented, so some relationships are omitted.
Main entry points: app/page.tsx Pharmacy workspace · app/page.tsx Prescription workspace · PatientViewer.tsx Prescription viewer · inventory-store.ts Inventory and dispense store
Components 25
Doctor desktop
- Prescription workspace
apps/dokter/src/app/page.tsx - Doctor onboarding
apps/dokter/src/components/doctor/DoctorOnboardingModal.tsx - Prescription form
apps/dokter/src/components/doctor/PrescriptionForm.tsx - Signing keys
apps/dokter/src/lib/crypto.ts - Doctor profile store
apps/dokter/src/lib/doctor-store.ts - Thermal QR receipt
apps/dokter/src/components/doctor/ThermalReceiptPreview.tsx - Prescription QR codec
apps/dokter/src/lib/qr-codec.ts
Patient portal
- Prescription view route
apps/pasien-web/src/app/view/page.tsx - Prescription viewer
apps/pasien-web/src/components/patient/PatientViewer.tsx - Prescription QR codec
apps/pasien-web/src/lib/qr-codec.ts - Signature verification
apps/pasien-web/src/lib/crypto.ts - Prescription card
apps/pasien-web/src/components/patient/PrescriptionCard.tsx - Patient QR modal
apps/pasien-web/src/components/patient/QrModal.tsx - Offline service worker
apps/pasien-web/public/sw.js
Pharmacy desktop
- Pharmacy workspace
apps/apotek/src/app/page.tsx - Pharmacy onboarding
apps/apotek/src/components/pharmacy/PharmacyOnboardingModal.tsx - QR scanner input
apps/apotek/src/components/pharmacy/QrScannerInput.tsx - Prescription QR codec
apps/apotek/src/lib/qr-codec.ts - Signature verification
apps/apotek/src/lib/crypto.ts - Dispense workspace
apps/apotek/src/components/pharmacy/DispenseWorkspace.tsx - Inventory manager
apps/apotek/src/components/pharmacy/InventoryManager.tsx - Inventory and dispense store
apps/apotek/src/lib/inventory-store.ts
Other components
- Doctor
- Patient
- Pharmacist
Connections 29
- Doctor → Prescription workspace: uses
README.md - Prescription workspace → Doctor onboarding: opens
apps/dokter/src/app/page.tsx - Prescription workspace → Prescription form: renders
apps/dokter/src/app/page.tsx - Prescription workspace → Thermal QR receipt: renders
apps/dokter/src/app/page.tsx - Prescription workspace → Doctor profile store: loads profile
apps/dokter/src/app/page.tsx - Doctor onboarding → Doctor profile store: saves profile
apps/dokter/src/components/doctor/DoctorOnboardingModal.tsx - Prescription form → Signing keys: signs prescription
apps/dokter/src/components/doctor/PrescriptionForm.tsx - Prescription form → Doctor profile store: saves profile
apps/dokter/src/components/doctor/PrescriptionForm.tsx - Thermal QR receipt → Prescription QR codec: encodes QR
apps/dokter/src/components/doctor/ThermalReceiptPreview.tsx - Thermal QR receipt → Patient: issues QR
README.md - Patient → Prescription view route: opens prescription
README.md - Prescription view route → Prescription viewer: renders
apps/pasien-web/src/app/view/page.tsx - Prescription viewer → Prescription QR codec: decodes input
apps/pasien-web/src/components/patient/PatientViewer.tsx - Prescription viewer → Signature verification: verifies signature
apps/pasien-web/src/components/patient/PatientViewer.tsx - Prescription viewer → Prescription card: renders
apps/pasien-web/src/components/patient/PatientViewer.tsx - Prescription card → Patient QR modal: opens
apps/pasien-web/src/components/patient/PrescriptionCard.tsx - Prescription card → Pharmacist: shows QR
README.md - Prescription viewer → Offline service worker: offline support
README.md - Pharmacist → Pharmacy workspace: uses
README.md - Pharmacy workspace → Pharmacy onboarding: opens
apps/apotek/src/app/page.tsx - Pharmacy workspace → QR scanner input: renders
apps/apotek/src/app/page.tsx - Pharmacy workspace → Prescription QR codec: decodes input
apps/apotek/src/app/page.tsx - Pharmacy workspace → Signature verification: verifies prescription
apps/apotek/src/app/page.tsx - Pharmacy workspace → Dispense workspace: renders
apps/apotek/src/app/page.tsx - Pharmacy workspace → Inventory manager: renders
apps/apotek/src/app/page.tsx - Pharmacy workspace → Inventory and dispense store: resets data
apps/apotek/src/app/page.tsx - Pharmacy onboarding → Inventory and dispense store: stores profile
apps/apotek/src/components/pharmacy/PharmacyOnboardingModal.tsx - Dispense workspace → Inventory and dispense store: updates stock
apps/apotek/src/components/pharmacy/DispenseWorkspace.tsx - Inventory manager → Inventory and dispense store: updates inventory
apps/apotek/src/components/pharmacy/InventoryManager.tsx