Skip to content

danielcadev/cms-nova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

33 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Create CMS Nova

The fastest way to create a modern headless CMS

npm version License: MIT Node.js

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-cms

Setup & 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 dev

First Steps

  1. 🌐 Visit http://localhost:3000 β†’ Redirects to admin setup
  2. πŸ‘€ Go to /admin/signup β†’ Create your first admin account
  3. πŸŽ›οΈ Access /admin β†’ Full-featured dashboard
  4. πŸŽ‰ 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 to danielcadev/cms-nova-template).
  • Target ref: Uses upstream/main by 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 upgrade

Advanced 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 merge

Recommended workflow

  1. Commit your change to the template repository (e.g., cms-nova-template on the desired branch).
  2. In your generated project, run the upgrade (optionally against the specific ref with --tag).
  3. 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


πŸ“„ 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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors