This site has a real contract
Every public endpoint behind /status, the guestbook, and the live BFF sandbox — documented as an actual OpenAPI spec, not a description of one. Retroactive documentation of code that already existed, worth saying plainly rather than implying otherwise.
Real OpenAPI 3.0.3 JSON, servable and importable — paste it into Postman, Insomnia, or a real Swagger UI elsewhere. Response examples below show realistic shapes; exact numbers will differ every time you call these endpoints live, same as the sandbox they describe.
Vitals
Real-user Core Web Vitals behind /status.
/api/vitalsp75 summary across recent samples
No rate limit, no auth — read-only aggregate, safe to call freely.
1{2 "summary": [3 {4 "metric": "LCP",5 "p75": 2380,6 "samples": 214,7 "rating": "good"8 },9 {10 "metric": "INP",11 "p75": 180,12 "samples": 190,13 "rating": "good"14 }15 ],16 "totalSamples": 214,17 "since": 172590000000018}/api/vitalsReport one Core Web Vitals sample
Called by every visitor's browser automatically (src/components/vitals-reporter.tsx). Rate-limited per IP so a script cannot dominate the sample /status computes p75 from.
1{2 "metric": "LCP",3 "value": 2143.5,4 "path": "/work/bff-layer"5}1{2 "error": "unknown metric"3}1{2 "error": "too many requests"3}Not triggerable from this page — this one has real side effects.
1curl -X POST \2 -H "Content-Type: application/json" \3 -d '{"metric":"LCP","value":2143.5,"path":"/work/bff-layer"}' \4 https://chandansm.in/api/vitalsGuestbook
The public guestbook at /guestbook.
/api/guestbookList guestbook entries, newest first
1{2 "entries": [3 {4 "id": "afd3fb5c-b69f-457d-979a-e558d4200976",5 "name": "A visitor",6 "message": "Hello!",7 "at": 17893086720468 }9 ]10}/api/guestbookPost a new entry
Rate-limited to 5 requests/minute per IP — a guestbook is a slow trickle from real people, not a stream.
1{2 "name": "Ada",3 "message": "Loved the BFF sandbox."4}1{2 "error": "message is required"3}1{2 "error": "too many requests"3}Not triggerable from this page — this one has real side effects.
1curl -X POST \2 -H "Content-Type: application/json" \3 -d '{"name":"Ada","message":"Loved the BFF sandbox."}' \4 https://chandansm.in/api/guestbook/api/guestbookDelete an entry (admin only)
No user accounts exist on this site — this is gated by a shared secret (GUESTBOOK_ADMIN_TOKEN), not a login. Fails closed: if the server has no token configured, every request is rejected, not silently allowed.
1{2 "id": "afd3fb5c-b69f-457d-979a-e558d4200976"3}1{2 "error": "unauthorized"3}1{2 "error": "not found"3}Not triggerable from this page — this one has real side effects.
1curl -X DELETE \2 -H "Authorization: Bearer <GUESTBOOK_ADMIN_TOKEN>" \3 -H "Content-Type: application/json" \4 -d '{"id":"afd3fb5c-b69f-457d-979a-e558d4200976"}' \5 https://chandansm.in/api/guestbookSandbox
The live BFF sandbox at /work/bff-layer.
/api/sandbox/{service}Call one simulated microservice directly
"Client orchestrates" mode for the live sandbox on /work/bff-layer: real artificial latency, called one at a time by the client. Shares a 60 requests/minute per-IP budget with /api/sandbox/screen.
- service(path, required)
- — one of customer, eligibility, offers, merchant, policy, limits
- fail(query)
- Set equal to the service name to simulate that dependency failing.
1{2 "service": "customer",3 "ok": true,4 "ms": 116,5 "data": {6 "customerId": "cus_demo_01",7 "displayName": "Jordan Ellis"8 },9 "simulated": true10}1{2 "error": "unknown service"3}1{2 "service": "offers",3 "ok": false,4 "ms": 121,5 "error": "offers unavailable (simulated)",6 "simulated": true7}/api/sandbox/screenCall all six simulated services through one aggregator
"BFF composes" mode: a real Promise.all fan-out server-side, each leg individually timed and wrapped so one failure never rejects the whole response — returned to the client as a single round trip. Shares its rate-limit budget with /api/sandbox/{service}.
- fail(query)
- Comma-separated service names to simulate as failing, e.g. offers,policy.
1{2 "ok": true,3 "simulated": true,4 "totalMs": 189.4,5 "serverTimings": {6 "customer": 119,7 "eligibility": 160,8 "offers": 121,9 "merchant": 111,10 "policy": 158,11 "limits": 6312 }13}Let's build something worth maintaining
Have a platform problem, a team that needs a hand, or just want to argue about API design? My inbox is open.