Getting Started with RapidRoot
This guide shows you how to get the boilerplate running locally. Note that RapidRoot relies on several external services—Supabase, Stripe, Resend, Upstash, and PostHog—all of which must be configured in your .env before the app will start successfully.
1. Prerequisites
- Node.js (version 18.17 or later)
- A package manager (npm, yarn, or pnpm)
- Git
- A code editor (like VS Code)
2. Required Service Setup
To avoid runtime errors, you’ll need to follow each service’s setup guide and gather the development credentials:
- Supabase Setup
- Get your
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_ANON_KEY, andSUPABASE_SERVICE_ROLE_KEY.
- Get your
- Stripe Setup
- Generate test keys:
STRIPE_PUBLIC_KEY,STRIPE_SECRET_KEY, andSTRIPE_WEBHOOK_SECRET.
- Generate test keys:
- Resend Setup
- Obtain
RESEND_API_KEY(and optional domain/audience IDs).
- Obtain
- Upstash Setup
- Create a Redis instance and note
UPSTASH_REDIS_REST_URL&UPSTASH_REDIS_REST_TOKEN.
- Create a Redis instance and note
- PostHog Setup
- Use
NEXT_PUBLIC_POSTHOG_KEYandNEXT_PUBLIC_POSTHOG_HOST.
- Use
Tip: In each guide, you’ll find details on how to create test accounts, configure dev environments, and copy the required variables. Complete those steps first.
3. Installation
-
Clone the repository:
Terminal window git clone https://github.com/Fig-Tree-Labs/rapidroot.gitcd rapidroot -
Install dependencies:
Terminal window # Using npmnpm install# or yarnyarn install# or pnpmpnpm install
4. Environment Variables
-
Copy the example env (if provided) to
.env.local:Terminal window cp .env.example .env.local -
Add credentials for all the services you set up:
.env.local NEXT_PUBLIC_SUPABASE_URL=...NEXT_PUBLIC_SUPABASE_ANON_KEY=...SUPABASE_SERVICE_ROLE_KEY=...STRIPE_PUBLIC_KEY=...STRIPE_SECRET_KEY=...STRIPE_WEBHOOK_SECRET=...RESEND_API_KEY=...UPSTASH_REDIS_REST_URL=...UPSTASH_REDIS_REST_TOKEN=...NEXT_PUBLIC_POSTHOG_KEY=...NEXT_PUBLIC_POSTHOG_HOST=...# ...any other variables
Important: Without these variables, the app may fail to start or throw runtime errors.
5. Running Locally
Once all required services are configured:
-
Start the dev server:
Terminal window # Using npmnpm run dev# or yarnyarn dev# or pnpmpnpm dev -
Open http://localhost:3000 in your browser to see the app running.
Troubleshooting: If you get errors at startup, double-check your environment variables for typos or missing credentials.
6. Common Commands
-
Lint:
Terminal window npm run lint # or yarn lint / pnpm lint -
Build (for production):
Terminal window npm run build # or yarn build / pnpm build -
Start (run production server locally):
Terminal window npm run start # or yarn start / pnpm start
7. Project Structure
rapidroot/├── app/ # Next.js app router pages and routing│ ├── (auth)/ # Authentication-related pages (sign-in, sign-up)│ ├── (main)/ # Main authenticated app pages (dashboard, settings)│ ├── (marketing)/ # Public marketing pages (landing, pricing)│ └── blog/ # Blog content and templates├── actions/ # Server actions for form handling├── components/ # Reusable React components│ ├── ui/ # Base UI components (buttons, cards etc)│ └── [feature]/ # Feature-specific components├── data-access/ # Database queries and data access layer├── emails/ # Email templates and email-related logic├── hooks/ # Custom React hooks├── lib/ # Utility functions and shared logic│ ├── seo.tsx # SEO tag generation│ └── supabase/ # Supabase client configuration├── public/ # Static assets├── schemas/ # Data validation schemas├── services/ # Business logic and service layer└── types/ # TypeScript types and interfaces8. What’s Next?
- Authentication Setup: Dive deeper into Supabase Auth.
- Stripe Setup: Review subscription flows and payments in detail.
- Email Features: Learn more about sending dynamic emails.
- Analytics Integration: Track user behavior and product metrics.
Need Help?
That’s it! After you configure all the required services, you’re ready to develop and test the boilerplate locally. Happy coding!