Emergency pharmacy delivery PWA for remote areas in Ghana
# 🚑 PharmaSOS — Emergency Pharmacy Delivery App
A mobile-first Progressive Web App (PWA) that allows people in remote areas of Ghana to order emergency drugs and have them delivered by motorbike courier — even on a 2G connection.
---
## 📱 Features
- **Emergency Drug Ordering** — Search by symptom or drug name
- **GPS Location Detection** — Auto-detect or manually pin location
- **Nearest Pharmacy Finder** — Matches user to closest stocked pharmacy
- **Real-Time Order Tracking** — Received → Packed → Out for Delivery → Arrived
- **Mobile Money Payments** — MTN MoMo, Vodafone Cash, AirtelTigo
- **SMS Fallback** — Order confirmation via SMS for low-data users
- **Emergency SOS Button** — Instantly alert emergency contact with location
- **Pharmacy Admin Dashboard** — Manage orders and update delivery status
- **Offline Support** — PWA caching for browsing drugs without internet
---
## 🗂️ Project Structure
```
pharmasos/
│
├── backend/
│ ├── server.py # Flask server — all API routes and logic
│ ├── pharmasos.db # SQLite database (auto-created on first run)
│ └── requirements.txt # Python dependencies
│
├── frontend/
│ ├── templates/ # HTML pages (Jinja2 templates)
│ │ ├── base.html # Shared layout, nav, header
│ │ ├── home.html # Landing page with symptoms and nearby pharmacies
│ │ ├── order.html # Drug search and order form
│ │ ├── tracking.html # Live order tracking page
│ │ ├── profile.html # User profile and medical info
│ │ └── admin.html # Pharmacy admin dashboard
│ │
│ └── static/
│ ├── css/
│ │ └── main.css # All styles — mobile-first, PWA-ready
│ ├── js/
│ │ ├── core.js # Shared utilities (toast, GPS, fetch helpers)
│ │ ├── home.js # Homepage logic (symptoms, pharmacy list)
│ │ ├── order.js # Order flow (drug search, cart, checkout)
│ │ ├── tracking.js # Order …