Build Elevate
A production-ready monorepo starter that eliminates weeks of SaaS boilerplate - authentication, database, email, rate limiting, and deployment configs in a single cohesive foundation.
Overview
Every SaaS application begins with the same decisions - which auth library to use, how to structure the monorepo, where emails get sent from, how to connect the database. These are solved problems. build-elevate treats them that way.
It's a full-stack monorepo starter that bundles a production-ready authentication system, database layer, transactional email pipeline, UI component library, and API rate limiting into a single, deployable foundation. The goal is simple: skip setup week entirely and ship something real on day one.
build-elevate is available as a CLI package on npm. Run pnpm dlx build-elevate@latest init my-project to scaffold a new project interactively.
The Problem
Junior developers spend days reading docs before writing a line of product code. Senior developers write the same auth boilerplate for the fifth time. SaaS teams onboard new engineers with a wall of setup instructions that takes a week to execute.
The underlying architecture - monorepo, auth, ORM, email, rate limiting - is almost identical across products. The variance is in the product itself. build-elevate isolates that variance and handles everything else.
Architecture
The project is structured as a Turborepo monorepo with a clean separation between applications and shared packages.
Each package is independently versioned and consumed via workspace aliases (@workspace/auth, @workspace/db, etc.). This makes it straightforward to extract or replace individual layers without touching the rest of the system.
Technology Decisions
Each tool in the stack was chosen deliberately, not by default.
| Layer | Choice | Rationale |
|---|---|---|
| Build System | Turborepo | Incremental builds with remote caching; tasks only run when inputs change |
| Frontend | Next.js 16 (Turbopack) + TanStack Query | App Router for routing and layouts; TanStack Query for server state management, caching, and background refetching |
| Backend | Express | Unopinionated HTTP server; easy to extend without framework lock-in |
| Database | Prisma + PostgreSQL | Type-safe queries generated from schema; migrations are version-controlled |
| Auth | Better Auth | Session-based auth with OAuth support on the both web and API |
| UI | shadcn/ui + Tailwind CSS | Accessible, unstyled primitives that you own - not a dependency to update |
| React Email + Resend | Templates written as React components; Resend handles deliverability | |
| Rate Limiting | Upstash Redis | Serverless-compatible; no persistent connection management required |
| Testing | Vitest | Presets configured for both Node.js and React environments |
| Code Quality | ESLint + Prettier | Unified rules and deterministic formatting |
Getting Started
Install Prerequisites
You'll need Node.js 20+ and a package manager. pnpm is recommended for workspace support.
# Verify Node.js version
node --version # Should be v20+
# Install pnpm
npm install -g pnpm@latestScaffold the Project
The interactive CLI handles project naming, package manager selection, and optional extras like Docker and Prisma Studio.
pnpm dlx build-elevate@latest init my-projectConfigure Environment Variables
Populate each .env.local file before starting the dev server.
Start the Development Server
cd my-project
pnpm devAll services start concurrently:
| Service | URL |
|---|---|
| Web (Next.js) | http://localhost:3000 |
| API (Express) | http://localhost:4000 |
| Email Preview | http://localhost:3002 |
| Database UI | http://localhost:5555 |
Key Features
Authentication
The @workspace/auth package wraps Better Auth and exposes session management, OAuth flows, and middleware helpers. Authentication state is shared between the Next.js frontend and Express API through a common session layer - no token passing or cookie duplication required.
Database Layer
@workspace/db contains the Prisma schema, generated client, and migration history. Schema changes propagate to both the API and frontend through type inference - if a model field is renamed, TypeScript surfaces the breakage across the entire monorepo before anything ships.
# After modifying the schema
pnpm db:generate # Regenerate the Prisma client
pnpm db:migrate # Apply the migrationEmail Pipeline
Email templates live in @workspace/email as React components. The apps/email application provides a local preview server so you can see how a template renders before it's ever sent. Resend handles delivery in production.
// packages/email/src/templates/welcome.tsx
export function WelcomeEmail({ name }: { name: string }) {
return (
<Html>
<Body>
<Heading>Welcome, {name}.</Heading>
<Text>Your account is ready.</Text>
</Body>
</Html>
);
}Rate Limiting
The @workspace/rate-limit package wraps Upstash Redis with a simple middleware interface for Express routes. It's designed to work in serverless and edge environments without a persistent connection.
Development Workflow
Targeted Builds
Turborepo's --filter flag lets you run commands against specific apps or packages, which speeds up the inner development loop significantly.
pnpm dev --filter=web
pnpm dev --filter=apipnpm dev --filter=@workspace/auth
pnpm dev --filter=@workspace/uipnpm dev # All apps and packages
pnpm build # Full production build
pnpm test # All test suitesCode Quality
Linting, formatting, and type checking are all enforced through shared configuration packages - no per-app setup required.
pnpm check-types # TypeScript across the entire monorepo
pnpm lint # ESLint with @workspace/eslint-config
pnpm format # Prettier with @workspace/prettier-configDeployment
The modular structure makes each app independently deployable. There's no requirement to host everything on the same platform.
| Application | Recommended Platforms |
|---|---|
| Web (Next.js) | Vercel, Netlify, Railway |
| API (Express) | Railway, Heroku, AWS, DigitalOcean |
| Database | Neon, AWS RDS, Railway Postgres, Supabase |
Docker
A production docker-compose.prod.yml is included for teams that prefer container-based deployments. It covers the web frontend, Express API, and PostgreSQL with health checks and restart policies pre-configured.
docker-compose -f docker-compose.prod.yml up --buildThe root docker-compose.yml is for local development only. Use docker-compose.prod.yml for production environments.
Reflections
build-elevate emerged from a straightforward frustration: the gap between "I have an idea" and "I have a running server with auth" was consistently measured in days, not hours. The project doesn't introduce new abstractions - it connects established, well-maintained tools in a way that's immediately usable and easy to reason about.
The design principle throughout was replacability. No piece of the stack is load-bearing in a way that makes it painful to swap. Better Auth can be replaced with Clerk. Resend can be replaced with Postmark. The packages expose minimal surface area by design.
If you're starting a SaaS product and find yourself writing auth middleware from scratch, this exists so you don't have to.
Links
- npm - npmjs.com/package/build-elevate
- GitHub - github.com/vijaysingh2219/build-elevate
- Documentation - build-elevate.vercel.app