Skip to content

TAVP CMS

Content management system built on TAVP modules. Thin glue layer — not a monolith.

For users

This page is the developer/architecture reference. For the end-user feature guide (storage, BREAD, SEO, etc.), see the CMS features page.

What It Is

tavp-cms composes existing modules into a working CMS:

ConcernModule
Auth (OTP, JWT, RBAC)tavpid
Admin paneltavphub
BREAD CRUDtavp-core (BreadManager)
Storagetavp-core (DatabaseStore / FlatFileStore)
Taxonomytavp-core (TaxonomyManager)
Revisionstavp-core (RevisionStore)
Searchtavp-core (SearchEngine)
SEOtavp-cms (SeoManager, SchemaGenerator, etc.)
Queuetavp-core (QueueManager, DatabaseQueue)
Scheduletavp-core (Schedule)

Quick Start

bash
composer create-project tavp/cms my-site
cd my-site
tavp migrate
tavp serve

Features

  • Pluggable Storage — Database or flat-file (Markdown + YAML)
  • BREAD Content Types — auto-generated admin UI
  • OTP Admin Login — passwordless via tavpid
  • RBAC — database-backed roles + permissions via tavpid
  • Taxonomy — categories + tags
  • Revisions — version history, one-click rollback
  • Search — full-text across all content types
  • Headless API — REST with bearer token auth
  • SEO Module — meta tags, OG, Twitter, JSON-LD, sitemap, robots, RSS, redirects, analyzer
  • Media Library — upload, list, preview, delete
  • Menu Builder — nestable navigation menus
  • Settings — key-value site settings
  • Webhooks — HTTP POST on content events with HMAC
  • Queue Worker — background job processing
  • Schedule Runner — cron-compatible task scheduling
  • Dark Admin UI — modern Tailwind theme

Architecture

tavp-cms is a thin glue layer — no auth code, no admin code, no RBAC code of its own. Everything comes from modules.

tavp-cms
├── config/
│   ├── cms.php        # Content types, storage, admin, mail, media
│   ├── seo.php        # SEO config (meta, sitemap, robots, schemas)
│   └── redirects.php  # Redirect rules
├── src/
│   ├── Admin/         # Admin controllers (7)
│   ├── Api/           # Headless REST API
│   ├── Bread/         # BREAD manager
│   ├── Seo/           # SEO module (14 classes)
│   ├── Storage/       # Database + FlatFile stores
│   ├── Taxonomy/      # Categories + tags
│   ├── Revisions/     # Version history
│   ├── Search/        # Full-text search
│   ├── Webhooks/      # Webhook manager
│   ├── Media/         # Media library
│   ├── Menu/          # Menu builder
│   ├── Settings/      # Key-value settings
│   ├── Publishing/    # Scheduled publishing
│   ├── Cache/         # Read-through cache
│   └── CmsServiceProvider.php  # Wires everything
├── database/migrations/  # 12 migration files
├── resources/admin/      # Admin templates (15+)
└── routes/
    ├── web.php           # Front-end routes
    └── api.php           # API routes

Module Dependencies

json
{
  "require": {
    "tavp/core": "^1.1",
    "tavp/tavpid": "^1.0"
  },
  "suggest": {
    "tavp/tavphub": "Admin panel abstraction",
    "tavp/tavpblocks": "UI components"
  }
}

Configuration

config/cms.php

php
return [
    'storage' => 'database',  // or 'flatfile'
    'admin' => [
        'emails' => ['admin@example.com'],
        'brand' => 'My CMS',
        'roles' => [
            'admin@example.com' => 'admin',
            'editor@example.com' => 'editor',
        ],
        'permissions' => [
            'admin' => ['content.*', 'taxonomy.*', 'media.*'],
            'editor' => ['content.*', 'taxonomy.*'],
        ],
    ],
    'content_types' => [
        'page' => [
            'label' => 'Pages',
            'fields' => [
                ['name' => 'title', 'type' => 'text', 'required' => true],
                ['name' => 'slug', 'type' => 'slug', 'from' => 'title'],
                ['name' => 'body', 'type' => 'richtext'],
                ['name' => 'status', 'type' => 'select', 'options' => ['draft', 'published']],
            ],
        ],
    ],
];

Migrations

Run all migrations:

bash
tavp migrate
#TableDescription
001contentsCore content storage
002content_typesBREAD type definitions
003mediaMedia library files
004menus, menu_itemsNavigation menus
005settingsKey-value site settings
006taxonomy_terms, content_taxonomyCategories + tags
007content_revisionsVersion history
008webhooks, webhook_deliveriesWebhook config + logs
009api_tokensAPI bearer tokens
010seo_metaPer-record SEO fields
011redirects301/302 redirect rules
012outbound_linksLink tracking + broken detection

API Endpoints

MethodEndpointDescription
GET/api/cms/typesList content types
GET/api/cms/{type}Browse records
GET/api/cms/{type}/{id}Read record
POST/api/cms/{type}Create record
PUT/api/cms/{type}/{id}Update record
DELETE/api/cms/{type}/{id}Delete record
GET/api/cms/search?q=...Full-text search
GET/api/cms/taxonomy/{type}List taxonomy terms
POST/api/cms/taxonomyCreate taxonomy term
GET/api/cms/{type}/{id}/revisionsRevision history
POST/api/cms/{type}/{id}/rollback/{ts}Rollback to revision
GET/sitemap.xmlXML sitemap
GET/robots.txtRobots.txt
GET/feedRSS feed

Admin Routes

RouteDescription
/adminDashboard
/admin/loginOTP login
/admin/c/{type}Content list
/admin/c/{type}/createCreate content
/admin/c/{type}/{id}/editEdit content
/admin/taxonomy/{type}Taxonomy list
/admin/seoSEO dashboard
/admin/seo/settingsSEO settings
/admin/seo/redirectsRedirect manager
/admin/seo/analyzerContent analyzer

Released under the MIT License.