Skip to content

Guide · Open source

How to use react-starter-kit: setup, run and deploy

Updated · written with AI from the project's own documentation and checked against our catalogue data

React Starter Kit is an MIT-licensed monorepo template for building SaaS-style web apps with React 19, tRPC, Drizzle ORM and Cloudflare Workers. This guide walks through creating your own project from the template, running it locally, initializing the database and the high-level steps for deploying to Cloudflare. It assumes you are already comfortable with React, TypeScript and Bun.

React Starter Kitkriasoft/react-starter-kit · ★ 23.7k · MIT

Quick start

  1. 1Create your repository. Generate a new repository from the React Starter Kit template on GitHub and clone it locally.
  2. 2Install dependencies. Run bun install inside the project folder.
  3. 3Create your local env file. Run cp .env .env.local and replace the placeholder values with your real credentials.
  4. 4Start development. Run bun dev to start the web, api and app servers, then open the local URLs listed in the README.
  5. 5Initialize the database. Set DATABASE_URL in .env.local, then run bun db:push and optionally bun db:seed.
  6. 6Deploy to Cloudflare. Provision infrastructure with Terraform, add the Hyperdrive IDs to apps/api/wrangler.jsonc, set the production secrets and run the migrations.

What you need before you start

The README lists these prerequisites. The kit is built around Bun, so Node.js and npm are not part of the setup.

  • Bun v1.4+ (the README says Bun replaces Node.js and npm)
  • VS Code with the project's recommended extensions (recommended, not required)
  • React Developer Tools browser extension (recommended)
  • A Cloudflare account, needed for deployment

Create your project and install dependencies

Generate a new repository from the template on GitHub, then clone it locally. Replace the placeholder URL with your own repository's URL.

Next, install dependencies from inside the project folder.

git clone https://github.com/your-username/your-project-name.git cd your-project-name bun install

Configure environment variables

The project follows Vite's env conventions. The committed .env file holds shared defaults and placeholders only, with no real secrets. Your real credentials go in .env.local, which is git-ignored. Values in .env.local override those in .env.

Copy the defaults into a local file and then replace the placeholder values with real ones. Also check apps/api/wrangler.jsonc for Worker configuration and bindings.

  • .env is committed and holds placeholders
  • Put real credentials in .env.local, which is git-ignored
  • Values in .env.local override .env
cp .env .env.local

Start the apps in development mode

Running bun dev starts all three apps (web, api and app). You can also start them one at a time. The README lists the local URLs for each app.

  • React app: http://localhost:5173
  • Marketing site: http://localhost:4321
  • API server: http://localhost:8787
# Launch all apps in development mode (web, api, and app) bun dev # Or, start specific apps individually bun web:dev # Marketing site bun app:dev # Main application bun api:dev # API server

Set up the database

Make sure DATABASE_URL is set in .env.local. The README uses Drizzle ORM with Neon PostgreSQL. For quick local setup, push the schema directly. Staging and production should apply migrations instead, so use push only for local prototyping.

  • bun db:push pushes the schema directly (local prototyping only)
  • bun db:seed loads sample data (optional)
  • bun db:studio opens a database GUI
  • Staging and production use bun db:migrate:staging and bun db:migrate:production
bun db:push # Push schema directly (quick dev setup) bun db:seed # Seed with sample data (optional) bun db:studio # Open database GUI

Deploy to Cloudflare Workers

Each app deploys independently to Cloudflare Workers. The README gives a short production outline; the full steps are in the deployment guide at reactstarter.com. First, Terraform provisions the Hyperdrive configurations the API worker uses. Paste the two IDs it prints into the hyperdrive block of apps/api/wrangler.jsonc.

Then set production secrets on the API worker. BETTER_AUTH_SECRET and RESEND_API_KEY are required. Google sign-in and Stripe billing are optional. Set RESEND_EMAIL_FROM to an address on a domain you have verified with Resend, because the default onboarding@resend.dev only delivers to your own inbox.

  • Provision infrastructure with bun infra:production apply
  • Add the printed IDs to the hyperdrive block in apps/api/wrangler.jsonc
  • Set required secrets: BETTER_AUTH_SECRET and RESEND_API_KEY
  • Optional Google secrets: GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
  • Optional Stripe secrets: STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_STARTER_PRICE_ID, STRIPE_PRO_PRICE_ID (set all four or none)
  • Migrate production with bun db:migrate:production, which reads .env.production.local
bun infra:production apply bun wrangler secret put BETTER_AUTH_SECRET --config apps/api/wrangler.jsonc --env="" bun wrangler secret put RESEND_API_KEY --config apps/api/wrangler.jsonc --env="" bun db:migrate:production # reads .env.production.local, and only that file

What people use it for

  • Starting a SaaS-style web app with a marketing site, a React app and an API in one repository
  • Building a typed frontend and backend where tRPC shares types between them
  • Using a working reference for tRPC, Drizzle ORM and Better Auth together
  • Adding email sign-in, passkeys, Google sign-in and Stripe subscriptions without wiring them from scratch

Frequently asked questions

Is react-starter-kit free to use?

The repository is licensed under MIT. Cloudflare deployment needs a Cloudflare account, and Stripe billing, Resend email and Neon PostgreSQL are third-party services you set up yourself. The README does not list their pricing.

What do I need to install react-starter-kit?

You need Bun v1.4 or newer, and a Cloudflare account if you plan to deploy. VS Code and the React Developer Tools extension are recommended. The README says Bun replaces Node.js and npm in this project.

Can I use react-starter-kit without Cloudflare?

The README describes deployment around Cloudflare Workers, with each app deploying to Workers and routing through service bindings. If your project does not use Cloudflare, this template is a poor fit.

Why does sign-in not work for other users after I deploy?

The README says the default onboarding@resend.dev sender only delivers to your own inbox, and sign-in uses email OTP. Set RESEND_EMAIL_FROM to an address on a domain you have verified with Resend.

Do I need Google or Stripe set up to run it?

No. The README says Google sign-in is optional and email OTP and passkeys work without it. Stripe billing is also optional, and you should set all four Stripe values or none.

How does react-starter-kit compare to create-t3-app or Next.js starters?

The source does not compare them directly. React Starter Kit is built around Cloudflare Workers, tRPC, Drizzle and Better Auth in a monorepo with several apps. Compare them against your own stack, hosting plans and comfort with Bun and Cloudflare.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use react-starter-kit if you are building a SaaS-style app, are comfortable with Bun, TypeScript and Cloudflare Workers, and want a working reference for tRPC, Drizzle and Better Auth. Beginners new to React or TypeScript, teams that need Node.js-based tooling, and projects not deploying to Cloudflare should pick a simpler starter.

Install options & downloads