Skip to content

Latest commit

History

700 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Contentrain Studio

Contentrain Studio

Conversation-first CMS for teams who manage structured content over Git.

Connect a repository, define content models, edit through chat or UI, review changes through Git-native workflows, and ship through forms, media, CDN, and APIs.

License: AGPL-3.0CIOpen CoreIssues


What Contentrain Studio Is

Contentrain Studio is an open-core, Git-backed content operations platform built with Nuxt 4. Teams can self-host the AGPL core or use a managed Pro/Enterprise offering while keeping Git as the source of truth.

The product model is:

  • your Git repository remains the source of truth
  • content is schema-based and locale-aware
  • users can operate through chat, forms, or structured UI
  • changes become branches, commits, diffs, and merges
  • delivery can happen through media, CDN, and API surfaces

This repository contains the AGPL core. Proprietary enterprise implementations live in ee/ under a separate license. Managed Pro/Enterprise deployments can be operated on top of the same product model.

Why It Exists

Traditional CMS products hide content workflows behind opaque databases and admin panels. Studio takes a different path:

  • Git is the storage and audit layer
  • schema validation protects structured content quality
  • AI is bounded by tools and permissions, not used as an uncontrolled shell
  • workspaces and projects map cleanly to team and repository boundaries
  • self-hosting remains a supported trust path, and managed operation is also available

Relationship to Contentrain AI

Studio shares the same .contentrain/ contract with the MIT package surface in the contentrain-ai repository. Developers usually enter the ecosystem through local-first package workflows, then move into Studio when review, roles, and delivery become operational needs.

AI surfacePrimary jobStudio bridgeDocs
@contentrain/mcpDeterministic local content operations and normalizeStudio applies the same content contract through authenticated review and delivery workflowsMCP Tools
contentrain CLIinit, serve, generate, diff, validateStudio takes over when teams need a web surface, project management, and approvalCLI
@contentrain/rulesShared quality and schema standardsStudio chat, review, and validation should stay aligned with the same rulesRules & Skills
@contentrain/skillsAgent playbooks and workflow hintsStudio mirrors these workflows in onboarding, chat-led operations, and handoffsRules & Skills
@contentrain/queryLocal typed consumption and CDN client transportStudio extends the same content into remote delivery and API-key-based CDN accessQuery SDK

Typical path:

contentrain init → normalize hardcoded content → review in Studio → invite teammates → deliver through CDN/API when needed

Product Surface

Core Platform

  • Workspace and project management
  • GitHub App-based repository connection
  • Structured content models:
    • collection
    • singleton
    • document
    • dictionary
  • Multi-locale content workflows
  • Chat-driven content operations
  • Content validation and health reporting
  • Branch, diff, merge, and review workflows
  • Team and role management

Delivery and Operations

  • Media library and upload pipeline
  • Forms and submission review
  • CDN build and delivery surfaces
  • Webhook and conversation API bridges
  • Billing, plan limits, and self-host deployment fallbacks

Open Core Model

  • Core (app/, server/, supabase/, postgres/, tests): AGPL-3.0
  • Enterprise (ee/): proprietary implementations for premium operational surfaces

See:

Architecture at a Glance

User → Workspace → Project → Repository
  • Workspace: billing, team, installation, and policy boundary
  • Project: connected Git repository inside a workspace
  • Content Engine: validation, serialization, branching, commit, merge
  • Conversation Engine: AI loop with tool execution and permission enforcement
  • Provider Layer: auth, database, git, AI, email, billing, CDN, media

Stack

LayerCurrent implementation
FrameworkNuxt 4
UIRadix Vue + Tailwind CSS 4
AuthProvider interface — Supabase Auth, or the built-in managed provider (JWT + OAuth + magic link)
DatabaseProvider interface — Supabase PostgreSQL, or any plain PostgreSQL (managed pair)
GitProvider interface, currently GitHub App
AIProvider interface, currently Anthropic
EmailProvider interface, currently Resend
BillingPlugin registry, default Polar (MoR), Stripe fallback
CDN / MediaEnterprise bridge-backed implementations (ee/-resident)

The architectural rule is strict: application code talks to provider interfaces and shared utilities, not vendor SDKs directly.

Editions

Studio ships in two editions, distinguished by whether the ee/ directory is loaded at runtime. Edition is orthogonal to plan tier — a managed Enterprise customer and a self-hosted Community user share the same tier vocabulary but different code paths.

Community EditionEnterprise Edition
LicenseAGPL-3.0 + LICENSE-EXCEPTIONSAGPL core + ee/LICENSE (proprietary)
ee/ directoryAbsent or not loadedPresent and loaded
BillingOffPolar / Stripe / flat-fee / off
Plan tierFixed community (unlimited)free / starter / pro / enterprise
Typical scenariosAGPL self-host, forks, hosting resellers, local evalManaged SaaS (contentrain.io), on-premise enterprise, managed dedicated, OEM, white-label

