Skip to content
Engineering code sample

Membership OpsEngineering Code Sample

A compact, production-minded membership billing flow designed to make one complete request easy to inspect, test, and discuss.

Demo account

Member access

Use this intentionally public, non-production account. Demo state may change while the sample is being reviewed.

Password
demo-member-password

Primary request

Renew membership

POST /api/v1/memberships/:membershipId/renew

1. UI2. Validation3. Auth4. Authz5. Pricing6. Fake gateway7. Prisma tx8. PostgreSQL9. Response

Stack

Small surface, real boundaries

TypeScript, NestJS, Next.js, PostgreSQL, Prisma, JWT, bcrypt, Docker, and Cloudflare.

What to review

  • • Follow the renewal request from the UI to the database transaction.
  • • Inspect validation, JWT authentication, ownership authorization, and generic failures.
  • • Compare pricing and deterministic payment success/decline behavior with the tests.
  • • Open Developer View in the live demo for source-linked lifecycle snippets.

Review materials

Source, decisions, and handbook