Apache 2.0 ยท Fully Open Source

Core

The framework under the CMS.

VelvetCMS Core isn't a micro-framework. It's not a full-stack beast either. It's the sweet spot: everything you need to build content-driven applications, nothing you don't.

What's Included

A complete toolkit. No external dependencies for the essentials.

๐Ÿ›ฃ๏ธ

Router

Expressive routing with parameters, middleware pipelines, and controller support. Cache routes for production.

๐Ÿ“ฆ

Service Container

Dependency injection with autowiring. Singletons, factories, aliases. No configuration XML.

๐Ÿ—ƒ๏ธ

Query Builder

Fluent database queries with prepared statements. Joins, subqueries, transactions. SQLite, MySQL, PostgreSQL.

๐Ÿ“„

Content Drivers

Four storage strategies: File, Database, Hybrid, Auto. Start simple, scale seamlessly. No migration headaches.

โšก

Event System

Hook into everything. Before/after events for requests, content loading, rendering. Build decoupled modules.

๐Ÿ”Œ

Module Architecture

Self-contained packages with routes, services, and config. Enable what you need. Disable what you don't.

๐ŸŽจ

Template Engine

Native PHP templates with auto-escaping. Layouts, partials, sections. No Twig dependency.

๐Ÿ’พ

Caching Pipeline

Query cache, page cache, route cache, config cache. File or custom drivers. Automatic invalidation.

๐Ÿ”ง

CLI Toolkit

Built-in commands for migrations, cache, scaffolding. Create custom commands for your workflow.

Content Drivers

Pick your storage strategy. Change it later without rewriting code.

CONTENT_DRIVER=file

File Driver

Markdown files with YAML frontmatter. Git-friendly, no database required. Edit with VS Code, vim, whatever.

  • Version control friendly
  • Zero database setup
  • Best for: blogs, docs, small sites
CONTENT_DRIVER=hybrid

Hybrid Driver

Content stays in files, metadata lives in the database. Fast queries without losing the file workflow.

  • Best of both worlds
  • Fast metadata queries
  • Best for: growing sites, mixed teams
CONTENT_DRIVER=db

Database Driver

Everything in the database. Maximum query flexibility for complex content relationships.

  • Complex relational queries
  • Admin panel ready
  • Best for: large sites, Extended CMS
CONTENT_DRIVER=auto

Auto Driver

Start with files, automatically switch to hybrid at 100 pages. Zero configuration scaling.

  • Set it and forget it
  • Automatic migration
  • Best for: new projects

Security by Default

Every layer is hardened. You have to opt out of protection.

โœ“ CSRF tokens on all forms
โœ“ Auto-escaping templates (XSS)
โœ“ Prepared statements (SQL injection)
โœ“ Secure session cookies
โœ“ Path traversal prevention
โœ“ Request rate limiting

Start with Core

Clone, install, serve. Under a minute.

git clone https://github.com/VelvetCMS/VelvetCMS-Core.git && cd VelvetCMS-Core composer install && ./velvet install && ./velvet serve