Here's your hospital system's anatomy. Next.js portals (patient-facing, staff-facing, admin), React Native app for patients and field staff. API layer with role-based access — doctors, nurses, pharmacists, billing staff see exactly their scope.
PostgreSQL: patients, encounters, prescriptions, inventory, billing — one coherent schema, no module silos. Redis for OPD token queues and session state. Offline-first mobile: encounters captured without connectivity, synced with conflict rules.
Thermal-printer services for prescriptions and receipts. SMS/WhatsApp gateway for appointments and lab results. FBR invoice integration for compliant billing. Audit logs for every clinical and financial action.
Backup: automated daily snapshots, tested restores, documented recovery procedures. Monitoring sized for a hospital IT reality — simple dashboards, phone alerts. Every component chosen so your staff can operate it: the architecture respects that the most sophisticated system fails if the night-shift operator can't understand it.