Vaulta is a private custody operations console built with React + TypeScript. It demonstrates an end-to-end workflow:
-
Live demo:
https://vaulta-theta.vercel.app/ -
enter the console
-
view portfolio balances
-
create outbound transfers with policy checks
-
approve 2-of-3 to move a transfer through its lifecycle to completion
-
see an activity feed for audit-style events
- Locally (recommended):
pnpm install
pnpm run validatepnpm run validate is the single quality gate: unit tests + lint + build + Playwright E2E.
- React + TypeScript + Vite
- React Router
- TanStack Query
- Tailwind + shadcn/ui primitives
- Vitest unit tests (policy + lifecycle contracts)
- Playwright E2E (golden path)
decimal.jsfor precise money/amount handling
- Node.js + pnpm
- Simulated: custody provider API, persistence, auth, on-chain execution, monitoring/alerting.
- In-repo contracts: policy evaluation outputs, transfer lifecycle/state machine, number-handling discipline.
pnpm install
pnpm devVite will print the local dev URL (typically http://localhost:5173).
pnpm dev
pnpm test
pnpm lint
pnpm build
pnpm preview
pnpm test:e2e
pnpm run validatepnpm run validate runs unit tests + lint + build + Playwright.
- Connect flow (
/→/dashboard) - Dashboard: balances/portfolio primitives
- Transfers: create + policy preview + transfer details + approvals
- Activity: audit events, including
transfer_completed - Deterministic E2E golden path:
e2e/golden-path.spec.ts
More detail: docs/PROJECT-STATUS.md.
- Policy engine is a pure module with explicit pass/warn/fail outputs (
src/lib/custody/policy-engine.ts) and unit tests to lock behavior. - Transfer lifecycle is a state machine that guards impossible transitions (
src/lib/custody/transfer-machine.ts) with unit tests as a contract. - Single quality gate:
pnpm run validateis the “green means shippable” contract. - Deterministic E2E: stable selectors + deterministic scheduler settings in Playwright config.
- No float money math: uses
decimal.jsand documents number handling (docs/NUMBER-HANDLING.md).
- Policy: rules that evaluate a transfer and return pass/warn/fail outcomes (some failures block).
- Approvals: multi-party authorization to progress a transfer (simulated 2-of-3 in this MVP).
- Audit / Activity: the event trail for session + transfer lifecycle events (UI surface: Activity feed).
- Transfer lifecycle: the state machine that governs valid/invalid status transitions.
pnpm dev- Open the app and enter the console.
- Create a transfer (Destination + Asset + Amount) and review policy checks.
- Approve with any 2 distinct roles → transfer should reach Completed.
- Verify the transfer appears in Transfers table and Activity feed.
- Routing:
src/app/router.tsx(Connect, Dashboard, Transfers, Activity, Settings) - Mock custody backend:
src/lib/custody/mock-api.ts- policy gating:
src/lib/custody/policy-engine.ts - workflow timings + state transitions:
src/lib/custody/transfer-machine.ts
- policy gating:
- Number handling (authoritative):
docs/NUMBER-HANDLING.md - Golden path E2E:
e2e/golden-path.spec.ts
More context (2-minute read): docs/PROJECT-STATUS.md.
- This repo intentionally uses a simulated custody API and seeded data so reviewers can run the full workflow locally.
- The end-to-end workflow is locked by Playwright in
e2e/and a single command (pnpm run validate).
- shadcn/ui over custom components: if a UI primitive/component is needed and it’s not already in
src/components/ui/, install it via shadcn instead of hand-rolling a custom one (unless there is a clear blocker). - Don’t break E2E selectors: keep
data-testidstable fore2e/golden-path.spec.ts. - Numeric correctness matters: follow
docs/NUMBER-HANDLING.md(no JS floats for money logic).
- Product thesis:
docs/PRODUCT-THESIS.md - Project status:
docs/PROJECT-STATUS.md - Project rules:
docs/RULES.md - Architecture:
docs/ARCHITECTURE.md - Decisions (ADRs):
docs/decisions/
This repo uses Cursor rules in .cursor/rules/:
- Core always-on rules:
.cursor/rules/00-core.mdc - File-scoped rules:
.cursor/rules/react-typescript.mdc,.cursor/rules/ui-shadcn.mdc,.cursor/rules/testing.mdc