logo

qbjs

Getting Started

Installation

Install qbjs and configure peer dependencies for your project

Install the Package

Install @qbjs/core using your preferred package manager:

npm install @qbjs/core zod
pnpm add @qbjs/core zod
yarn add @qbjs/core zod

Peer Dependencies

qbjs is designed to work with Hono and Drizzle ORM. You'll need to install these peer dependencies based on your use case:

Required for Drizzle Compilers

If you're using the Drizzle ORM compilers (PostgreSQL, MySQL, or SQLite), install Drizzle ORM:

npm install drizzle-orm
pnpm add drizzle-orm
yarn add drizzle-orm

Required for Hono Integration

If you're using qbjs with Hono and want OpenAPI schema support:
See full example hono with drizzle-orm here

npm install hono @hono/zod-openapi
pnpm add hono @hono/zod-openapi
yarn add hono @hono/zod-openapi

Full Installation

For a complete setup with Hono, Drizzle, and PostgreSQL:

npm install @qbjs/core drizzle-orm zod
pnpm add @qbjs/core drizzle-orm zod
yarn add @qbjs/core drizzle-orm zod

Version Requirements

qbjs requires Node.js 20 or later.

DependencyMinimum Version
Node.js20.x
drizzle-orm>=0.45.1
zod>=4.2.1

TypeScript Configuration

qbjs is written in TypeScript and provides full type definitions. No additional @types packages are needed.

For the best experience, ensure your tsconfig.json includes:

{
  "compilerOptions": {
    "strict": true,
    "moduleResolution": "bundler",
    "esModuleInterop": true
  }
}

Next Steps

Now that you have qbjs installed, head to the Quick Start guide to build your first query.

On this page