Momentum CMS

May 2, 2026 · View on GitHub

An Angular-based headless CMS. Define collections in TypeScript, auto-generate an Admin UI, REST API, and database schema.

Momentum CMS Overview

ALPHA SOFTWARE — DO NOT USE IN PRODUCTION. This project is in early alpha. APIs will change, things will break, and there are missing features. It is a prototype and a learning platform. Use it for experimentation and prototyping only.

Why Momentum?

I really enjoy using Payload CMS. It's one of the best tools out there for rapid prototyping and content-heavy applications. The admin UI is great, the flexibility you get from defining collections in code is unmatched, and having everything — admin, API, auth, database — all living together inside one ecosystem (Next.js) is incredibly productive. I've grown to really like the patterns: collection-based config, field types, hooks, access control.

But I'm an Angular developer, and the Angular community doesn't have anything like it. There's no equivalent where you define your data model in TypeScript and get a full admin dashboard, REST API, authentication, and database schema generated automatically — all within the Angular ecosystem.

That's what Momentum is. It takes the patterns and developer experience I love from Payload CMS and brings them to Angular. The goal is to have a platform for quickly building Angular full-stack applications with an admin dashboard and prebuilt functionality out of the box, using Better Auth for authentication and Drizzle ORM for the database layer. A lot of the design is directly inspired by how Payload does things — collections, fields, hooks, access control — adapted to work natively with Angular SSR (via Express or Analog/Nitro).

Status: Alpha

This project is not production-ready. It is in active, early-stage development. Expect breaking changes, incomplete features, and rough edges.

A few things to know:

  • Built with AI. This project is being developed almost entirely with AI tooling — primarily Claude Code. If that's not your thing, fair warning. I use a good chunk of my monthly AI budget on this, so development moves fast but in AI-assisted increments.
  • It's a prototype. The main purpose right now is to have a solid platform for rapidly prototyping Angular full-stack apps. It works, but it's not battle-tested.
  • APIs will change. Collection config, plugin interfaces, server adapters — all of it is subject to change as the project matures. Don't build anything critical on top of this yet.

Quick Start

npx create-momentum-app my-app
cd my-app
npm run dev

The CLI will prompt you for:

  • Framework - Angular (Express SSR), Angular (NestJS SSR), or Analog (Nitro)
  • Database - PostgreSQL or SQLite

Then open http://localhost:4200/admin to access the admin dashboard.

Documentation

Full documentation is available in the docs/ directory, covering collections, fields, access control, hooks, database adapters, authentication, plugins, and more.

Features

  • Collection-first — Define your data model in TypeScript with 20 field types; the admin UI, API routes, database schema, and optional client SDK are generated automatically
  • Client SDK — Auto-generated, framework-agnostic fetch-based API client with full TypeScript types for any consumer (React, Vue, Svelte, vanilla JS)
  • Angular 21 — Server-side rendered with Express, NestJS, or Analog/Nitro
  • REST + GraphQL — Auto-generated REST API with filtering, sorting, pagination, and depth population. Auto-generated GraphQL schema with queries and mutations.
  • Full-text Search — Built-in search via PostgreSQL tsvector/tsquery
  • Headless UI Primitives — 32 unstyled, accessible Angular interaction primitives built on Angular CDK and Angular Aria
  • Admin Dashboard — Auto-generated CRUD interface with rich text editing, visual block editor, bulk operations, relationships, file uploads, and dark mode
  • Live Preview — Side-panel in-memory Angular rendering with signals-based instant updates (no iframes) and per-collection preview components
  • Versioning & Drafts — Document version history, draft/publish workflow, autosave, scheduled publishing, and a side-by-side version diff UI with field-level highlighting
  • Media Library — Folders, tags, asset metadata search, bulk upload, and image variant management
  • Import / Export — CSV and JSON import/export from the admin panel and a data transfer tool for moving content between environments
  • API Response Caching — In-memory LRU and Redis adapters with ETag/304, per-collection config, automatic invalidation on writes, and CDN-friendly headers
  • AI / MCP Integration — Built-in Model Context Protocol server exposing CMS data to AI tools (Claude Code, etc.) with security-first defaults
  • Drizzle ORM — Type-safe database access with PostgreSQL and SQLite adapters, full migration system with schema diffing
  • Authentication — Built-in auth via Better Auth with email/password, OAuth providers, sessions, role-based access, API keys, admin tools (ban/impersonation), and organization multi-tenancy
  • Webhooks — Per-collection webhooks with HMAC-SHA256 signature verification, retries, and custom headers
  • File Storage — Local filesystem and S3-compatible storage adapters with image variant generation and focal point cropping
  • Plugin System — Event bus architecture with SEO, analytics, OpenTelemetry, form builder, email builder, image processing, redirects, queue, and cron plugins
  • SEO — Meta tags, Open Graph, Twitter cards, sitemap.xml, robots.txt generation, and content analysis with scoring
  • Soft Deletes — Built-in trash/restore with configurable retention
  • Form Builder — Schema-driven dynamic forms with conditional fields, server-side validation, submission storage, and webhook forwarding
  • Email Builder — Visual email template editor with live preview, Handlebars templating, and pluggable transport (SMTP, Resend)
  • Queue & Cron — Background job processing with configurable concurrency, retry policies, and scheduled task execution
  • Image Processing — Automatic image variant generation with focal point cropping, powered by @napi-rs/image (no Sharp dependency)
  • Swappable Admin — Replace built-in admin pages with custom components and inject content into layout slots, with per-collection overrides
  • Globals — Singleton documents with fields, access control, hooks, and versioning
  • Theme Editor — Visual CSS variable editor with presets, light/dark mode, and live preview

