Getting Started
Clone the template, configure your environment and run the full stack locally in minutes.
zmlkit is a full-stack AI SaaS starter: a Next.js web app (marketing site, user console, admin and the whole API) plus an Expo mobile client, sharing one backend with multi-app isolation built in. This guide takes you from a clean checkout to a running app.
Prerequisites
- Node.js 20+ and pnpm 9+
- A database — Docker Postgres (recommended), or nothing at all using SQLite dev mode
- Optional: the Expo Go app on your phone if you want to run the mobile client
Quickstart with Docker
From a clean checkout, with Docker running:
pnpm install
cp docs/env/web.env.example web/.env.local
# edit web/.env.local: set AUTH_SECRET (openssl rand -base64 32)
docker compose up -d postgres
pnpm --filter web db:generate
pnpm --filter web db:migrate
pnpm --filter web db:seed # permissions / roles / apps / super-admin
pnpm --filter web db:seed:demo # optional demo content + sample AI history
pnpm --filter web dev # http://localhost:3000Sign in with the seeded demo account demo@test.com / supersecret1. The admin console lives at /admin.
Quickstart without Docker (SQLite dev mode)
No Docker and no database server — a local file (web/dev.db) is the database. This mode is for local development and trials only; use Postgres or MySQL in production.
In web/.env.local, set:
DATABASE_PROVIDER=sqlite
DATABASE_URL=file:./dev.dbThen run the same db:generate / db:migrate / db:seed / dev commands as above. To reset, delete web/dev.db and re-run migrate + seed.
What you get out of the box
- Marketing site with locale-path routing (12 languages), JSON-driven landing blocks, blog, docs and SEO landing pages
- Auth: email + password (Argon2id), OAuth (Google/GitHub), hashed sessions, app-bound tokens
- AI: streaming chat (SSE) and image/video/audio generation behind one provider abstraction, with a credit hold → confirm/refund pipeline
- Billing: Stripe + Waffo Pancake web checkout, RevenueCat mobile IAP, one normalized webhook pipeline
- Admin console: users, orders, credits, AI history, content/CMS, feedback, audit log
- Mobile: an Expo client that talks to the same backend
Next steps
- Configuration — every setting is an environment variable; learn the conventions.
- Deployment — Vercel, Docker or Cloudflare Workers.
- Customization — make the template yours: branding, pages, providers, apps.