Go to file
Talha Ahmed 2aed450f4c Password updates via emailed 6-digit code
New flow (active once AR_SMTP_* is configured; hidden otherwise):
- POST /api/auth/request-code emails a code to the account address
  (usernames are emails). HMAC-stored, 10-min expiry, single-use,
  5-attempt lockout, 60s resend throttle, no user enumeration.
- POST /api/auth/reset-password sets the new password with the code —
  works signed-in (Settings) and from the login screen (Forgot
  password?), so users can self-recover without the admin.
- Mailer: stdlib smtplib (STARTTLS/SSL, certifi CA bundle); SMTP
  settings documented in .env templates.
- Settings switches to the code flow when email is on; the
  current-password form remains the fallback.

Note: CRAI_Report was checked as the reference for code-sending — it
has no email/OTP functionality, so this is a fresh implementation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-19 19:35:07 +05:00
.claude Initial commit: AR aging app with root gitignore. 2026-07-29 18:07:21 +05:00
.gitea/workflows Production readiness: month separation, auth, FX service, AWS deployment 2026-08-19 18:46:47 +05:00
ar-aging-app Password updates via emailed 6-digit code 2026-08-19 19:35:07 +05:00
.gitattributes Production readiness: month separation, auth, FX service, AWS deployment 2026-08-19 18:46:47 +05:00
.gitignore fix isuses 2026-08-18 19:37:57 +05:00
README.md Production readiness: month separation, auth, FX service, AWS deployment 2026-08-19 18:46:47 +05:00
plan.md Production readiness: month separation, auth, FX service, AWS deployment 2026-08-19 18:46:47 +05:00

README.md

Finance-Accounts

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 Unified Transaction exports into the month-end AR workbook, with per-user login, month-end controls, exchange-rate fetching, and a full audit trail.

Repository layout

ar-aging-app/          The application (FastAPI backend · React frontend)
│
├── backend/           Python API + calculation engine + tests
├── frontend/          React + TypeScript dashboard
├── scripts/           Launchers: start.ps1 / start.bat (Windows) · start.command (macOS)
├── deploy/            Production runbook (DEPLOY.md) + backup script
├── docs/              System guide, AR logic, audit reports
├── docker-compose.yml          local Docker stack (dev)
├── docker-compose.prod.yml     production stack (AWS: HTTPS + MySQL + backups)
└── .env.example       every setting, local + production sections

plan.md                Production-readiness plan (architecture, AWS costs, phases)
sample data (local)    "Test Files/" — real Amazon exports; gitignored, never committed

Quick start

I want to… Do this
Run the app on this PC double-click ar-aging-app/scripts/start.bathttp://localhost:5174
Understand the app ar-aging-app/README.md
Deploy to AWS ar-aging-app/deploy/DEPLOY.md (~$5055/month)
See how figures are calculated ar-aging-app/docs/system-guide.md
Read the production plan plan.md
Manage users / fix data python ar-aging-app/backend/manage.py --help

Financial data never enters git: spreadsheets, databases, uploads, and .env* secrets are all ignored (see .gitignore). The only template committed is ar-aging-app/.env.example.