poleademo

POLEA implementation plan

This is a local, synthetic pharmacy operations demo. Telegram is deferred at the user’s request. No patient data, controlled substances, external integrations, or deployment are included.

Decisions

Checklist

Detailed implementation and validation status is maintained here and in README.md. An unchecked production capability is not implied by a working demo.

Phase report

Phase Main files Verification Limits / next work
0–1 backend/db.py, models.py, inventory.py, security.py, schemas.py, seed.py, migrations/, Makefile, Compose migrations apply/check; invariant, concurrency, authorization and idempotency tests one company per database; no production identity/MFA
2 frontend/, backend/main.py seven real Chrome workflows; branded desktop/mobile screenshots reviewed; 390px layout checked lightweight client instead of Next.js; bounded demo operational lists
3 none explicitly deferred build Telegram after core workflows stabilize
4 backend/documents.py, fixtures.py, frontend/assets/ledgers/ upload, duplicate, ambiguity, stale review, rollback and browser approval tests structured physical counts only; illustrative messy fixture; no full ledger arithmetic or malware scanner
5–6 backend/intelligence.py, clock.py reproducibility, temporal splits, imputation, expiry/transit and DST tests no regression fitting, empirical supplier learning, calibrated coverage, hierarchy or drift monitoring
7 backend/intelligence.py, order/transfer API MILP budget/pack/lot/safety tests; full transfer and PO receipt integration tests deterministic expected-demand optimization; stochastic evaluation separately; no hard service guarantee or partial receipts
8 tests/, .github/workflows/check.yml, README.md, SECURITY.md, backend/verify.py 32 backend tests, 7 Chrome tests; Ruff/JS syntax/schema/dependency checks Docker unavailable here; PostgreSQL/Redis/container runtime not executed; CI authored but not run remotely

Verification commands executed

python -m alembic upgrade head, python -m backend.fixtures, python -m backend.seed, python -m pytest -q, make check, alembic check, python -m pip check, make verify, npm run test:e2e.

One upstream Starlette warning notes its test client will migrate from httpx to httpx2. Tests pass; this is not an application failure. Runtime data, sessions, uploads, node modules and the virtual environment are ignored by Git. No secrets, hosted Site or external integration were created.

Brand and simplicity revision

Rodolfo’s Pharmacy presentation