This PR resolves four issues across docs, DevOps, and CI:
-
Fix #211 β README Overhaul: Rewrote README with a Table of Contents, Mermaid architecture diagram, Quick Start, Environment Setup, Running Tests, Deployment (Vercel + self-hosted), and Contributing sections. A developer can now clone and run the project by following the README alone.
-
Fix #206 β Bundle Size Budget Check: Added
size-limitand@size-limit/fileas dev dependencies..size-limit.jsonenforces a 150 kB budget for the landing page and 200 kB for the escrow page (gzipped).ci.ymlgains abundle-sizejob that builds the app and fails if either budget is exceeded. -
Fix #208 β Environment Variable Documentation: Expanded
.env.exampleto document every variable with inline comments grouped by Auth, Stellar, Database, Redis, Feature Flags, and Monitoring. Addedscripts/check-env.tswhich prints a grouped validation table and exits non-zero when required variables are missing. -
Fix #210 β Health Check Endpoint: Created
app/api/health/route.tsreturning{ status, version, uptime, timestamp, checks }. Makes a live request to Horizon with a 5-second timeout; returns HTTP 200 when healthy and HTTP 503 when Horizon is unreachable.
| File | Change |
|---|---|
README.md |
Rewritten with full onboarding content + Mermaid diagram |
.env.example |
Expanded with every variable, inline docs, grouped by concern |
scripts/check-env.ts |
New β validates required env vars with grouped output |
app/api/health/route.ts |
New β GET /api/health with Horizon reachability check |
.size-limit.json |
New β 150 kB / 200 kB JS budgets for landing and escrow pages |
package.json |
Added size-limit, @size-limit/file deps and size script |
.github/workflows/ci.yml |
Added bundle-size job after frontend build |
.gitignore |
Unblocked scripts/check-env.ts from ignore rule |
-
GET /api/healthreturns{ "status": "ok" }with HTTP 200 on a healthy instance -
GET /api/healthreturns HTTP 503 whenNEXT_PUBLIC_HORIZON_URLis set to an unreachable host -
npx tsx scripts/check-env.tsexits 0 with all required vars set, exits 1 with missing vars -
npm run sizepasses against the current build output - README renders correctly on GitHub with the Mermaid diagram visible
- CI
bundle-sizejob passes in GitHub Actions
π€ Generated with Claude Code