Define a Collection

import { defineCollection, text, richText, relationship } from '@momentumcms/core';

export const Posts = defineCollection({
	slug: 'posts',
	fields: [
		text('title', { required: true }),
		richText('content'),
		relationship('author', { collection: () => Users }),
	],
	access: {
		read: () => true,
		create: ({ req }) => !!req.user,
	},
});

Packages

PackagenpmDescription
@momentumcms/corelibs/coreCollection config, fields, hooks, access control, and code generation (types, admin config, client SDK)
@momentumcms/db-drizzlelibs/db-drizzleDrizzle ORM database adapter (PostgreSQL + SQLite)
@momentumcms/authlibs/authBetter Auth integration
@momentumcms/server-corelibs/server-coreFramework-agnostic server handlers
@momentumcms/server-expresslibs/server-expressExpress adapter for Angular SSR
@momentumcms/server-nestjslibs/server-nestjsNestJS adapter for Angular SSR
@momentumcms/server-analoglibs/server-analogNitro/h3 adapter for Analog.js
@momentumcms/adminlibs/adminAngular admin dashboard UI
@momentumcms/uilibs/uiBase UI component library
@momentumcms/headlesslibs/headlessUnstyled Angular headless primitives
@momentumcms/theme-editorlibs/theme-editorVisual CSS variable editor with presets and live preview
@momentumcms/storagelibs/storageFile storage adapters (local, S3)
@momentumcms/migrationslibs/migrationsDatabase migration system (generate, run, rollback)
@momentumcms/loggerlibs/loggerStructured logging
@momentumcms/plugins-corelibs/plugins/corePlugin system core (event bus)
@momentumcms/plugins-analyticslibs/plugins/analyticsAnalytics and tracking plugin
@momentumcms/plugins-seolibs/plugins/seoSEO plugin (meta tags, sitemap, robots.txt)
@momentumcms/plugins-otellibs/plugins/otelOpenTelemetry observability plugin
@momentumcms/plugins-redirectslibs/plugins/redirectsURL redirect management plugin
@momentumcms/form-builderlibs/form-builderAngular form builder (schema-driven, Signal Forms)
@momentumcms/plugins-form-builderlibs/plugins/form-builderForm submissions, validation, and webhooks plugin
@momentumcms/emaillibs/emailEmail rendering and transport
@momentumcms/email-builderlibs/email-builderVisual email template editor
@momentumcms/plugins-emaillibs/plugins/emailEmail plugin (templates, sending, tracking)
@momentumcms/queuelibs/queueBackground job queue infrastructure
@momentumcms/plugins-queuelibs/plugins/queueQueue plugin (job processing, retries)
@momentumcms/plugins-cronlibs/plugins/cronScheduled task execution plugin
@momentumcms/plugins-imagelibs/plugins/imageImage processing plugin (resize, variants, focal point)
@momentumcms/plugins-cachelibs/plugins/cacheAPI response caching (LRU/Redis, ETag, invalidation)
@momentumcms/plugins-mcplibs/plugins/mcpModel Context Protocol server for AI tool integration
@momentumcms/plugins-media-organizerlibs/plugins/media-organizerMedia library folders, tags, and metadata search
create-momentum-appapps/create-momentum-appCLI scaffolding tool

Architecture

              ┌──────────────────────┐
              │    Code Generator    │
              │  (types, admin cfg,  │
              │    client SDK)       │
              └──────────┬───────────┘
                         │ generates
┌─────────────────────────────────────────┐
│              Admin Dashboard            │
│          (@momentumcms/admin)          │
├─────────────────────────────────────────┤
│            Server Adapters              │
│ server-express │ server-nestjs │ analog │
├───────────────────┴─────────────────────┤
│           server-core                   │
│      (REST API, file handling)          │
├─────────────────────────────────────────┤
│    core     │   auth    │   storage     │
│  (fields,   │ (Better   │ (local, S3)   │
│   hooks,    │  Auth)    │               │
│   access)   │           │               │
├─────────────┴───────────┴───────────────┤
│             db-drizzle                  │
│      (PostgreSQL / SQLite)              │
└─────────────────────────────────────────┘

Manual Integration

If you prefer to add Momentum CMS to an existing Angular project:

