A Next.js starter built for self-hosting.
A production-ready Next.js template with TypeScript, App Router, Drizzle ORM + PostgreSQL, pgBoss job queues, and the DaisyUI design system. Everything you need to ship a modern, self-hostable web application — the reference stack for new Stack256 projects.
What makes it different
Most Next.js starters leave the hard parts to you. This one ships with them already solved — so you can start building features on day one.
-
Everything but the app code
Database, migrations, job queues, auth hooks, and styling are all wired up. What remains is uniquely yours.
-
Type-safe end to end
TypeScript everywhere — schema, queries, API routes, and UI. No runtime surprises from data shape mismatches.
-
Self-hostable by design
PostgreSQL, background workers, and a build you deploy anywhere Docker or Node.js runs. No vendor lock-in, no accounts required.
Using it
One template, two processes: the app and the worker. Both need a PostgreSQL database, which you point to with an environment variable.
-
Clone and install
The whole stack is in one repository, ready to run.
git clone https://github.com/Stack256org/nextjs-starter.git cd nextjs-starter npm install -
Point at PostgreSQL
Copy the example environment file and set your
DATABASE_URL. One setting runs both the database and the job queue.cp .env.example .env.local -
Migrate and run
The app, a worker (background jobs), and a one-off migrate step each run as their own command.
npm run db:migrate npm run dev npm run worker
What it needs
| Host | Anything that runs Node.js — bare metal, a VPS, Docker, Coolify, Kubernetes |
|---|---|
| Database | PostgreSQL 14+ — local, Docker, or a cloud provider (Neon, Supabase, AWS RDS) |
| Architectures | x86_64 and arm64 |
| Processes | The app, a worker (email and background jobs), and a one-off migrate step |
| Health check |
GET / returns 200 when the app is serving
traffic; add a health endpoint as you build
|
| Licence | MIT |
Have a look at the code
This is the sixth of 256. It's a starter, not a product on its own — it's the reference implementation for every Stack256 app that follows. The README covers full setup, environment variables, and the database/worker commands in detail.