doc

Getting Started

An overview of Postbase — what it is, how the monorepo is structured, and how to run it locally.

Published: March 22, 2026Updated: March 22, 2026

Getting Started

Postbase is a self-hosted, open-source backend-as-a-service platform built on Next.js and PostgreSQL. It gives your projects authentication, a database query API, file storage, cron jobs, and message queues — all accessible via a type-safe JavaScript SDK (postbasejs) that mirrors the Supabase client API.

Tech Stack

Postbase is built with the following technologies:

  • Framework: Next.js (App Router)

  • Language: TypeScript v5

  • Database ORM: Drizzle ORM v0.38 + pg driver

  • Auth: NextAuth.js v5 (dashboard) + custom HS256 JWT (SDK)

  • UI: Tailwind CSS v4 + Radix UI primitives

  • Storage: MinIO (S3-compatible); also supports AWS S3 and Cloudflare R2

  • Email: nodemailer v7

  • SDK package: postbasejs (CJS + ESM, built with tsup)

Monorepo Layout

The repository is a Turbo + pnpm monorepo with two main packages:

  • apps/web — The main Next.js app containing the dashboard UI and all API routes.

  • packages/client — The postbasejs npm SDK for end users.

Quick Install

  1. Clone the repository and install dependencies with pnpm install.

  2. Copy .env.example to .env.local and fill in your DATABASE_URL and secrets.

  3. Run pnpm drizzle-kit push to create the _postbase schema.

  4. Start the dev server with pnpm dev.