Skip to content

Architecture Overview

VeloxTS is designed to be flexible. You choose the architecture that fits your needs.

At the heart of VeloxTS is the procedure - a type-safe function that can be exposed as both tRPC and REST:

const getUser = procedure()
.input(z.object({ id: z.string() }))
.output(UserSchema)
.query(async ({ input, ctx }) => {
return ctx.db.user.findUniqueOrThrow({ where: { id: input.id } });
});

This single definition generates:

  • tRPC endpoint - Full type inference for TypeScript clients
  • REST endpoint - GET /api/users/:id for any HTTP client

External-facing API with automatic OpenAPI generation.

Client (any) → REST → VeloxTS → Database

Learn more

Maximum type safety for TypeScript clients.

TypeScript Client → tRPC → VeloxTS → Database

Learn more

Separate frontend, type-safe communication.

React SPA → tRPC Client → VeloxTS API → Database

Learn more

Unified codebase with React Server Components.

Browser → Vinxi → RSC → Server Actions → VeloxTS → Database

Learn more

Combine patterns - tRPC for internal, REST for external.

Mobile App → REST ↘
VeloxTS → Database
Web App → tRPC ↗

Learn more

LayerTechnology
HTTP ServerFastify
RPCtRPC
ValidationZod
ORMPrisma
Full-stackVinxi + React 19

Choose your architecture: