A P2P payment request app — request money from friends, track requests, pay or decline them. Built with React + Hono, deployed to Vercel + Supabase.
https://payrequest-hub.vercel.app
Sign in with your email — a magic link will be sent to your inbox.
Test videos are recorded automatically on every CI run. Download from GitHub Actions → playwright-videos artifact
To watch locally, run the Docker stack then:
docker compose up --build -d
docker compose --profile test run --rm playwright
# Videos exported to e2e/videos/ on your machinePrerequisites: Docker Desktop installed and running. No other installs needed.
git clone https://github.com/harunu/payrequest-hub
cd payrequest-hub
docker compose up --buildOpen http://localhost:8080 in your browser.
- Use Quick Login buttons (testuser1 / testuser2) — no email setup needed in Docker mode
- Reset database:
docker compose down -v && docker compose up --build
All 12 tests run fully inside Docker — no local Node.js or Playwright install needed:
# Start Docker stack first
docker compose up --build -d
# Run all tests (videos exported to e2e/videos/)
docker compose --profile test run --rm playwrightVideos are automatically exported to e2e/videos/ on your host machine.
| Layer | Technology |
|---|---|
| Frontend | React 18 + Vite + React Router + Tailwind CSS + shadcn/ui |
| API | Node.js + Hono (serverless on Vercel, Node server in Docker) |
| Database | PostgreSQL (Supabase in production, postgres:15 in Docker) |
| Auth | Supabase magic link + HTTP-only session cookie |
| Money math | decimal.js — never native float |
| Deployment | Vercel (frontend + API, single project) |
| E2E | Playwright with video recording (video: 'on') |
| CI/CD | GitHub Actions → Vercel deploy on push to main |
See DEPLOYMENT.md for step-by-step instructions.
Required env vars in Vercel:
| Variable | Value |
|---|---|
DATABASE_URL |
Supabase Transaction pooler URL (port 6543) |
SUPABASE_URL |
Your Supabase project URL |
SUPABASE_ANON_KEY |
Supabase anon/public key |
SUPABASE_SERVICE_ROLE_KEY |
Supabase service role key (secret) |
SESSION_SECRET |
Random 32-char string (openssl rand -base64 32) |
FRONTEND_URL |
Your Vercel production URL (e.g. https://payrequest-hub.vercel.app) |
DOCKER_MODE |
false |
VITE_API_URL |
(leave empty — same domain on Vercel) |
VITE_DOCKER_MODE |
false |
Built following GitHub Spec-Kit workflow:
spec/spec.md— Product spec with requirements, edge cases, and data modelspec/plan.md— Technical implementation planspec/tasks.md— Task breakdown
- Lovable — Frontend scaffolding (React + Vite + shadcn/ui component library)
- Claude Code — API design, Docker setup, CI/CD pipeline, E2E test suite, integration work
payrequest-hub/
├── frontend/ # React SPA (Vite, deployed as static)
│ └── src/
│ ├── pages/ # Route-level components
│ ├── components/# UI components
│ ├── lib/api.ts # All API calls (fetch with credentials)
│ └── context/ # Auth state
├── api/ # Hono API (Node.js + Vercel serverless)
│ ├── index.ts # Vercel entry point (single serverless function)
│ └── _src/ # Source (prefixed _ so Vercel ignores as functions)
│ ├── routes/ # auth, requests, public
│ ├── middleware/ # requireAuth, CORS
│ └── lib/ # db, decimal, formatters
├── supabase/
│ └── migrations/ # SQL migrations (001-004)
├── e2e/ # Playwright tests (12 test cases)
├── docker-compose.yml
└── vercel.json # Routes /api/* to Hono, /* to frontend
- Atomic SQL updates for pay/decline/cancel — prevents race conditions
display_statuscomputed server-side — EXPIRED is derived fromexpires_at < now(), never stored- HTTP-only cookie — session token never accessible via JavaScript (XSS-safe)
- decimal.js for all money — avoids floating point rounding errors (e.g.
0.1 + 0.2 ≠ 0.3) - Shareable token separate from UUID —
/request/:token/publicis safe to share, not guessable - Single Vercel function — all API routes in one function (
api/index.ts) to stay within Hobby plan limits