49 lines
5.9 KiB
Markdown
49 lines
5.9 KiB
Markdown
# Implementation checklist
|
|
|
|
## Implemented
|
|
|
|
- [x] Existing pnpm/Turbo, NestJS, React, PostgreSQL and Prisma foundation retained
|
|
- [x] Additive migration for merchant company/contact fields, decimal USD estimates, source, nullable manager, timestamps and versions
|
|
- [x] Typed interactions, immutable audit events, checklist change history, review cycles/snapshots and attributed commercial/compliance tasks
|
|
- [x] Hashed passwords, opaque database-backed sessions, cookie security, eight-hour expiry, rotation and logout
|
|
- [x] Trusted-Origin checks on every mutation and bounded IP/email login throttles with Retry-After
|
|
- [x] Four demo identities: Head, Compliance, Alex and Sam; original user IDs/password hashes preserved
|
|
- [x] Query-level scoping for reads, search, totals, detail children, dashboards and writes
|
|
- [x] Head-only manager lookup and reassignment with open commercial task handoff
|
|
- [x] Adjacent commercial stages, assignment prerequisite, complete KYB submission, immutable review decisions, corrections/resubmission and approval-gated activation
|
|
- [x] Reviewed company/KYB fields locked during and after review; Sales cannot override Compliance
|
|
- [x] Version-checked transactions serialize merchant and child mutations; stale updates return 409
|
|
- [x] Merchant editing, assignment, collection, review, interaction and task UI; server-derived capabilities
|
|
- [x] EN/RU controls and validation, nullable-owner rendering, USD formatting, local date/time input and protected routes
|
|
- [x] Repeatable 45-merchant seed with 90-day histories, five unassigned leads and balanced 20-merchant manager portfolios
|
|
- [x] Recognition-based legacy enrichment; edited/unrecognized legacy fixtures preserved without inferred approvals
|
|
- [x] Documentation updated for endpoints, credentials, security, workflow and migration behavior
|
|
|
|
## Verification · 24 September 2026
|
|
|
|
| Check | Actual outcome |
|
|
| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
| Build | All workspace packages built; browser bundle excludes database/Prisma dependencies |
|
|
| Lint and typecheck | Passed |
|
|
| Unit tests | 8 passed: contracts, localization, return paths, scopes and password hashing |
|
|
| Integration tests | 18 passed against disposable PostgreSQL on 55441 |
|
|
| Authorization coverage | Both manager-to-manager attack directions, hidden children, forbidden field injection, personal Compliance tasks, Head-only lookup, anonymous and origin denial |
|
|
| Workflow coverage | Corrections/resubmission, approval, rejection, approval-required activation, immutable decisions, concurrent decisions and reassignment races |
|
|
| Seed coverage | Fresh 45-record fixtures; edited merchant/task/password preservation; legacy account migration; unchanged original records; no inferred approvals for modified legacy fixtures |
|
|
| Browser tests | 8 passed: EN/RU at 390px/1440px, editor sheets, all four accounts, assignment, editing, tasks, corrections, approval, activation and reassignment |
|
|
| Session/browser coverage | Logout, expiry, account switching, private-cache clearing, no auth tokens in localStorage, protected routes, loading/error/empty states, keyboard and reduced motion |
|
|
| Format and whitespace | Prettier check and git diff check passed |
|
|
| Development database upgrade | Applied migration and seed; compared all 18 original merchants, stage events, notes, checklist values, original tasks and password hashes: unchanged; 45 merchants after upgrade |
|
|
|
|
A pre-upgrade development backup was saved locally at `/tmp/merchantflow-before-onboarding-yn40uh40.dump`. Tests recreate only the disposable `db-test` service, never the development `db` service. Integration and browser suites run sequentially. Screenshots/traces are in ignored `test-results/` and `playwright-report/` directories.
|
|
|
|
Development smoke checks passed through both `localhost:5173` and `127.0.0.1:5173`: healthy database, successful login for all four accounts, 45 merchants for Head/Compliance, 20 for each manager, and 401 when reusing every revoked session. The API health check also passed directly on port 3001.
|
|
|
|
Visual inspection covered the completed approval-to-Live detail screen and the mobile Russian editor. Audit records are collapsed in merchant detail, with translated system labels; the complete history remains available.
|
|
|
|
Existing dependency warnings are non-fatal: Zod/Rollup annotation placement and the Prisma PostgreSQL adapter's pg concurrent-query deprecation. All checks above passed despite these warnings.
|
|
|
|
## Boundaries
|
|
|
|
No staff registration, merchant creation/deletion UI, merchant portal, uploads, payment processing, external KYB service, external reminders or deployment. Login rate-limit buckets are intentionally in-process for this single-process local prototype. Seed dates are anchored once and naturally age; reruns do not refresh deadlines or rewrite existing edits.
|