Contentrain Studio — governed content for teams and AI agents

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.

License: AGPL-3.0 CI Open Core Issues

--- ## 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](https://nuxt.com/). Teams can self-host the AGPL core or use the managed service at [studio.contentrain.io](https://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/`](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`](https://github.com/Contentrain/ai), MIT, [ai.contentrain.io](https://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](https://studio.contentrain.io), docs at [docs.contentrain.io](https://docs.contentrain.io)) — the team surface for reviewing, governing, and delivering that content. - **Migrate** ([migrate.contentrain.io](https://migrate.contentrain.io)) — a paid service that moves a WordPress site to Astro. Each run writes `contentrain-handoff.json` into the generated repository, and Studio reads it when that repository is connected ([Migration Handoff](docs/MIGRATION_HANDOFF.md)). - **Bridge** ([`Contentrain/wordpress-bridge`](https://github.com/Contentrain/wordpress-bridge), [WordPress.org](https://wordpress.org/plugins/contentrain-bridge/)) — 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`](https://github.com/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](https://ai.contentrain.io/packages/mcp) | | `contentrain` CLI | `init`, `serve`, `generate`, `diff`, `validate` | Studio takes over when teams need a web surface, project management, and approval | [CLI](https://ai.contentrain.io/packages/cli) | | `@contentrain/rules` | Shared quality and schema standards | Studio chat, review, and validation should stay aligned with the same rules | [Rules & Skills](https://ai.contentrain.io/packages/rules) | | `@contentrain/skills` | Agent playbooks and workflow hints | Studio mirrors these workflows in onboarding, chat-led operations, and handoffs | [Rules & Skills](https://ai.contentrain.io/packages/rules) | | `@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](https://ai.contentrain.io/packages/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](docs/REMOTE_MCP.md) and the [MCP Cloud guide](https://docs.contentrain.io/developer/mcp-cloud) - 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: - [Enterprise README](ee/README.md) - [License](LICENSE) - [Security Policy](SECURITY.md) ## Architecture at a Glance ```text 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 | | Email | 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](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](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`](shared/utils/license.ts) and [`.contentrain/content/system/plan-features/`](.contentrain/content/system/plan-features/). Feature gating runs through `hasFeature(plan, key)` with the current edition applied. For license inquiries, see [docs/LICENSING.md](docs/LICENSING.md) and contact `info@contentrain.io`. ## Repository Structure ```text 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](https://supabase.com/docs/guides/cli) for the default local database/auth flow (or any plain PostgreSQL for the managed pair) ### Local Development Option A — Supabase pair (default): ```bash 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): ```bash 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](.env.example) - [Editions](docs/EDITIONS.md) — Community vs Enterprise feature matrix - [Deployment Profiles](docs/DEPLOYMENT_PROFILES.md) — 12 scenarios × profile × env - [Licensing Overview](docs/LICENSING.md) — SKU × license type × scenario - [Self-Hosting Guide](docs/SELF_HOSTING.md) - [Docker Guide](docs/DOCKER.md) - [Deployment Guide](docs/DEPLOYMENT.md) - [Payment Providers](docs/PAYMENT_PROVIDERS.md) - [Forms](docs/FORMS.md) - [Comments](docs/COMMENTS.md) - [Migration Handoff](docs/MIGRATION_HANDOFF.md) - [Media Ingest](docs/MEDIA_INGEST.md) - [Remote MCP](docs/REMOTE_MCP.md) - [Deploy Hooks & Scheduled Publishing](docs/DEPLOY_HOOKS.md) - [Review Workflow](docs/REVIEW_WORKFLOW.md) - [Releasing Guide](docs/RELEASING.md) - [Repository Hygiene](docs/REPOSITORY-HYGIENE.md) - [Contributing Guide](CONTRIBUTING.md) - [Security Policy](SECURITY.md) - [Code of Conduct](CODE_OF_CONDUCT.md) - [Enterprise Edition README](ee/README.md) ## Testing ```bash 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: - [security@contentrain.io](mailto:security@contentrain.io) See [SECURITY.md](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](docs/RELEASING.md). ## Contributing Community contributions are welcome for the AGPL core. Before opening a PR, read: - [CONTRIBUTING.md](CONTRIBUTING.md) - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) - [SECURITY.md](SECURITY.md) ## License - Core: [GNU Affero General Public License v3.0](LICENSE) + [`LICENSE-EXCEPTIONS`](LICENSE-EXCEPTIONS) (AGPL §7(c) attribution + §7(e) no-trademark) - Enterprise directory: [Proprietary license](ee/LICENSE) — Managed Use, On-Premises Deployment, Evaluation, OEM, and White-Label grants - Dual-license index: [`NOTICE`](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](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, Inc.