Day 2 — Wiring Billing Into the Story (and Bringing the UI Back)
Today started deep in the backend… and ended with the UI finally catching up. The Problem GraceSoft Story started as a way to turn commits into timelines. But timelines alone aren’t a product. To m...

Source: DEV Community
Today started deep in the backend… and ended with the UI finally catching up. The Problem GraceSoft Story started as a way to turn commits into timelines. But timelines alone aren’t a product. To make this real, I needed: billing plans feature access control Without turning the codebase into a mess of if (plan === 'pro'). Step 1 — Plans Shouldn’t Live in Code First thing I removed: refactor(plans): remove implicit plan seeding Plans don’t belong in migrations or seeders. They belong in Stripe. So instead of defining plans internally, I made Stripe the source of truth. Step 2 — Sync Stripe → App feat(stripe): store product details when syncing catalog Now products and pricing live locally after sync. This unlocks: fast queries feature mapping no runtime dependency on Stripe API Step 3 — Subscription Modeling feat(billing): integrate account-plan-subscription schemas I avoided the typical shortcut (user.plan). Instead: accounts plans subscriptions This keeps things flexible for: teams sh