Configuration
Site config, pricing plans, environment variables, and customization checklist.
Overview
ScaleRocket centralizes configuration in packages/config/ and environment variables. This page covers every configurable option.
site.ts
Located at packages/config/src/site.ts. This is your single source of truth for site-wide settings.
export const siteConfig = {
name: "ScaleRocket", // App name everywhere
description: "Ship your SaaS in days", // Default meta description
urls: {
web: "https://scalerocket.dev", // Marketing site URL
app: "https://app.scalerocket.dev", // Dashboard URL
ops: "https://admin.scalerocket.dev", // Admin panel URL
},
keywords: ["saas", "boilerplate", "nextjs"], // SEO keywords
author: "Your Name", // Author name for meta tags
twitter: "@scalerocket", // Twitter handle
github: "https://github.com/scalerocket", // GitHub URL
supportEmail: "support@scalerocket.dev", // Support contact email
company: {
name: "ScaleRocket Inc.", // Legal entity name
address: "123 Main St, City, Country", // Company address
siret: "123 456 789 00001", // SIRET number (if applicable)
},
};All fields are imported across apps:
import { siteConfig } from "@saas/config";
<title>{siteConfig.name}</title>
<a href={siteConfig.github}>GitHub</a>pricing.ts
Located at packages/config/src/pricing.ts. Defines your subscription plans.
export const plans = [
{
id: "free",
name: "Free",
description: "Get started for free",
price: { monthly: 0, yearly: 0 },
stripePriceId: { monthly: null, yearly: null },
features: [
"10 credits/month",
"Basic features",
"Community support",
],
limits: {
credits: 10,
},
popular: false,
},
{
id: "starter",
name: "Starter",
description: "For individuals and small projects",
price: { monthly: 9, yearly: 90 },
stripePriceId: {
monthly: "price_starter_monthly_xxx", // Replace with your Stripe Price ID
yearly: "price_starter_yearly_xxx",
},
features: [
"100 credits/month",
"All features",
"Email support",
],
limits: {
credits: 100,
},
popular: false,
},
{
id: "pro",
name: "Pro",
description: "For growing businesses",
price: { monthly: 29, yearly: 290 },
stripePriceId: {
monthly: "price_pro_monthly_xxx",
yearly: "price_pro_yearly_xxx",
},
features: [
"1,000 credits/month",
"All features",
"Priority support",
"API access",
],
limits: {
credits: 1000,
},
popular: true, // Visually highlighted on pricing page
},
];Setting up Stripe Price IDs
- Go to Stripe Dashboard > Products.
- Create a product for each plan.
- Add monthly and yearly prices.
- Copy the Price IDs (e.g.,
price_1Abc...) intopricing.ts.
Environment Variables
apps/web (Next.js Marketing)
# .env.local
NEXT_PUBLIC_APP_URL=https://app.scalerocket.devapps/app (Vite Dashboard)
# .env.local
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...
VITE_WEB_URL=https://scalerocket.devapps/ops (Vite Admin)
# .env.local
VITE_SUPABASE_URL=https://xxx.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...
VITE_SUPABASE_SERVICE_ROLE_KEY=eyJ... # Only in admin app!Supabase Edge Functions
# supabase/.env (local) or supabase secrets (production)
STRIPE_SECRET_KEY=sk_test_xxx
STRIPE_WEBHOOK_SECRET=whsec_xxx
RESEND_API_KEY=re_xxx
SITE_URL=https://scalerocket.dev
APP_URL=https://app.scalerocket.devPublic vs Secret
| Variable | Public | Where Used |
|---|---|---|
SUPABASE_URL | Yes | All apps |
SUPABASE_ANON_KEY | Yes | All apps |
SUPABASE_SERVICE_ROLE_KEY | No | Admin app, Edge Functions only |
STRIPE_SECRET_KEY | No | Edge Functions only |
STRIPE_WEBHOOK_SECRET | No | Edge Functions only |
RESEND_API_KEY | No | Edge Functions only |
Customization Checklist
Before launching, update these:
-
packages/config/src/site.ts-- Name, URLs, description, social links -
packages/config/src/pricing.ts-- Plans, prices, Stripe Price IDs, features -
packages/ui/src/globals.css-- Brand colors, border radius -
apps/web/public/-- Favicon, OG image, logo -
.env.localfiles -- All environment variables per app - Supabase secrets -- Stripe, Resend API keys
- Supabase Auth -- Enable/disable OAuth providers, customize email templates
- Stripe products -- Create products and prices, configure webhook endpoint
- Resend -- Verify sending domain, update from address in
packages/emails/src/send.ts - Admin whitelist -- Update
ADMIN_EMAILSinapps/ops/src/lib/auth.ts - Legal pages -- Update privacy policy and terms of service
Done reading? Mark this page as complete.