create-cms-nova
v5.2.5
Published
CLI to create CMS Nova projects - A complete headless CMS with Next.js, Prisma and Better Auth
Maintainers
Readme
🚀 Create CMS Nova
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
🚀 Quick Start
Get your CMS up and running in under 2 minutes:
npx create-cms-nova my-cms
cd my-cmsSetup & Launch
# 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 devFirst Steps
- 🌐 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!
✨ Features
🎯 Core CMS
- ✅ Headless Architecture with REST APIs
- ✅ Visual Content Builder drag & drop interface
- ✅ Dynamic Content Types create any structure
- ✅ Rich Media Management images, files, galleries
- ✅ SEO Optimization built-in meta management
🔐 Admin & Security
- ✅ Robust Authentication with Better Auth
- ✅ Role-based Permissions granular access control
- ✅ User Management complete admin interface
- ✅ Secure APIs authentication & authorization
- ✅ Audit Logging track all changes
🎨 Design & UX
- ✅ Notion-style Interface clean & intuitive
- ✅ Dark/Light Mode automatic theme switching
- ✅ Fully Responsive mobile-first design
- ✅ Custom Components no external UI dependencies
- ✅ Accessibility WCAG compliant
🚀 Developer Experience
- ✅ TypeScript full type safety
- ✅ Hot Reload instant development feedback
- ✅ Database Agnostic PostgreSQL, MySQL, SQLite
- ✅ Easy Deployment Vercel, Railway, Docker
- ✅ Extensible plugin architecture
🛠️ Tech Stack
| 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 | - |
📁 Project Structure
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🚀 Available Scripts (generated project)
# 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 checks🌐 Environment Variables (generated project)
Create 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"🧩 Additional Tech (template)
- UI Components: Radix UI-based custom components
- File Upload: AWS S3 integration
🎯 Use Cases
| 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 |
📚 Documentation
🔄 Upgrade Guide
Keep your generated CMS project up to date with the template.
How it works
- 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"
}Default behavior (paths mode)
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
Basic commands
- Preview changes:
npx create-cms-nova upgrade --dry-run- Apply changes:
npx create-cms-nova upgradeAdvanced usage
- 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 mergeRecommended workflow
- 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 upgrade🤝 Community & Support
🐛 Report Bug • 💡 Request Feature • 💬 Join Discussion
📄 License
This 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!
