Plans Config

Configure pricing tiers and Stripe integration.

Overview

The config/plans.config.ts file defines your pricing tiers for project submissions. Each plan specifies included features and Stripe price IDs.

Structure

config/plans.config.ts
export const plansConfig = {
  plans: [
    {
      id: "free",
      name: "Free",
      price: 0,
      features: ["Basic listing", "1 screenshot"],
    },
    {
      id: "premium",
      name: "Premium",
      price: 19,
      stripePriceId: "price_...",
      features: ["Featured listing", "5 screenshots", "Priority review"],
    },
  ],
}

Helper functions

The config exports helper functions:

  • getPlan(id) — Get a specific plan by ID
  • getFreePlan() — Get the free tier
  • getPaidPlans() — Get all paid plans

Stripe setup

  1. Create products and prices in the Stripe Dashboard
  2. Copy the price IDs into plans.config.ts
  3. Set STRIPE_SECRET_KEY and STRIPE_WEBHOOK_SECRET in your environment

See Payments for the full Stripe integration guide.