studio
Content governance workspace for teams and AI agents: chat-first editing, branch review, roles, media and CDN delivery on your Git repo.
Contentrain Studio The team operating surface for governed content: agent generates, human approves, Git records every change. 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. Contentrain Studio is part of Contentrain, the content governance ecosystem for teams and AI agents. It is an open-core, Git-backed content operations platform built with Nuxt 4.
Summary extracted from the README.
What Contentrain Studio Is
Contentrain Studio is part of Contentrain, the content governance ecosystem for teams and AI agents. It is an open-core, Git-backed content operations platform built with Nuxt 4. Teams can self-host the AGPL core or use the managed service at studio.contentrain.io (Starter, Pro, Enterprise) while keeping Git as the source of truth.
It is for teams whose content lives in a Git repository as structured JSON and Markdown and who need review, roles, and delivery around it — including when AI agents write the changes.
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 Starter/Pro/Enterprise deployments are 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
Where Studio Fits in Contentrain
Contentrain has four parts:
- Open-source tools (
Contentrain/ai, MIT, ai.contentrain.io) — MCP, CLI, SDK, rules, and skills that developers and agents use to pull content out of code and structure it in their project. - Studio (this repository, studio.contentrain.io, docs at docs.contentrain.io) — the team surface for reviewing, governing, and delivering that content.
- Migrate (migrate.contentrain.io) — a paid service that moves a WordPress site to Astro. Each run writes
contentrain-handoff.jsoninto the generated repository, and Studio reads it when that repository is connected (Migration Handoff). - Bridge (
Contentrain/wordpress-bridge, WordPress.org) — a free WordPress plugin that exports content as a Contentrain store (JSON + Markdown) to a ZIP or your own GitHub repository.
All four read and write the same .contentrain/ contract, so a GitHub repository holding a Contentrain store — written by the tools, Migrate, or Bridge — can be connected to Studio.
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 surface | Primary job | Studio bridge | Docs |
|---|---|---|---|
@contentrain/mcp |
Deterministic local content operations and normalize | Studio applies the same content contract through authenticated review and delivery workflows | MCP Tools |
contentrain CLI |
init, serve, generate, diff, validate |
Studio takes over when teams need a web surface, project management, and approval | CLI |
@contentrain/rules |
Shared quality and schema standards | Studio chat, review, and validation should stay aligned with the same rules | Rules & Skills |
@contentrain/skills |
Agent playbooks and workflow hints | Studio mirrors these workflows in onboarding, chat-led operations, and handoffs | Rules & Skills |
@contentrain/query |
Local typed consumption and CDN client transport | Studio extends the same content into remote delivery and API-key-based CDN access | Query 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
- MCP access for AI agents: a remote OAuth endpoint (
/api/mcp/remote, managed provider pair only) and per-project API-key endpoints — see Remote MCP and the MCP Cloud guide - 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
| Layer | Current implementation |
|---|---|
| Framework | Nuxt 4 |
| UI | Radix Vue + Tailwind CSS 4 |
| Auth | Provider interface — Supabase Auth, or the built-in managed provider (JWT + OAuth + magic link) |
| Database | Provider interface — Supabase PostgreSQL, or any plain PostgreSQL (managed pair) |
| Git | Provider interface, currently GitHub App |
| AI | Provider interface, currently Anthropic |
| Provider interface, currently Resend | |
| Billing | Plugin registry, default Polar (MoR), Stripe fallback |
| CDN / Media | Enterprise 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 Edition | Enterprise Edition | |
|---|---|---|
| License | AGPL-3.0 + LICENSE-EXCEPTIONS |
AGPL core + ee/LICENSE (proprietary) |
ee/ directory |
Absent or not loaded | Present and loaded |
| Billing | Off | Polar / Stripe / flat-fee / off |
| Plan tier | Fixed community (unlimited) |
free / starter / pro / enterprise |
| Typical scenarios | AGPL self-host, forks, hosting resellers, local eval | Managed SaaS (studio.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.
| Profile | Edition | Billing mode | Plan source |
|---|---|---|---|
managed |
ee required | polar / stripe | subscription |
dedicated |
ee required | flat or subscription | operator or subscription |
on-premise |
ee required | off | operator-set (default enterprise) |
community |
agpl only | off | fixed 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.
Managed pricing: Starter $9/mo, Pro $49/mo, Enterprise custom. Starter and Pro start with a 14-day trial; free is the structural signup shell before a trial. The Contentrain open-source tools stay free (MIT, no account).
Plan-differentiated capability examples:
- AI usage, Studio-hosted key, BYOA (Pro+)
- CDN delivery and metering; preview branches and custom CDN domain are on the roadmap
- Media upload / library (Starter+), custom variants (Pro+)
- Review workflow and advanced project roles (Reviewer, Viewer)
- Conversation API (Pro+) and outbound webhooks
- Enterprise tier: SSO, white-label, and custom MCP domain are on the roadmap, not shipped yet
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:
- Environment Reference
- Editions — Community vs Enterprise feature matrix
- Deployment Profiles — 12 scenarios × profile × env
- Licensing Overview — SKU × license type × scenario
- Self-Hosting Guide
- Docker Guide
- Deployment Guide
- Payment Providers
- Forms
- Comments
- Migration Handoff
- Media Ingest
- Remote MCP
- Deploy Hooks & Scheduled Publishing
- Review Workflow
- Releasing Guide
- Repository Hygiene
- Contributing Guide
- Security Policy
- Code of Conduct
- Enterprise Edition README
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;mainHEAD 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
- Core: GNU Affero General Public License v3.0 +
LICENSE-EXCEPTIONS(AGPL §7(c) attribution + §7(e) no-trademark) - Enterprise directory: Proprietary license — Managed Use, On-Premises Deployment, Evaluation, OEM, and White-Label grants
- Dual-license index:
NOTICE
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.