Contentta is a modern, open-source CMS with AI-powered editing capabilities—think Cursor, but for content creation. Built on a scalable monorepo architecture, it features an intelligent Lexical-based editor with inline completions, agentic text editing, and a chat assistant to help you write, refine, and publish content faster.
Built on Lexical with deeply integrated AI assistance at multiple levels:
-
FIM (Fill-in-the-Middle) Completions:
- Copilot Mode: Inline ghost text suggestions as you type
- Cursor Tab Mode: Multi-line floating panel suggestions
- Diff Mode: Side-by-side replacement previews
- Auto-triggers on typing pauses, cursor movement, punctuation, and newlines
- Accept with
Tab, dismiss withEscape, manual invoke withCtrl+Space
-
Inline Edit (Ctrl+K):
- Select text and press
Ctrl+Kto open a floating prompt - Enter natural language instructions to transform selected text
- Streaming AI responses replace the original selection
- Full document context awareness for coherent edits
- Select text and press
-
Chat Assistant (Ctrl+L):
- Opens a right-side chat panel for interactive content discussion
- Send selected text as context to the AI
- Full document and selection context tracking
- Real-time streaming responses
-
Block-Based Editor:
- Tables, code blocks, horizontal rules, links, and checklists
- Drag-and-drop content organization
- Markdown shortcuts with extended transformers
- Smart paste handling for format preservation
-
Content Lifecycle:
- Draft, published, and archived states
- Auto-save with debouncing
- Bulk operations (delete, publish, archive)
-
SEO & Metadata:
- Title, description, slug, and keyword management
- SEO optimization built into the workflow
-
Writer Personas:
- Create custom AI writing personas with profile photos
- Define writing guidelines, audience profiles, tone, and style preferences
- Associate writers with content for consistent voice
-
Multi-Agent Orchestration (Mastra-powered):
- Content Agents: Editor, Writer, and Reader agents
- Specialized Agents: Researcher (Tavily web search), Strategist, Document Generator
- Workflows: Automated article and changelog creation pipelines
- Knowledge Base: Brand knowledge, competitor analysis, writing guidelines
- Home Dashboard: Content statistics, quick actions, recent content
- Content List: Data table with search, filtering, sorting, and bulk operations
- Writer Management: Statistics, analytics, and detailed writer pages
-
Authentication:
- Email/password and Google OAuth via Better Auth
- Magic link authentication
- Two-factor authentication (2FA)
- Session management with device tracking
-
Multi-tenant Architecture:
- Organization workspaces
- Team management and member invitations
- Role-based access control (Owner, Admin, Member)
-
Settings:
- Profile and security management
- Theme switching (Light/Dark/System)
- Language support (en-US, pt-BR)
- API keys management
- Notification preferences
- Billing integration (Stripe)
Contentta is a full-stack application built within an Nx monorepo using Bun.
| Category | Technology |
|---|---|
| Frontend | React, Vite, TypeScript, TanStack Router, TanStack Query, shadcn/ui, Tailwind CSS |
| Editor | Lexical (Rich text editor framework) |
| AI | Vercel AI SDK, Mastra (Agent orchestration) |
| Backend | ElysiaJS, Bun, tRPC, Drizzle ORM, PostgreSQL |
| Auth | Better Auth |
| Jobs | BullMQ, Redis |
| Storage | MinIO (S3 compatible for file/media storage) |
| Security | Arcjet (Rate limiting & DDoS protection) |
| Analytics | PostHog |
| Resend (Transactional emails) | |
| Landing | Astro (Static marketing site) |
| Tooling | Nx, Biome, Docker, Husky |
This project is a monorepo managed by Nx.
The deployable applications and websites.
apps/
├── dashboard/ # React/Vite SPA - main content editor interface
├── server/ # Elysia backend API server
├── worker/ # BullMQ background job processor
└── landing-page/ # Astro marketing website
dashboard: The core CMS single-page application (SPA) built with React, featuring the AI-powered content editor with file-based routing via TanStack Router.server: The ElysiaJS backend server providing the tRPC API, authentication endpoints, AI integrations, and file storage.worker: Background job processor using BullMQ for handling async tasks like AI processing, email delivery, and content scheduling.landing-page: Astro-based static marketing site with i18n support (Portuguese/English).
Shared internal libraries organized by concern. All packages use explicit exports in package.json.
| Package | Purpose |
|---|---|
api |
tRPC routers and type-safe API layer |
authentication |
Better Auth setup with OAuth, magic links, 2FA |
database |
Drizzle ORM schemas and repositories |
environment |
Zod-validated environment variables |
logging |
Structured logging with Pino and Logtail |
| Package | Purpose |
|---|---|
arcjet |
Rate limiting and DDoS protection |
cache |
Redis caching layer |
files |
MinIO S3-compatible file storage |
posthog |
Analytics tracking (client & server) |
queue |
BullMQ job queue abstractions |
stripe |
Stripe payments SDK wrapper |
transactional |
React Email templates with Resend |
| Package | Purpose |
|---|---|
encryption |
E2E encryption with NaCl (TweetNaCl) |
notifications |
Push notifications and alerts |
workflows |
Content workflow automation |
| Package | Purpose |
|---|---|
localization |
i18next with en-US/pt-BR support |
ui |
Radix + Tailwind component library |
| Package | Purpose |
|---|---|
utils |
Shared utilities (dates, formatting, errors) |
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the Apache-2.0 License. See the LICENSE.md file for details.