SaaS Platform
Coode
2025About
I wanted to see how real SaaS products work under the hood — payments, webhooks, caching, permissions. So I built a full course marketplace and shipped it to production.
- idempotent payment handling — Implemented Stripe webhooks with signature verification and single DB transactions, so purchases and course access are granted atomically — the pattern real companies use to prevent duplicate charges.
- auth-with-local-sync architecture — Clerk handles authentication while webhooks keep a local users table in sync, decoupling business-level roles and permissions from the auth provider.
- Modern Next.js 15 caching — Tag-based cache invalidation with the use cache directive, so updating one course busts only that course's cache instead of the whole page.
- Role-based access control — Three-tier course visibility (public, private, preview), junction-table lesson gating, and a fully protected admin namespace with sales analytics.
- PPP pricing — Detects the user's country from request headers and applies purchasing-power-parity discounts automatically — pricing that adapts to global customers.
- Admin content tooling — Drag-and-drop section and lesson reordering (DnD Kit), progress tracking per lesson, and a feature-driven codebase where each domain owns its own schemas, actions, and permissions.