Docs: bring both READMEs up to date

App README: password self-service in production behaviors, real test
count (155), SQLite-by-default dev note, stale status dump replaced
with a grouped feature summary. Root README: self-service reset in the
intro and quick-start table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
main
Talha Ahmed 2026-08-19 20:07:56 +05:00
parent 984069b368
commit a6ae242709
2 changed files with 32 additions and 19 deletions

View File

@ -2,8 +2,9 @@
Finance team tooling for **Utopia Brands**. The main (currently only) application is the Finance team tooling for **Utopia Brands**. The main (currently only) application is the
**Amazon Accounts Receivable Aging Dashboard** — it turns the month's Amazon *Custom **Amazon Accounts Receivable Aging Dashboard** — it turns the month's Amazon *Custom
Unified Transaction* exports into the month-end AR workbook, with per-user login, Unified Transaction* exports into the month-end AR workbook, with per-user login
month-end controls, exchange-rate fetching, and a full audit trail. (self-service password reset by emailed code), month-end controls, central-bank
exchange-rate fetching, and a full audit trail.
## Repository layout ## Repository layout
@ -32,6 +33,7 @@ sample data (local) "Test Files/" — real Amazon exports; gitignored, never
| Deploy to AWS | [ar-aging-app/deploy/DEPLOY.md](ar-aging-app/deploy/DEPLOY.md) (~$5055/month) | | Deploy to AWS | [ar-aging-app/deploy/DEPLOY.md](ar-aging-app/deploy/DEPLOY.md) (~$5055/month) |
| See how figures are calculated | [ar-aging-app/docs/system-guide.md](ar-aging-app/docs/system-guide.md) | | See how figures are calculated | [ar-aging-app/docs/system-guide.md](ar-aging-app/docs/system-guide.md) |
| Read the production plan | [plan.md](plan.md) | | Read the production plan | [plan.md](plan.md) |
| Reset a forgotten password | login screen → "Forgot password?" (emailed code) — or admin: `manage.py set-password` |
| Manage users / fix data | `python ar-aging-app/backend/manage.py --help` | | Manage users / fix data | `python ar-aging-app/backend/manage.py --help` |
Financial data never enters git: spreadsheets, databases, uploads, and `.env*` secrets are Financial data never enters git: spreadsheets, databases, uploads, and `.env*` secrets are

View File

@ -48,6 +48,10 @@ Key production behaviors:
under another name is skipped. A month can never count a file twice. under another name is skipped. A month can never count a file twice.
- **Login** (`AR_AUTH`) — per-user accounts via `manage.py add-user`; journal review/approval - **Login** (`AR_AUTH`) — per-user accounts via `manage.py add-user`; journal review/approval
and FX confirmations record the signed-in user's verified name. and FX confirmations record the signed-in user's verified name.
- **Password self-service** — users change or recover passwords with a 6-digit code emailed
to their account address (Settings, or "Forgot password?" on the login screen). Sent via
the company Mail API (`AR_MAIL_API_*`), SMTP fallback; `manage.py set-password` remains
the admin override.
- **Exchange rates** — "Fetch month-end rates" pulls central-bank rates (Frankfurter, free, - **Exchange rates** — "Fetch month-end rates" pulls central-bank rates (Frankfurter, free,
keyless; `AR_FX_PROVIDER`); fetched rates still require human confirmation (Control C5). keyless; `AR_FX_PROVIDER`); fetched rates still require human confirmation (Control C5).
- **Completed closings are locked** read-only; corrections need an explicit Reopen. - **Completed closings are locked** read-only; corrections need an explicit Reopen.
@ -73,11 +77,11 @@ scripts\start.bat # or: powershell -ExecutionPolicy Bypass -File scripts\sta
# macOS one-click: # macOS one-click:
scripts/start.command scripts/start.command
``` ```
Then open http://localhost:5173 → **New Closing** → pick the month → drag in the three Amazon Then open the dashboard → **New Closing** → pick the month → drag in the month's Amazon
files → **Run processing** → review → **Download Full A/R Aging Excel**. files → **Run processing** → review → **Download Full A/R Aging Excel**.
Uploads and exports are stored under `AR_DATA_DIR` (default `backend/data` locally, `/data` in Docker). Uploads and exports are stored under `AR_DATA_DIR` (default `backend/data` locally, `/data` in
The app connects to MySQL using `MYSQL_*` variables from `.env`. Docker). The database is a local SQLite file by default; set `MYSQL_*` in `.env` to use MySQL.
## Run the engine headless (CLI) ## Run the engine headless (CLI)
```bash ```bash
@ -90,21 +94,28 @@ python cli.py "/path/USA…01 to 10 January,2026.xlsx" \
## Tests ## Tests
```bash ```bash
make test # 16 fast tests (engine, export, API, robustness) make test # 155 fast tests: engine, API, auth, FX, upload dedup, month locking
make test-all # + Jan-2026 reconciliation & sample-comparison (integration, ~4 min) make test-all # + Jan-2026 reconciliation & sample-comparison (integration, ~4 min)
# point tests at the sample files if not in the repo root: # point the integration tests at the sample files if not in the repo root:
AR_SAMPLE_DIR="/path/to/samples" make test-all AR_SAMPLE_DIR="/path/to/samples" make test-all
``` ```
The suite runs against an isolated temporary database — it can never touch real data
(a session-scoped guard asserts the isolation before anything runs).
## Status — all phases complete (incl. v2 multi-market) ## Feature summary
- ✅ **Engine** — settlement classification + receivable; USA = **11,110,433** verified to the penny
- ✅ **Multi-marketplace** — all 13 markets (CA/UK/AU/IE + localized FR/DE/IT/ES/NL/PL/SV/TR) **Calculation engine**
reconcile **to the penny** vs the Jan-26 workbook; per-market currency & FX; settlement-owner - Settlement classification + receivable; USA Jan-26 = **11,110,433** verified to the penny
logic for cross-market EU chains; helper-row & pivot-sheet detection - All 13 marketplaces reconcile to the penny vs the Finance workbook — per-market currency
- ✅ **AR roll-forward** — opening balance (auto carry-forward) + net revenue payouts = closing; & FX, settlement-owner logic for cross-market EU chains, helper-row/pivot-sheet detection
AR Ledger · Finance Summary · Journal Entry (per-marketplace) · Reconciliation Control w/ sign-off - AR roll-forward (opening + net revenue payouts = closing) with auto carry-forward,
- ✅ **Header mapping** — localized alias tables + admin rules UI (`/api/mapping-rules`); unmapped AR Ledger, Finance Summary, per-marketplace Journal Entry, Reconciliation Control
amounts are never silently excluded - Header mapping with localized alias tables + admin rules UI; unmapped amounts are never
- ✅ **Storage-fee detection** — canonical + description-based (potential/missing storage exceptions) silently excluded; storage-fee detection; full Excel audit workbook + Finance pack
- ✅ **Excel** — Full audit workbook + Summary Finance pack
- ✅ **Tests** — ~60 fast + integration (USA reconciliation, sample comparison, 13-market benchmark) **Operations & security**
- Per-user login with emailed password codes; verified names on every sign-off
- Six month-end controls (C1C6) block publication of any untrusted figure
- Month-end FX fetched from central-bank data, gated by human confirmation
- Duplicate-proof uploads, one-closing-per-month guard, completed-month locking
- Production Docker stack (auto-HTTPS · MySQL · nightly S3 backups) + Gitea Actions CI