Introduction
Quickben is a framework for business apps on Next.js. You declare collections in one config file: typed data with fields, access rules and hooks. Quickben gives you:
| You get | Package | Status |
|---|---|---|
| Typed server API (local API) | @quickben/core | Available |
| Access rules and hooks | @quickben/core | Available |
| In-memory database adapter | @quickben/db-memory | Available |
| Postgres, PGlite, SQLite | @quickben/db-drizzle | Available |
| REST route handlers | @quickben/next | Available |
| Admin UI generated from config | @quickben/admin | Available |
| Multi-tenancy | @quickben/plugin-tenancy | Planned |
Quickben is alpha. APIs change without notice until 1.0. The code is on GitHub under Apache-2.0.
What a collection looks like
import { defineCollection, fields as f } from "@quickben/core";
export const posts = defineCollection({
slug: "posts",
fields: {
title: f.text({ required: true, maxLength: 200 }),
status: f.select({ options: ["draft", "published"], required: true, default: "draft" }),
author: f.relation({ to: "users" }),
},
access: {
read: () => true,
update: ({ user }) => (user ? { author: { eq: user.id } } : false),
},
});Document, input and filter types come from the field definitions. There is no code generation step.
Design rules
| Rule | Meaning |
|---|---|
| One config | defineConfig({ db, collections, plugins, auth, admin }) in quickben.config.ts. |
| Storage-agnostic core | @quickben/core never imports a database library. Adapters do. |
| Plain objects | Collections, fields, access rules, hooks and plugins are objects and functions. |
| Secure by default | Without an access rule, only signed-in users get access. |
| No global state | One cached instance per config object. |
Requirements
Node.js 22.18 or later. ESM only. TypeScript 5.8 or later is recommended for inference.
Next steps
- Quick start: a Next.js app with REST routes and the admin UI.
- Playground: the example app in the repository.
- Concepts: every part of the config.
Last updated on