The fastest way to create a modern headless CMS
Build powerful content management systems with Next.js, Prisma, and Better Auth
Quick Start β’ Features β’ Tech Stack β’ Documentation
Get your CMS up and running in under 2 minutes:
npx create-cms-nova my-cms
cd my-cms# 1. Configure your database
cp .env.example .env
# Edit DATABASE_URL in .env
# 2. Initialize database
npx prisma db push
npx prisma generate
# 3. Start development server
npm run dev- π Visit http://localhost:3000 β Redirects to admin setup
- π€ Go to /admin/signup β Create your first admin account
- ποΈ Access /admin β Full-featured dashboard
- π You're ready to build!
|
|
|
|
| Category | Technology | Version |
|---|---|---|
| Framework | Next.js | 15+ |
| Runtime | React | 19+ |
| Language | TypeScript | 5+ |
| Database | Prisma ORM | Latest |
| Auth | Better Auth | Latest |
| Styling | Tailwind CSS | 3+ |
| Deployment | Vercel/Railway | - |
my-cms/
βββ π± src/app/ # Next.js App Router
β βββ π admin/ # Admin dashboard
β βββ π api/ # REST API routes
β βββ π (pages)/ # Public pages
βββ π§© src/components/ # Reusable components
β βββ ποΈ admin/ # Admin UI components
β βββ π cms/ # CMS core components
β βββ π¨ ui/ # Base UI components
βββ ποΈ prisma/ # Database schema & migrations
βββ π§ src/lib/ # Utilities & configurations
βββ π src/types/ # TypeScript definitions
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
# Database
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to database
npm run db:migrate # Run database migrations
npm run db:studio # Open Prisma Studio
npm run db:seed # Seed database with sample data
# Code Quality
npm run lint # Run ESLint
npm run type-check # Run TypeScript checksCreate a .env file in the generated project root:
# Database
DATABASE_URL="postgresql://username:password@localhost:5432/cms_nova"
# Authentication
BETTER_AUTH_SECRET="your-secret-key"
BETTER_AUTH_URL="http://localhost:3000"
# AWS S3 (Optional)
AWS_ACCESS_KEY_ID="your-access-key"
AWS_SECRET_ACCESS_KEY="your-secret-key"
AWS_REGION="us-east-1"
AWS_S3_BUCKET="your-bucket-name"
# Next.js
NEXT_PUBLIC_APP_URL="http://localhost:3000"- UI Components: Radix UI-based custom components
- File Upload: AWS S3 integration
| Blog/News | E-commerce | Portfolio | Documentation |
|---|---|---|---|
| Articles, categories, tags | Products, inventory | Projects, galleries | Guides, tutorials |
| Author management | Order processing | Client testimonials | Version control |
| SEO optimization | Payment integration | Contact forms | Search functionality |
- π Full Documentation
- π₯ Video Tutorials
- π‘ Examples & Templates
- π§ API Reference
Keep your generated CMS project up to date with the template.
- Source: Pulls from the template repository configured as
upstream(defaults todanielcadev/cms-nova-template). - Target ref: Uses
upstream/mainby default. You can set another ref via--tag(branch, tag, or commit SHA). - Backup: Creates a backup Git tag automatically before applying changes.
- Clean tree: Requires a clean working tree (commit or stash before upgrading).
You can override the template repository by creating a .cms-nova.json in your project root:
{
"templateRepo": "https://github.com/your-org/your-template.git"
}By default, the upgrade syncs only specific directories/files from the template to avoid overwriting local assets unintentionally. The default paths include:
- .github, .vscode, .eslintrc.json, eslint.config.mjs, tsconfig.json
- next.config.js, next.config.mjs, tailwind.config.js, postcss.config.js, .env.example
- scripts, package.json
- public, prisma
- src, app, src/app, src/admin, admin
- Preview changes:
npx create-cms-nova upgrade --dry-run- Apply changes:
npx create-cms-nova upgrade- Specify a template ref (branch, tag, or SHA):
npx create-cms-nova upgrade --tag upstream/dev
npx create-cms-nova upgrade --tag v4.0.5
npx create-cms-nova upgrade --tag c12ddcfc63edbcb3ae6e125d81af22c29b726644- Limit to custom paths:
npx create-cms-nova upgrade --paths "src/components/admin,docker,docs"- Merge mode (pull all template history and resolve conflicts if any):
npx create-cms-nova upgrade --mode merge- Commit your change to the template repository (e.g.,
cms-nova-templateon the desired branch). - In your generated project, run the upgrade (optionally against the specific ref with
--tag). - Review and test the changes.
Tip: You can run the local script directly (useful when developing the CLI):
node create-cms-nova.js upgrade --dry-run
node create-cms-nova.js upgradeThis project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by Daniel CA
Star β this repo if you find it helpful!