Welcome to Refract 👋
Hey — glad you’re here. You just saved yourself months of boilerplate work and a lot of hard-learned lessons about what breaks when your business changes fast. This is the documentation for Refract — a TypeScript SaaS boilerplate built from years of production billing experience at big-tech companies. Every abstraction, every boundary, every test exists because I’ve seen what happens without it. The goal of these docs is simple: get you from zero to productive as fast as possible, without leaving you guessing.You’re 6 steps away from a running SaaS foundation
| Step | What you’ll do | Time |
|---|---|---|
| 1. Prerequisites | Install Docker, gather credentials | 5 min |
| 2. Installation | Clone the repo, set up your config | 5 min |
| 3. Configuration | Fill in your development.ts | 5 min |
| 4. First run | make fresh-start, verify everything works | 2 min |
| 5. Explore | Tour the admin, understand what’s running | 5 min |
| 6. AI development | Set up Cursor, start building with AI | 5 min |
Going deeper
Once you’re up and running, here are the areas worth exploring next: Architecture — Understanding how the pieces fit together will save you a lot of time when you start building. The Monorepo page explains the workspace layout, GraphQL walks through the full resolver → codegen → frontend hook workflow, and Migrations covers how to evolve the database schema safely. Tooling — Refract’s external services (queue, logger, cache, mailer, metrics) are all pluggable. The Tooling System explains how swapping an implementation is just a config change. Quality — The Testing page covers how Jest and Vitest are set up, coverage thresholds, and the mocking patterns you’ll use daily. Continuous Integration explains what runs on every PR and how coverage diffing works.A few things worth knowing upfront
The entire stack runs in Docker. You don’t need Node.js, pnpm, or any runtime installed on your machine. If Docker is running, you’re ready. One command gets you started.make fresh-start builds containers, runs migrations, seeds data, and starts everything. That’s it.
The code is yours. You own it outright. These docs, the patterns, the architecture — all yours to extend, modify, and ship with.