Build MerchantFlow onboarding CRM foundation
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Implementation checklist
|
||||
|
||||
## Foundation
|
||||
|
||||
- [x] pnpm/Turbo workspace, pinned packages and lockfile
|
||||
- [x] Shared UI, browser-safe contracts, server-only database package
|
||||
- [x] PostgreSQL Compose, migrations, repeatable four-account/eighteen-merchant seed
|
||||
- [x] Cookie sessions and server-enforced role scopes
|
||||
- [x] Scoped dashboard, merchants/detail, pipeline, tasks, review queue
|
||||
- [x] Responsive public landing, login, CRM shell, reusable states and controls
|
||||
- [x] Persistent EN/RU UI, validation, statuses and formatting
|
||||
- [x] Setup documentation and environment examples
|
||||
|
||||
## Verification (record actual outcomes)
|
||||
|
||||
- [x] Frozen install, build, lint, typecheck, unit tests
|
||||
- [x] Isolated PostgreSQL integration tests: auth, expiry, access, metrics, seed repeatability
|
||||
- [x] Direct and proxied database-aware health endpoint
|
||||
- [x] Browser checks at 390px/1440px, EN/RU, all roles and navigation
|
||||
- [x] Keyboard, reduced motion, loading/error/empty states and overflow
|
||||
- [x] Browser bundle excludes Prisma/database dependencies
|
||||
|
||||
### Results · 24 September 2026
|
||||
|
||||
| Check | Actual outcome |
|
||||
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `pnpm install --frozen-lockfile` | Passed; lockfile matches all six workspace manifests |
|
||||
| `pnpm build` | All five packages built; Vite's server-dependency boundary passed |
|
||||
| `pnpm lint` / `pnpm typecheck` | Passed |
|
||||
| `pnpm test` | 8 passed: 4 contracts, 2 localization/return URL, 2 API units |
|
||||
| `pnpm test:integration` | 10 passed against isolated PostgreSQL on port 55441 |
|
||||
| `pnpm test:e2e` | 7 passed; EN/RU at 390px and 1440px, account switching and all role restrictions |
|
||||
| Frontend/backend start | Vite 5173 and NestJS 3001 started through the root development command |
|
||||
| Health directly / through proxy | Both returned `{"status":"ok","database":"connected"}` |
|
||||
| Visual inspection | Inspected desktop/mobile screenshots, Russian layout, merchant detail and landing page; no page overflow in browser assertions |
|
||||
| Accessibility interactions | Login errors associated with fields, keyboard skip link, mobile sheet Escape/focus restoration, reduced motion checked |
|
||||
| `pnpm format:check` | Passed |
|
||||
|
||||
Browser reports and screenshots are generated in ignored `playwright-report/` and `test-results/`. Test databases and server ports are separate from development. PostgreSQL uses 55440/55441 because 5432 and 55432 were already occupied. The Vite build emits non-fatal annotation warnings from Zod 4.6.5; emitted assets and all runtime checks pass.
|
||||
|
||||
The dedicated browser runner was verified to release ports 5174/3002 after the suite. The development app remains on 5173/3001. Sign-in was also smoke-tested through both `localhost` and `127.0.0.1` origins. `.env` and generated Prisma sources are ignored by Git.
|
||||
|
||||
## Deferred intentionally
|
||||
|
||||
- [ ] Merchant editing and assignment
|
||||
- [ ] Pipeline actions, rejection and return-to-KYB mutations
|
||||
- [ ] KYB checklist editing and review decisions
|
||||
- [ ] Task/reminder management
|
||||
|
||||
Never in this prototype: merchant portal, payments, uploads, external KYB, external reminders, deployment.
|
||||
@@ -0,0 +1,25 @@
|
||||
# MerchantFlow product brief
|
||||
|
||||
A local test-assignment prototype for a fictional crypto-payment provider. The first milestone is a usable, read-only CRM foundation with real authentication, persisted sample records, responsive navigation, and EN/RU localization.
|
||||
|
||||
## People and access
|
||||
|
||||
Four seeded accounts: one Head of Sales, one Compliance Officer, two Account Managers. The Head sees all merchants. Compliance sees only merchants currently in KYB or Compliance Review. Managers see only their assigned merchants. These scopes apply to details, lists, metrics, history, tasks, and search. The Review Queue is exclusive to Compliance, including direct API requests.
|
||||
|
||||
## Onboarding
|
||||
|
||||
New Lead → Contacted → Qualified → KYB → Compliance Review → Integration → Testing → Live.
|
||||
|
||||
Rejected is an alternate terminal outcome, never a step after Live. Compliance may return a review to KYB for corrections. KYB uses document checklists and notes without uploads. Names and notes remain exactly as entered. Status and role codes remain canonical; labels are translated.
|
||||
|
||||
## Foundation journeys
|
||||
|
||||
Public landing → login → role-scoped dashboard → merchant search/filter → merchant detail, checklist, notes, history, tasks. Separate Pipeline and Tasks pages and a Compliance-only Review Queue. Records are read-only in this milestone. Tasks and reminders are displayed inside the app. Dashboard values come from database records and historical events.
|
||||
|
||||
## Defaults and boundaries
|
||||
|
||||
English is the default. Persist EN/RU selection in browser storage. Dates use the selected locale and the viewer's local time zone. Light neutral UI, restrained lime accents, visible focus, touch-sized controls, reduced-motion support. No merchant self-service, real payment processing, external KYB integration, uploads, external notifications, or deployment.
|
||||
|
||||
## Later milestones
|
||||
|
||||
Merchant create/edit and owner assignment; permission-aware pipeline transitions with atomic history; Compliance approve/reject/return-to-KYB with correction notes; checklist editing; task/reminder create/edit/complete. These require explicit workflow permission and validation rules before implementation.
|
||||
Reference in New Issue
Block a user