This guide covers both automated tests and manual walkthroughs for evaluating the EscrowFlow frontend, e.g. for SCF review.
npm install
npm run typecheck # tsc --noEmit
npm run lint # ESLint
npm test # Vitest suiteTest files live alongside the code they cover (*.test.ts / *.test.tsx), including
coverage for the mock escrow service, KYC validation, wallet logic, the "new project"
wizard, OAuth token verification, and the auth store.
Run locally with the mock data layer (default):
cp .env.example .env.local # NEXT_PUBLIC_USE_MOCK=true
npm run devOpen http://localhost:3000 for the landing page, or go straight to http://localhost:3000/app for the dashboard.
The mock backend seeds a few identities in src/lib/mock/data.ts. Log in with any of
these emails and any password of 8+ characters — the mock layer doesn't check the
password, only its length:
| Role | |
|---|---|
alex@escrowflow.dev |
Client |
nina@example.com |
Client |
marcus@example.com |
Client |
priya@example.com |
Freelancer |
sam@example.com |
Freelancer |
Logging in with an unrecognized email creates a new identity with whichever role is selected on the login form.
- Log in as a client (e.g.
alex@escrowflow.dev) — the dashboard should show projects you've created, with controls to fund escrow and approve milestones. - Log out and log in as a freelancer (e.g.
priya@example.com) — the same project list should instead show controls to submit milestones and withdraw released funds. - Confirm actions unavailable to a role (e.g. a freelancer approving their own milestone) are not exposed in the UI.
- As a client, go to New Project (
/app/projects/new) and complete the wizard to create a project with at least one milestone. - Fund the project's escrow from the project detail page.
- Log in as the assigned freelancer and submit the first milestone.
- Log back in as the client and approve the milestone — verify funds release minus the platform fee, and the project completes once every milestone is approved.
- Log in as the freelancer and withdraw the released balance from the Wallet page, checking the fee schedule shown for the destination/method chosen.
- Go to Settings (
/app/settings) → Identity verification (KYC). - Walk through the verification flow and confirm status updates (e.g. pending → verified) are reflected in the UI.
- From Settings → Stellar wallet, confirm a wallet address/QR code is displayed.
- Confirm the wallet section on the Wallet page (
/app/wallet) reflects balances and transaction history consistent with actions taken during the escrow lifecycle walkthrough above.
- Forgot password (
/app/(auth)/forgot-password): submit an email and confirm the confirmation state. - Google / Apple sign-in: functional against real provider credentials only if
NEXT_PUBLIC_GOOGLE_CLIENT_ID/NEXT_PUBLIC_APPLE_CLIENT_IDare set in.env.local(see comments in.env.example); Apple sign-in requires a deployed HTTPS domain and will not work onlocalhost.
Set NEXT_PUBLIC_USE_MOCK=false and NEXT_PUBLIC_API_URL to a running instance of
escrowflow-api, then repeat the
walkthroughs above — the UI and business rules are identical, only the data source
changes.