create-nexpress
v0.1.31
Published
Scaffolder CLI for new NexPress projects (npx create-nexpress).
Downloads
1,629
Maintainers
Readme
create-nexpress
Scaffolder CLI for NexPress — the Next.js-based CMS.
Usage
npx create-nexpress my-site
cd my-site
pnpm install
docker compose -f docker/docker-compose.yml up -d db
pnpm run setup # browser env wizard: DB, NP_SECRET, storage, migrations
pnpm devEvery scaffold ships the four built-in themes (default, magazine,
portfolio, docs) along with example collections and plugins. The
active theme and whether to seed sample content are picked in the
first-boot admin setup wizard at /admin/setup,
not at scaffold time.
create-nexpress writes both .env.example and .env for you. Use the
setup wizard to confirm the DB connection, generate or accept the auth
secret, run migrations, create the first admin, pick a theme, and optionally
seed starter content.
The site runs at localhost:3000 and the admin
panel is at localhost:3000/admin.
What you get
A Next.js 16 App Router project with:
src/collections/— example collections (posts, pages) usingdefineCollection()src/nexpress.config.ts— site config (storage, auth, plugins)src/db/generated/— Drizzle schema generated from collectionssrc/app/(site)— public site routes with the catch-all[[...slug]]src/app/(admin)/admin— login + protected admin shellsrc/app/api/— REST endpoints (rate-limited, CSRF-enforced viaproxy.ts)docker/docker-compose.yml— Postgres 16 plus Mailpit, with a project-specific host port to avoid collisions between scaffolds.env.example/.env— every env var the project actually reads
Prerequisites
- Node ≥ 20
- pnpm ≥ 10
- Docker (for the bundled Postgres) or any Postgres ≥ 14 reachable
via
DATABASE_URL
Next steps after scaffolding
- Run the first-boot wizard:
pnpm run setup - Start the site:
pnpm dev, then open/admin - Publish your first page or post from the admin
- Plan the deploy target:
pnpm run deploy:plan -- --target vercel --brief --no-color - Apply production migrations:
pnpm db:migrate - Run the pre-deploy gate:
pnpm run ops:preflight -- --target vercel --brief --no-color - Capture release evidence:
pnpm run ops:release -- check --target vercel --json - Verify after deploy:
pnpm run ops:release -- verify --url https://your-domain.example --json - Deploy on Vercel: push your scaffold to GitHub, then import it from Vercel New Project
- Add a collection: edit
src/collections/<name>.ts, runpnpm db:generate && pnpm db:migrate - Read AGENTS.md — architecture overview
- Read deployment.md — Docker, Vercel, Fly.io, Render, Railway
Links
License
MIT