npm install @momentumcms/core @momentumcms/db-drizzle @momentumcms/auth \
  @momentumcms/server-core @momentumcms/admin @momentumcms/storage

For Angular + Express:

npm install @momentumcms/server-express

For Angular + NestJS:

npm install @momentumcms/server-nestjs @nestjs/common @nestjs/core rxjs

For Analog + Nitro:

npm install @momentumcms/server-analog

See the generated momentum.config.ts from create-momentum-app for a configuration example.

Development

This is an Nx monorepo. Prerequisites: Node.js >= 18, npm.

# Install dependencies
npm install

# Dev server (example Angular app)
npx nx serve example-angular

# Run all tests
npx nx run-many -t test

# Build all packages
npx nx run-many -t build

# Lint
npx nx run-many -t lint

# Dependency graph
npx nx graph

Docker Services (Development)

The monorepo uses Docker Compose for local development infrastructure:

docker compose up -d
ServicePort(s)Purpose
postgres5435Main development database
postgres-seeding-test5434E2E seeding test database
minio9000, 9001S3-compatible storage (tests)

PostgreSQL is required for running the example apps. MinIO is only needed for S3 integration tests.

The MinIO console is available at http://localhost:9001 (credentials: minioadmin / minioadmin).

Testing the CLI

npm run test:create-app

This starts a local Verdaccio registry, publishes all packages, runs create-momentum-app for each flavor, and verifies the generated projects compile.

Roadmap

See ROADMAP.md for the full detailed roadmap including current feature inventory, design decisions, and what's explicitly not planned.

Recently Shipped

  • AI / MCP Integration — MCP server plugin exposing CMS data to AI tools via Model Context Protocol with 12 tools (CRUD, search, schema introspection, globals), 4 resources, 2 prompts, and security-first defaults (write tools opt-in, API key required, auth collections auto-excluded)
  • API Response Caching Plugin — In-memory LRU and Redis adapters with ETag/304 support, per-collection cache config, automatic invalidation on writes, CDN headers (Cache-Control, Surrogate-Control, Vary), and an admin dashboard with stats and manual purge
  • Media Library Enhancements — Folder and tag organization, asset metadata search, and bulk upload UI
  • Import / Export — CSV and JSON import UI in the admin panel, collection data export, and a data transfer tool for moving content between environments
  • Version Diff UI — Deep diff engine with field-level change highlighting, side-by-side comparison, inline diff toggle, and version navigation with access control
  • Live Preview Side Panel — Real-time in-memory Angular rendering with signals-based LivePreviewService (no iframes), per-collection preview components, and form builder plugin support
  • Client SDK Generation — Framework-agnostic, fetch-based TypeScript API client via --client flag with typed CRUD, globals, auth modes, and error handling
  • Headless UI Library — 32 accessible, unstyled Angular primitives with a global styling contract and example harness
  • Form Builder — Schema-driven plugin with conditional fields, server-side validation, submission storage, rate limiting, and webhook forwarding
  • Email Builder — Visual template editor with live preview, Handlebars templating, and pluggable transport
  • Queue & Cron — Background job processing with configurable concurrency, retry policies, and scheduled execution
  • Redirects — Collection-based URL redirect management with server middleware
  • Image Processing@napi-rs/image-powered variant generation with focal point cropping (no Sharp dependency)
  • Versioning & Drafts — Revision history, draft/publish workflow, auto-versioning, scheduled publishing, role-based publish controls
  • Swappable Admin — Replace built-in pages and inject layout slots with per-collection overrides

Planned

Tech debt (next up):

  • Server Adapter Consolidation — Move duplicated route handler logic from Express and Analog into @momentumcms/server-core, and bring NestJS to full route parity (versioning, publishing, media, batch, search, import/export, preview, custom endpoints, GraphQL, globals)

Low priority:

  • Review Workflows — Multi-stage content approval beyond draft/published
  • Multi-tenancy — Tenant collection, scoped data isolation, per-tenant branding, tenant-aware storage

Ongoing:

  • UX polish pass across the admin dashboard
  • Better Auth plugin adapters (magic links, passkeys)
  • Docker deployment guide
  • Momentum website (built with Momentum)

Contributing

The best way to contribute is to open a GitHub issue. Be as specific as possible — include screenshots, error messages, reproduction steps, and what you expected to happen. The more context you provide, the better.

Here's why that matters: issues are often picked up directly with AI tooling (Claude Code, Codex) straight from GitHub. I'll grab an issue, feed it into the AI, and push changes based on the recommendations or bug reports. So the more detailed and specific your issue is, the more likely it gets resolved quickly and correctly. Vague issues like "it doesn't work" are hard for anyone to act on — but a screenshot with steps to reproduce is gold.

Pull requests are also welcome. Fork the repo, create a feature branch, make sure npx nx affected -t test and npx nx affected -t lint pass, and submit a PR.

Acknowledgments

Inspired by Payload CMS. Built with Angular, Drizzle ORM, Better Auth, and Nx.

License

MIT