Skip to main content

Development Workflow

Commands

1

Run dev server

npm run dev
2

Lint

npm run lint
3

Build and serve

npm run build
npm run start

Supabase

  • Local migrations: npx supabase db push (or supabase db reset to rebuild).
  • Ensure buckets download and avatars exist when testing download/profile flows.

Stripe

  • Local webhooks: stripe listen --forward-to localhost:3000/api/webhooks/stripe.
  • Keep price IDs in .env.local consistent with plan configs and marketing pricing.

Conventions

  • Path alias: @/*.
  • TypeScript strict; prefer Zod schemas in lib/validations.
  • Use lib/access.ts for any new gated routes/features.
  • Keep plan definitions in sync across lib/payments/plans.ts, config/plans.config.ts, and marketing pricing displays.
  • Add metadata via createMetadata/createDynamicMetadata from lib/seo.
  • Use rateLimit presets for new APIs/actions that are user-triggered.

Testing ideas

  • Auth flows: sign-up/sign-in/reset paths and /auth/callback.
  • Checkout → webhook → Supabase rows for subscription and one-time plans.
  • Download endpoint with/without license, Standard vs Ultimate.
  • GitHub access endpoint with valid/invalid username and missing PAT.
  • OG routes (/api/og, /api/og/blog) render without errors.