ScaleRocket/Web

Ship in 5 Minutes

Get ScaleRocket running locally in under 5 minutes. Clone, configure, and launch your SaaS.

Ship in 5 Minutes

This guide gets you from zero to a running SaaS with authentication, payments, and a dashboard. Follow each step in order.

1. Clone the Repository

git clone https://github.com/your-username/scalerocket.git
cd scalerocket

2. Install Dependencies

ScaleRocket uses pnpm workspaces with Turborepo. Install everything from the root:

pnpm install

This installs dependencies for all apps (web, app, ops) and packages (ui, config, types, emails).

3. Set Up Your Backend

  1. Go to supabase.com/dashboard
  2. Click New project
  3. Choose an organization, name your project, and set a database password
  4. Wait for the project to finish provisioning (~30 seconds)
  5. Go to Settings > API and copy:
    • Project URL (e.g., https://abcdefg.supabase.co)
    • anon public key (starts with eyJ...)
    • service_role secret key (starts with eyJ... — keep this secret)

Note: Save the database password somewhere safe. You will need it if you want to connect directly to PostgreSQL.

  1. Go to convex.dev and create an account
  2. From the root of your project, run:
npx convex dev
  1. Follow the prompts to log in and create a new project
  2. Copy the Deployment URL from dashboard.convex.dev (looks like https://your-project-123.convex.cloud)

Note: npx convex dev will watch your convex/ directory and auto-deploy changes in real time during development.

4. Create a Stripe Account

  1. Go to stripe.com and create an account
  2. In the Stripe Dashboard, go to Product catalog > Add product
  3. Create your subscription product with two prices:
    • Monthly price (e.g., $19/month)
    • Yearly price (e.g., $190/year)
  4. Copy each Price ID (starts with price_)
  5. Go to Developers > API keys and copy:
    • Publishable key (starts with pk_test_)
    • Secret key (starts with sk_test_)

5. Create a Resend Account

  1. Go to resend.com and create an account
  2. Go to API Keys and create a new key
  3. Copy the API key (starts with re_)

6. Configure Environment Variables

Each app has its own .env.example file. Copy them:

# Marketing site
cp apps/web/.env.example apps/web/.env.local

# Dashboard
cp apps/app/.env.example apps/app/.env.local

# Admin panel
cp apps/ops/.env.example apps/ops/.env.local

Fill in the values in each .env.local:

# apps/app/.env.local
VITE_SUPABASE_URL=https://your-project.supabase.co
VITE_SUPABASE_ANON_KEY=eyJ...your-anon-key

# apps/web/.env.local
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...your-anon-key
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
RESEND_API_KEY=re_...
# apps/app/.env.local
VITE_CONVEX_URL=https://your-project-123.convex.cloud

# apps/web/.env.local
NEXT_PUBLIC_CONVEX_URL=https://your-project-123.convex.cloud
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
RESEND_API_KEY=re_...

Set server-side environment variables via the Convex CLI:

npx convex env set SITE_URL https://your-app.com
npx convex env set AUTH_GITHUB_ID your-github-client-id
npx convex env set AUTH_GITHUB_SECRET your-github-client-secret
npx convex env set AUTH_GOOGLE_ID your-google-client-id
npx convex env set AUTH_GOOGLE_SECRET your-google-client-secret

Note: The VITE_ prefix is required for Vite apps (app and ops). The NEXT_PUBLIC_ prefix is required for Next.js client-side variables.

7. Push the Database Schema

ScaleRocket includes migrations for users, subscriptions, credits, and more. Push them to your Supabase project:

npx supabase login
npx supabase link --project-ref your-project-ref
npx supabase db push

You can find your project ref in the Supabase dashboard URL: https://supabase.com/dashboard/project/<project-ref>.

Note: This creates all tables, Row Level Security policies, and database functions your app needs.

With Convex, the schema is defined in TypeScript and deployed automatically. Just run:

npx convex dev

This deploys your schema and functions to your Convex project. There are no migrations to manage — Convex handles schema changes for you.

Note: npx convex dev watches for changes and hot-reloads your backend automatically during development.

8. Deploy Edge Functions (Local)

To serve Supabase Edge Functions locally for development:

npx supabase functions serve

This starts the Edge Functions server alongside your apps.

With Convex, there is no separate step for deploying functions. All your functions (queries, mutations, actions, and HTTP actions) are automatically deployed when you run npx convex dev. They are already live and ready to use.

9. Start the Dev Server

From the project root, start all apps simultaneously:

pnpm dev

Turborepo runs all three apps in parallel. Open:

AppURLDescription
Marketing sitehttp://localhost:3000Landing page, pricing, blog
Dashboardhttp://localhost:5173User dashboard after login
Admin panelhttp://localhost:5174Internal admin tools

10. Test the Flow

  1. Visit localhost:3000 — you should see the landing page
  2. Click Sign up and create an account with email/password
  3. Check your email (or Supabase Auth logs) for the confirmation link
  4. After confirming, visit localhost:5173 — you should be in the dashboard
  5. Try upgrading to a paid plan — Stripe test mode accepts card number 4242 4242 4242 4242
  6. Visit localhost:5174 and log in with an admin-whitelisted email

Troubleshooting

pnpm install fails? Make sure you have pnpm 8+ installed: pnpm --version. Update with npm install -g pnpm@latest.

Supabase connection error? Double-check your SUPABASE_URL and SUPABASE_ANON_KEY. Make sure there are no trailing spaces.

Stripe webhook errors? For local development, use the Stripe CLI to forward webhooks:

stripe listen --forward-to localhost:3000/api/webhooks/stripe

Copy the webhook signing secret it outputs into your .env.local as STRIPE_WEBHOOK_SECRET.

Port already in use? Kill the process on that port: lsof -ti:3000 | xargs kill -9

Next Steps

Your SaaS is running locally. Now dive deeper:

Done reading? Mark this page as complete.

On this page