Skip to content
docs
DONTA

Your app.
With Postgres
and auth.

Start a Next.js project or bring the backend to an existing app. Drizzle, Better Auth, and Postgres, connected.

Choose your starting point
npx donta-cli@latest create my-app

Start with a database, working sign-in pages, and a protected dashboard.

Follow the quick start

Node.js 20.12+ · Next.js App Router · MIT licensed

~/projects
Demo: running npx donta-cli@latest create my-app configures Postgres, adds database and auth files, creates a private .env.local file, and installs dependencies. Existing apps get a change preview and integration guide.

A preview of the real CLI. Your app stays yours.

Postgres without the detour

Start locally with PGlite. Add a Neon connection string when you need a hosted database.

Auth you can build on

Email and password, sessions, and Drizzle tables. Wired up and ready for your app’s UI.

Your code, in your project

Read the files. Change the schema. Keep your stack. The setup gets out of your way.

Already building something?

Keep your app.
Add the backend.

donta detects your App Router layout, previews its changes, and adds the database and auth files alongside your code.

See exactly what gets added
npx donta-cli@latest add . --dry-run
  • Database, auth client, and session helpers
  • Migration files and a guide for your project
  • Your pages, layouts, and dev scripts stay in place

TypeScript · app/ or src/app/ · Existing auth and Drizzle setups require a manual merge. Connect your login UI after integration.

How it fits together

From your app to your database. Focus or hover a layer to see what’s connected.

◰

Your app

Next.js App Router

  • + Typed session helpers
  • + Protected routes
  • + Sign-in / sign-up pages
◈

Better Auth

email / password · sessions

  • + Mounted at /api/auth/*
  • + Drizzle adapter configured
  • + Secret generated for you
◇

Drizzle

schema · queries · migrations

  • + Auth tables in your schema
  • + One migrate command
  • + Local or hosted Postgres
◉

Postgres

PGlite locally · Neon hosted

  • + No account needed locally
  • + Set DATABASE_URL for Neon
  • + Same schema in both environments

The generated code

Plain Drizzle and Better Auth files in your project. Change them like any other code.

import { createDb } from "donta/db";
import * as schema from "./schema";

// Neon over HTTP when DATABASE_URL is set, local PGlite in .donta/pglite otherwise.
export const { db, driver } = createDb({ schema });

Your next project starts here.

Open the wizard. Choose your starting point. Get back to building.

npx donta-cli@latest
Read the documentation