create-zstack
v1.3.2
Published
CLI to scaffold zstack projects — monorepo with Hono + Drizzle + Better-Auth + your choice of frontend framework
Readme
create-zstack
Scaffold a full-stack TypeScript monorepo in seconds. Hono + Drizzle + Better-Auth + your choice of frontend framework.
npx create-zstack my-projectPick a frontend framework at the prompt — SolidJS, React, Svelte, or Astro — and get a production-ready monorepo with authentication, database, and API server wired up.
What You Get
Every scaffolded project includes:
| Layer | Tech | |---|---| | API server | Hono — lightweight, fast, TypeScript-native | | Database | Drizzle ORM + PostgreSQL | | Auth | Better-Auth — email/password ready, Drizzle adapter | | Env validation | t3-env — type-safe environment variables | | Monorepo | pnpm workspaces — shared config, packages, apps | | Linting | Biome — fast, one tool for format + lint | | Git hooks | Husky — pre-commit checks |
Frontend Options
| Preset | Stack | |---|---| | SolidJS | Vite + SolidJS + TanStack Router + Tailwind v4 | | React | Vite + React 19 + TanStack Router + Tailwind v4 | | Svelte | SvelteKit (SPA mode) + Tailwind v4 | | Astro | Astro 5 + Tailwind v4 (static/hybrid) |
All presets get the same backend, auth, and database — only the frontend changes.
Quick Start
npx create-zstack my-project
cd my-project
cp .env.example .env
pnpm db:push
pnpm devThe API runs at localhost:3000, the web app at localhost:5173.
Options
npx create-zstack # Interactive prompts
npx create-zstack my-project # Skip name prompt, still choose frameworkProject Structure (scaffolded output)
my-project/
├── apps/
│ ├── web/ # Frontend (framework of your choice)
│ └── server/ # Hono API with auth routes
├── packages/
│ ├── auth/ # Better-Auth setup + Drizzle adapter
│ ├── config/ # Shared TypeScript config (tsconfig.base.json)
│ ├── db/ # Drizzle schema + migrations + docker-compose
│ └── env/ # t3-env schemas (server + client)
├── biome.json # Biome config
├── pnpm-workspace.yaml # Workspace + catalog
└── package.json # Root scriptsScripts (in scaffolded project)
| Command | Description |
|---|---|
| pnpm dev | Start all apps in dev mode |
| pnpm build | Build all apps |
| pnpm check-types | TypeScript type checking |
| pnpm check | Format & lint with Biome |
| pnpm db:push | Push schema to database |
| pnpm db:generate | Generate Drizzle migrations |
| pnpm db:studio | Open Drizzle Studio |
| pnpm dev:web | Start only the web app |
| pnpm dev:server | Start only the server |
Development (contributing to this CLI)
git clone [email protected]:pedrsntana/create-zstack.git
cd create-zstack
pnpm install
pnpm dev # Interactive scaffold test
pnpm build # Build for publishingAdd a new framework preset
- Create
templates/{framework}/apps/web/with the framework's files - Add deps to
src/presets/index.ts - Add to the
Frameworktype insrc/types.ts - Optionally add to the prompt in
src/prompts.ts
Templates use {{variable}} placeholders — see the create-zstack skill for full docs.
Publishing
pnpm build
npm publishCurrent version: 0.1.0. Published to npm under the create-zstack name.
License
MIT
