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 scalerocket2. Install Dependencies
ScaleRocket uses pnpm workspaces with Turborepo. Install everything from the root:
pnpm installThis installs dependencies for all apps (web, app, ops) and packages (ui, config, types, emails).
3. Set Up Your Backend
- Go to supabase.com/dashboard
- Click New project
- Choose an organization, name your project, and set a database password
- Wait for the project to finish provisioning (~30 seconds)
- 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)
- Project URL (e.g.,
Note: Save the database password somewhere safe. You will need it if you want to connect directly to PostgreSQL.
- Go to convex.dev and create an account
- From the root of your project, run:
npx convex dev- Follow the prompts to log in and create a new project
- Copy the Deployment URL from dashboard.convex.dev (looks like
https://your-project-123.convex.cloud)
Note:
npx convex devwill watch yourconvex/directory and auto-deploy changes in real time during development.
4. Create a Stripe Account
- Go to stripe.com and create an account
- In the Stripe Dashboard, go to Product catalog > Add product
- Create your subscription product with two prices:
- Monthly price (e.g., $19/month)
- Yearly price (e.g., $190/year)
- Copy each Price ID (starts with
price_) - Go to Developers > API keys and copy:
- Publishable key (starts with
pk_test_) - Secret key (starts with
sk_test_)
- Publishable key (starts with
5. Create a Resend Account
- Go to resend.com and create an account
- Go to API Keys and create a new key
- 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.localFill 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-secretNote: The
VITE_prefix is required for Vite apps (appandops). TheNEXT_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 pushYou 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 devThis deploys your schema and functions to your Convex project. There are no migrations to manage — Convex handles schema changes for you.
Note:
npx convex devwatches 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 serveThis 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 devTurborepo runs all three apps in parallel. Open:
| App | URL | Description |
|---|---|---|
| Marketing site | http://localhost:3000 | Landing page, pricing, blog |
| Dashboard | http://localhost:5173 | User dashboard after login |
| Admin panel | http://localhost:5174 | Internal admin tools |
10. Test the Flow
- Visit localhost:3000 — you should see the landing page
- Click Sign up and create an account with email/password
- Check your email (or Supabase Auth logs) for the confirmation link
- After confirming, visit localhost:5173 — you should be in the dashboard
- Try upgrading to a paid plan — Stripe test mode accepts card number
4242 4242 4242 4242 - 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/stripeCopy 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:
- Set up Supabase — auth providers, storage, RLS policies
- Configure Stripe — production payments, webhooks
- Customize emails — branded transactional emails
- Deploy to production — Vercel + Supabase + Stripe
Done reading? Mark this page as complete.