Installation
Scaffold a new app
The fastest way to start is the project scaffolder. It generates a production-shaped app and only includes what you pick — nothing dead ships.
npx create-machize my-saasFlags let you shape the stack:
npx create-machize my-saas --no-tenancy # skip multi-tenancy
npx create-machize my-saas --no-auth # skip authentication
npx create-machize my-saas --billing # include subscriptionsThen:
cd my-saas
pnpm install
pnpm dev # http://localhost:3000/health
pnpm testThe generated project boots an app with typed routes, structured logging, a health check and — unless you opted out — multi-tenancy (header and subdomain resolvers) and authentication.
Choose an HTTP adapter
Your routes are written once and run on any of three adapters — pick the one for your stack (see HTTP Adapters):
pnpm add @machize/core @machize/http @machize/fastify fastify # Fastify
pnpm add @machize/core @machize/http @machize/express express # Express
pnpm add @machize/core @machize/http @machize/hono hono @hono/node-server # HonoAdd to an existing app
Machize packages work incrementally. To add multi-tenancy to an existing app, install just the pieces you need — it works the same on any adapter:
pnpm add @machize/core @machize/tenancyEvery package publishes ESM with types and follows the same plugin contract, so you adopt one capability at a time.
Requirements
- Node.js 22+
- pnpm (recommended) — the monorepo pins its version via
packageManager - For production: PostgreSQL (Prisma), and Redis for cache/queues when you enable them
Scaffold inside a project
Once you have an app, generate full resource verticals with the CLI generator:
mach make:resource ProjectThis emits a schema, repository, service, DI plugin, typed CRUD routes and a test — all wired and ready to run.