See docs/EDITIONS.md for the full feature matrix.

Deployment Profiles

Studio auto-detects a deployment profile at boot from (a) ee/ presence and (b) configured payment plugins. NUXT_DEPLOYMENT_PROFILE overrides.

ProfileEditionBilling modePlan source
managedee requiredpolar / stripesubscription
dedicatedee requiredflat or subscriptionoperator or subscription
on-premiseee requiredoffoperator-set (default enterprise)
communityagpl onlyofffixed community

See docs/DEPLOYMENT_PROFILES.md for the 12-scenario matrix and per-profile env checklist.

Plans and Licensing

Current runtime plans: community (auto-assigned in Community Edition, not purchasable) / free / starter / pro / enterprise.

Plan-differentiated capability examples:

  • AI usage, Studio-hosted key, BYOA (Pro+)
  • CDN delivery, preview branches, custom domain
  • Media upload / library / custom variants
  • Review workflow and advanced project roles (Reviewer, Viewer)
  • Conversation API and outbound webhooks
  • Enterprise-only SSO, white-label, custom MCP domain

The source of truth lives in shared/utils/license.ts and .contentrain/content/system/plan-features/. Feature gating runs through hasFeature(plan, key) with the current edition applied.

For license inquiries, see docs/LICENSING.md and contact info@contentrain.io.

Repository Structure

studio/
├─ app/ # Frontend pages, layouts, components, composables
├─ server/ # Nitro routes, middleware, providers, utilities
├─ supabase/ # Migrations, local Supabase config, RLS policies
├─ postgres/ # Plain-PG auth shim (000_auth_shim.sql) — managed pair lineage head
├─ ee/ # Proprietary enterprise implementations
├─ tests/ # Unit, integration, Nuxt, RLS, contract, and E2E suites
├─ .contentrain/ # Content models and generated query client
└─ docs/ # Release-facing deployment and self-hosting docs

Quick Start

Prerequisites

  • Node.js 22+
  • pnpm 10+
  • Git
  • Supabase CLI for the default local database/auth flow (or any plain PostgreSQL for the managed pair)

Local Development

Option A — Supabase pair (default):

git clone https://github.com/Contentrain/studio.git
cd studio
pnpm install
cp .env.example .env
pnpm db:start
pnpm db:migrate
npx contentrain generate
pnpm dev

Option B — managed + postgres pair (no Supabase; any plain PostgreSQL):

git clone https://github.com/Contentrain/studio.git
cd studio
pnpm install
cp .env.example .env # set the managed-pair block (NUXT_AUTH_PROVIDER=managed, NUXT_DATABASE_PROVIDER=postgres, NUXT_POSTGRES_URL, …)
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres:16
pnpm db:migrate:pg # single lineage: postgres/migrations + supabase/migrations
pnpm db:verify:pg # schema + trigger chain + RLS isolation checks
npx contentrain generate
pnpm dev

Local app URL:

  • http://localhost:3000

Documentation

Release-facing setup and deployment docs:

Testing

pnpm lint
pnpm typecheck
pnpm test:unit
pnpm test:integration
pnpm test:nuxt
pnpm test:rls # RLS contracts — Supabase local by default; RLS_DB_URL=… targets plain PG
pnpm test:contract # postgres DatabaseProvider vs a throwaway postgres:16 (port 54329)
pnpm test:e2e
pnpm test:ci
pnpm build

Security and Responsible Disclosure

Do not open public issues for vulnerabilities.

Report security issues privately:

See SECURITY.md for scope, timelines, and disclosure guidance.

Branch Model

Studio is trunk-based. main is the single integration branch and the target for every PR. Staging is a Railway deployment environment fed from main, not a separate Git branch.

  • Contributors: open PRs against main (GitHub's default base, no extra step needed).
  • Self-hosters: deploy from tagged releases (v0.1.0, v0.2.0, …). Tags are the stability contract; main HEAD can include not-yet-released changes.
  • Releases: maintainers cut a version tag on main → production deploy. See docs/RELEASING.md.

Contributing

Community contributions are welcome for the AGPL core.

Before opening a PR, read:

License

If you run a modified version of the AGPL core as a network service, you must make the Corresponding Source available to interacting users — the built-in /about page satisfies this obligation by linking to the upstream repository. See docs/LICENSING.md for the full mapping of SKU × license type × supported scenario.


Built with Nuxt, Vue, Radix Vue, and Git-native content workflows.

Copyright 2026 Contentrain, LLC.

About

Self-hostable content management platform for AI-native teams. Chat-first editing, Git-native storage, CDN delivery. AGPL-3.0 core — managed cloud available.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages