Skip to content

Installation

Get a new Velox TS project running in under a minute. The create-velox-app scaffolder sets up your database, installs dependencies, and generates a working API you can start building on immediately.

  • Node.js v20 or higher
  • pnpm (recommended) or npm/yarn
  • A code editor with TypeScript support (VS Code recommended)

The fastest way to start is with create-velox-app:

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

If you’re using pnpm (recommended), you’ll need to approve native module compilation for packages like esbuild, bcrypt, and prisma:

Terminal window
pnpm approve-builds

Select the packages to approve when prompted. This is a one-time setup per project.

The scaffolder will prompt you to choose:

  • Template: default, auth, trpc, rsc, or rsc-auth
  • Package manager: pnpm, npm, or yarn
  • Database: SQLite (default) or PostgreSQL
TemplateUse Case
defaultREST API with basic CRUD
--authJWT authentication, guards, policies
--trpctRPC-only (no REST adapter)
--rscReact Server Components with Vinxi
--rsc-authRSC + JWT authentication
Terminal window
# Explicit template selection
npx create-velox-app my-app --auth
npx create-velox-app my-app --rsc

After creating your project:

Terminal window
pnpm db:push

The Prisma client is generated automatically via a postinstall hook — no need to run db:generate manually.

Terminal window
velox dev

Your API is now running at http://localhost:3030.

Test it:

Terminal window
curl http://localhost:3030/api/health
# {"status":"ok","timestamp":"..."}

If your project includes a frontend (apps/web/), add --all to start both backend and frontend:

Terminal window
velox dev --all

Your frontend is now running at http://localhost:8080.

If you want to add Velox TS to an existing project instead of using the scaffolder:

Terminal window
# Dependencies
pnpm add @veloxts/velox @prisma/client @prisma/adapter-better-sqlite3 \
@prisma/client-runtime-utils better-sqlite3 dotenv zod
# Dev dependencies
pnpm add -D @veloxts/cli prisma tsx tsup typescript @types/node hot-hook

With authentication:

Terminal window
pnpm add @veloxts/auth bcrypt
pnpm add -D @types/bcrypt
Terminal window
# Dependencies
pnpm add @veloxts/client @tanstack/react-query react react-dom
# Dev dependencies
pnpm add -D @vitejs/plugin-react vite typescript @types/react @types/react-dom

Replace the SQLite adapter:

Terminal window
pnpm remove @prisma/adapter-better-sqlite3 better-sqlite3
pnpm add @prisma/adapter-pg

For the smallest footprint, install individual packages instead of @veloxts/velox:

Terminal window
# Core only (no auth, no ORM helpers)
pnpm add @veloxts/core @veloxts/router @veloxts/validation