Offline-first pharmacy bill management for Indian pharmacies. Upload supplier PDFs, auto-parse product data, track expiry, compare prices, generate reports.
- PDF Parsing — Drag-and-drop upload with automatic table extraction and text-line fallback
- Bill Management — Search, filter, sort bills with confidence scoring
- Expiry Alerts — 30/60/90 day warnings with severity color coding
- Price Analytics — Track price changes and compare suppliers
- Payment Tracking — Record payments, track paid/partial/unpaid status
- Reports — Purchase reports, stock summaries, sanity checks with CSV export
- Backup & Restore — Timestamped backups via CLI or API
# Install
pip install -e .
# Initialize database
python -m pharmgmt.cli.commands migrate
# Start server
python -m pharmgmt.cli.commands serve
# Open browser → http://localhost:8000Dark glassmorphism UI with 9 pages: Dashboard, Bills, Bill Detail, Upload, Products, Staging Review, Alerts, Analytics, Reports.
pharmgmt version # Show version
pharmgmt migrate # Init/migrate database
pharmgmt serve # Start web server
pharmgmt ingest <file> # Ingest a PDF
pharmgmt backup # Create backup
pharmgmt backups # List backups
pharmgmt restore <name> # Restore from backup
pharmgmt cleanup # Run retention policy| Layer | Tech |
|---|---|
| Backend | Python 3.12, FastAPI, SQLAlchemy, SQLite (WAL mode) |
| pdfplumber (text + table extraction) | |
| Frontend | Vanilla HTML/CSS/JS (no build step) |
| Design | Dark glassmorphism, Inter font, CSS custom properties |
src/pharmgmt/
├── api/ # FastAPI routes, schemas, dependencies
├── cli/ # CLI commands (serve, ingest, backup, etc.)
├── models/ # SQLAlchemy ORM models
├── parsing/ # PDF parser, column resolver, confidence scoring
├── services/ # Business logic (ingestion, alerts, analytics, reports)
└── static/ # Frontend SPA (HTML, CSS, JS)
├── css/ # Design system (index, components, responsive)
└── js/ # SPA router, API client, page renderers
See docs/USER_GUIDE.md for the complete user guide.
MIT