4.4 KiB
MerchantFlow product brief
A local merchant-onboarding CRM for a fictional crypto-payment provider, with persisted records, real authentication, permission-enforced workflows, responsive navigation and EN/RU localization.
People and access
Four seeded staff accounts: Head of Sales, Compliance Officer, Alex Morgan and Sam Taylor. Head sees the portfolio and team activity, assigns/reassigns managers and manages commercial onboarding. Managers see and edit only assigned merchants and related commercial activities/tasks; they cannot change ownership. Compliance sees merchant context and KYB across the portfolio, records reviews and KYB notes, and manages personal compliance tasks. Compliance cannot edit commercial details, change ownership or activate merchants. Sales cannot issue or override compliance decisions. The Review Queue is Compliance-only.
NestJS authorization and database predicates apply to all reads, searches, counts, detail children, dashboards and mutations. A hidden resource returns 404; a forbidden action on a visible resource returns 403. The UI reflects server capabilities.
Onboarding
New Lead → Contacted → Qualified → KYB → Compliance Review → Integration → Testing → Live. Rejected is an alternate terminal outcome; neither Live nor Rejected has outgoing stage actions. The same merchant ID persists throughout.
Assignment is required before leaving New Lead. Sales collects the four KYB documents. All must have received-history evidence before submission creates a pending review. Reviewed company/KYB fields freeze during review. Compliance approval advances to Integration; rejection requires a reason; corrections require a reason and item-specific notes and return the merchant to KYB. Resubmission creates another review cycle. Decisions are immutable.
Reviewed company identity, website, country, industry and KYB items remain locked after approval. Contact details, volume estimates, source and authorized ownership can change. Head or the assigned manager may advance Integration → Testing → Live only with matching approval/checklist evidence. Reassignment transfers open commercial tasks, preserving completed attribution and personal Compliance tasks.
Journeys and records
Landing → email/password login → role-scoped dashboard → merchant search/filter → detail, editing, assignment, checklist, reviews, interactions, history and tasks. Pipeline, Tasks and Compliance Review Queue provide dedicated views. Tasks can be created, edited and completed from merchant details; reminders stay in the app.
Merchants include company and primary-contact details, website, country, industry, decimal USD volume estimates, source, nullable manager, stage, timestamps and a concurrency version. Related models retain activities, stage events, checklist changes, review snapshots and task attribution. Mutations and audit history commit atomically and reject stale versions.
Authentication and demo data
Salted password hashes; opaque eight-hour database-backed sessions in HttpOnly, SameSite cookies; Secure cookies in production; exact trusted-Origin checks for all mutations; bounded IP/email login limits. No authentication tokens in browser storage and no public staff registration.
Demo addresses: [email protected], [email protected], [email protected], [email protected]. Initial password: MerchantFlow123!. Seed 45 fictional merchants, five unassigned New Leads and 20 per manager, across all stages. Histories span 90 days and include interactions, document corrections, review outcomes and overdue/upcoming/completed tasks. Advanced successful fixtures have valid approval and checklist history. Dashboard values derive from those records.
Seeding uses stable IDs, a stored date anchor and a version marker. It preserves edits and existing passwords. Only recognized unchanged foundation fixtures receive inferred historical enrichment; modified legacy fixtures are reported and preserved.
Defaults and boundaries
English is the default; EN/RU selection persists in browser storage. Dates use the selected locale and viewer's time zone. Names and notes remain verbatim; canonical status/role labels are translated. Retain the light neutral UI, lime accents, visible focus, touch-sized controls and reduced-motion support.
No merchant creation/deletion UI, staff registration, merchant self-service, real payments, external KYB integration, uploads, external notifications or deployment.