Templates
Velox TS provides 5 project templates to match different use cases.
Template Comparison
Section titled “Template Comparison”| Template | API Style | Frontend | Auth | Best For |
|---|---|---|---|---|
default | REST + tRPC | SPA Client | No | Simple APIs, microservices |
--auth | REST + tRPC | SPA Client | JWT | APIs with authentication |
--trpc | tRPC only | SPA Client | No | Internal TypeScript clients |
--rsc | REST + tRPC | RSC (React 19) | No | Full-stack apps |
--rsc-auth | REST + tRPC | RSC (React 19) | JWT | Full-stack with auth |
Default Template
Section titled “Default Template”npx create-velox-app my-appA minimal API setup with:
- Basic user CRUD procedures
- SQLite database
- REST + tRPC endpoints
@veloxts/clientfor type-safe frontend integration
Use when: Building a backend API, microservice, or BFF with a separate SPA frontend.
Auth Template
Section titled “Auth Template”npx create-velox-app my-app --authAdds to default:
- JWT authentication (access + refresh tokens)
authenticatedandhasRoleguards- Login/register/logout procedures
- Protected routes
@veloxts/clientfor type-safe frontend integration
Use when: Your API needs user authentication with a separate SPA frontend.
tRPC Template
Section titled “tRPC Template”npx create-velox-app my-app --trpctRPC-only mode:
- No REST adapter
@veloxts/clientfor type-safe SPA integration- Smaller bundle, faster startup
Use when: All clients are TypeScript SPAs and you want maximum type safety.
RSC Template
Section titled “RSC Template”npx create-velox-app my-app --rscFull-stack with React Server Components:
- Vinxi-based build system
- File-based routing
- Server actions
- SSR streaming
- React 19
Use when: Building a complete web application with a React frontend.
RSC + Auth Template
Section titled “RSC + Auth Template”npx create-velox-app my-app --rsc-authFull-stack with authentication:
- Everything from
--rsc - JWT authentication
- Protected pages and layouts
validated()server actions- Login/register pages
Use when: Full-stack app with user accounts.
Switching Templates
Section titled “Switching Templates”Templates are starting points. You can add capabilities later:
# Start minimal, add auth laternpx create-velox-app my-apppnpm add @veloxts/authRelated Content
Section titled “Related Content”- Architecture Guides - Understand the patterns
- Quick Start - Build something