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 β¦