Skip to content

Templates

Velox TS provides 5 project templates to match different use cases.

TemplateAPI StyleFrontendAuthBest For
defaultREST + tRPCSPA ClientNoSimple APIs, microservices
--authREST + tRPCSPA ClientJWTAPIs with authentication
--trpctRPC onlySPA ClientNoInternal TypeScript clients
--rscREST + tRPCRSC (React 19)NoFull-stack apps
--rsc-authREST + tRPCRSC (React 19)JWTFull-stack with auth
Terminal window
npx create-velox-app my-app

A minimal API setup with:

  • Basic user CRUD procedures
  • SQLite database
  • REST + tRPC endpoints
  • @veloxts/client for type-safe frontend integration

Use when: Building a backend API, microservice, or BFF with a separate SPA frontend.

Terminal window
npx create-velox-app my-app --auth

Adds to default:

  • JWT authentication (access + refresh tokens)
  • authenticated and hasRole guards
  • Login/register/logout procedures
  • Protected routes
  • @veloxts/client for type-safe frontend integration

Use when: Your API needs user authentication with a separate SPA frontend.

Terminal window
npx create-velox-app my-app --trpc

tRPC-only mode:

  • No REST adapter
  • @veloxts/client for type-safe SPA integration
  • Smaller bundle, faster startup

Use when: All clients are TypeScript SPAs and you want maximum type safety.

Terminal window
npx create-velox-app my-app --rsc

Full-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.

Terminal window
npx create-velox-app my-app --rsc-auth

Full-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.

Templates are starting points. You can add capabilities later:

Terminal window
# Start minimal, add auth later
npx create-velox-app my-app
pnpm add @veloxts/auth