Welcome to Raypx
A modern, full-stack SaaS starter built with TanStack Start, oRPC, and Drizzle ORM.
Raypx is a production-ready SaaS starter template that gives you everything you need to ship a real product — not another todo app.
TanStack Start
Server-side rendering with file-based routing on Vite 8
Type-Safe API
End-to-end type safety with oRPC and Zod validation
Authentication
Email/password + Google & GitHub OAuth out of the box
Internationalization
English and Chinese with locale-prefixed routing
Docker Ready
Multi-stage Dockerfile for production deployment
Monorepo
11 internal packages managed by Turborepo
What's Inside
| Layer | Technology |
|---|---|
| Framework | TanStack Start + Nitro + Vite 8 |
| Database | PostgreSQL + Drizzle ORM |
| Authentication | Better Auth (email + OAuth) |
| API | oRPC + Zod |
| UI | React 19 + Tailwind CSS 4 + shadcn/ui |
| Docs | Fumadocs |
| i18n | use-intl (en-US, zh-CN) |
| Resend + React Email | |
| Tooling | Biome + Lefthook + Turborepo |
Why Raypx
Most SaaS starters bolt together frameworks without thinking about the boundaries between them. Raypx is designed around a few core principles:
-
End-to-end type safety. From your database schema through your API layer to your React components, types flow without code generation or manual synchronization. oRPC infers input and output types from your Zod validators, and TanStack Query hooks derive their signatures automatically.
-
Server-side rendering by default. TanStack Start renders every route on the server with Nitro under the hood. You get fast first paint, SEO-friendly HTML, and the ability to drop into client-side interactivity when needed — all on Vite 8.
-
Monorepo with enforced boundaries. Eleven internal packages are organized by concern:
@raypx/envfor configuration,@raypx/databasefor Drizzle schemas,@raypx/authfor Better Auth, and so on. Turborepo caches build artifacts and runs tasks in parallel, so even a large codebase stays fast. -
Security from the start. The request middleware chain applies Content-Security-Policy, HSTS, X-Frame-Options, and rate limiting on every request. OAuth providers are pre-configured with PKCE support.
Get Started
git clone https://github.com/raypx/raypx-tanstack.git
cd raypx-tanstack
cp .env.example .env # fill in required values
pnpm install
pnpm run db:push # push schema to PostgreSQL
pnpm dev # starts on http://localhost:3001Read the Quick Start guide for detailed setup instructions.
Next Steps
Once the dev server is running, explore these topics to understand how Raypx works:
- Project Structure — learn how the repository is organized.
- Architecture Overview — understand the request lifecycle and design decisions.
- Internal Packages — dive into each of the 11 monorepo packages.
- Request Lifecycle — trace a request through middleware, routing, and handlers.
- Authentication — configure email/password and OAuth sign-in flows.