Now in v2 · ESM · Node 22.12+
Master — Node.js Web Framework

The most powerful full-stack
framework in the universe.

One command scaffolds a Next.js frontend, a MasterController API, and a MasterRecord ORM — wired together and ready to run. Rails-grade productivity, the Node.js you already know.

Three masters, one framework

The power of a full stack, unified

Master orchestrates three battle-tested pieces that also stand on their own. Use the whole stack, or wield each one independently.

From nothing to running

One command. A whole app.

No glue code, no boilerplate marathon. Scaffold, migrate, and launch a real full-stack application in under a minute.

terminal
$ master new my-app
$ cd my-app
$ master db migrate
$ master dev

That boots your API on :3001 and the Next.js app on :3000 — together, with hot reload.

Read the guide
server.js
// backend/server.js — boots the whole API
import master from 'mastercontroller';
import AppContext from './app/models/AppContext.js';

master.root = import.meta.dirname;
master.userSecretsId = 'my-app-backend';
const server = master.setupServer('http');   // appsettings → secrets → env vars

master.addScoped('db', AppContext);            // this.db per request
master.useHealthChecks({ path: '/health/report' }); // + /health/live, /health/ready
master.useOpenApi({ ui: '/docs' });            // /openapi.json + Swagger UI

await master.startMVC('app');                  // routes + controllers
await master.start(server);
server.listen(3001);
Post.js
// backend/app/models/Post.js — a MasterRecord entity
export default class Post {
  id(db)    { db.integer().primary().auto(); }
  title(db) { db.string().notNullable(); }
  body(db)  { db.text(); }
  views(db) { db.bigint(); }
  created_at(db) { db.datetime(); }
}
The full stack united
One stack, working as one

Next.js on top. Power underneath.

Master pairs a real Next.js front end with a true backend and ORM — connected by one clean, typed boundary.

01
Next.js frontend
Server & Client Components render your UI and fetch from the API.
02
MasterController API
Routes, validated controllers, auth, scoped DI, health & OpenAPI — returns clean JSON.
03
MasterRecord ORM
Code-first models & queries across SQLite, MySQL, Postgres.
Loaded with power

Everything you need to build

Zero to full-stack

master new app gives you a Next.js frontend + API backend + ORM, wired and running in one command.

Rails-style generators

Scaffold a complete resource — model, validated REST controller with typed results, typed routes and a Next.js page — instantly.

Three databases

MasterRecord speaks SQLite, MySQL and PostgreSQL with the same code-first models and migrations.

Secure by default

JWT/cookie auth with policies, CSRF tokens, rate limiting, secure headers, HSTS and prototype-pollution protection out of the box.

Config & secrets, ASP.NET-style

appsettings.json layering, Section__Key env vars, and master secrets — the dotnet user-secrets equivalent — keep credentials out of the repo.

Operable from day one

/health/live and /health/ready for load balancers, structured logs with request correlation, compression and graceful shutdown.

OpenAPI, generated

/openapi.json and a Swagger UI at /docs derived from your routes, typed params, schemas and auth — nothing to keep in sync.

In-process testing

master test runs node --test against a real in-process server via createTestClient — no ports, no mocks.

Real migrations

Code-first diffing, atomic up/down migrations, status, script and remove — the dotnet ef workflow as master db.

Pure ESM, Node 22.12+

Modern JavaScript end to end — no transpiler required for the backend.

Decoupled by design

Frontend and backend are separate, scalable services that talk over a typed API.

Mountable components

Compose apps from self-contained MasterController components with their own routes and controllers.

1
Command to start
3
Databases
7
Generators
100%
ESM

Ready to claim the power?

See how Master stacks up against Rails, Express, NestJS and ASP.NET — then build something legendary.