Quick Start

Get Raypx running locally and learn the fundamentals of the workspace.

Overview

What is Raypx?

Raypx is a Turborepo-powered monorepo that hosts a TanStack Start application, React Email templates, documentation site, and 14 shared packages aligned around modern full-stack development. It provides a fully type-safe React 19 stack with Better Auth authentication, Drizzle ORM database layer, tRPC APIs, 60+ shadcn/ui components, and comprehensive infrastructure helpers so teams can ship production-ready features quickly.

Tech Stack Highlights

  • Framework: TanStack Start 1.135.2 + React 19 + TypeScript 5.9
  • Database: PostgreSQL + Drizzle ORM
  • Auth: Better Auth with OAuth, Magic Link, Email OTP
  • API: tRPC for type-safe APIs
  • UI: Tailwind CSS v4 + 60+ shadcn/ui components
  • Email: React Email with 8 pre-built templates
  • Tooling: Biome (linter/formatter), Vitest, Turborepo

Requirements

Before you start, make sure the following tools are installed:

  • Node.js 20+ (LTS recommended)
  • pnpm 10.17+ (required - this project uses pnpm workspaces)
  • PostgreSQL database (local or cloud like Neon)
  • Git for version control

Tip: run node --version and pnpm --version to verify your versions.

First-Time Setup

1. Clone and install dependencies
git clone https://github.com/raypx/raypx.git
cd raypx
pnpm install
2. Configure environment variables
cp .env.example .env
# Edit .env with your configuration:
# - DATABASE_URL (PostgreSQL connection string)
# - BETTER_AUTH_SECRET (min 32 characters)
# - BETTER_AUTH_URL (http://localhost:3000 for dev)
3. Run database migrations
pnpm --filter @raypx/db run db:migrate
4. Start the development server
pnpm dev
# Web app: http://localhost:3000
# Docs: http://localhost:3001

The web app runs at http://localhost:3000 with hot-module reloading and TanStack's file-based routing enabled.

Everyday Commands

TaskCommandNotes
Developmentpnpm devStarts all apps (web + docs) with hot reload
Web app onlypnpm --filter web devJust the main TanStack Start app
Docs onlypnpm --filter docs devJust the Fumadocs site
Email previewpnpm --filter email devPreview email templates
Format & lintpnpm format / pnpm checkBiome for formatting and linting
Type checkpnpm typecheckTypeScript across entire workspace
Testspnpm testVitest unit tests
Coveragepnpm coverageHTML coverage reports
Buildpnpm buildFull Turborepo production build
Cleanpnpm cleanRemove build artifacts and caches
Databasepnpm --filter @raypx/db run db:studioDrizzle Studio (database GUI)
Add UI componentpnpm shadcnAdd shadcn/ui components
  1. Start development with pnpm dev (or pnpm --filter web dev for web only)
  2. Make changes in the relevant app or package
  3. Run pnpm typecheck and pnpm check to validate changes
  4. Run pnpm test if you've added or modified business logic
  5. Build to verify everything compiles: pnpm build
  6. Commit with conventional commits (e.g., feat(auth): add OAuth providers)

Learn More