> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kwiksaasapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Development Workflow

> Commands, linting, conventions, and tips for contributing.

## Development Workflow

### Commands

<Steps>
  <Step title="Run dev server">
    ```bash theme={null}
    npm run dev
    ```
  </Step>

  <Step title="Lint">
    ```bash theme={null}
    npm run lint
    ```
  </Step>

  <Step title="Build and serve">
    ```bash theme={null}
    npm run build
    npm run start
    ```
  </Step>
</Steps>

### 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.
