Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/arrozet/caret/llms.txt

Use this file to discover all available pages before exploring further.

Caret is an agentic, AI-first document editor built for collaborative and structured writing. It addresses a critical gap in the market: while tools like Cursor and GitHub Copilot have fundamentally transformed how developers write code, document editing has remained largely stagnant. Existing solutions — Word’s Copilot, Google Docs’ Gemini — amount to little more than chat toggles bolted onto legacy editors, with minimal ability to actually understand, modify, or enhance a document’s content. Caret changes this by embedding true agentic AI capabilities directly into a rich document editing environment, where the AI can reason about your writing and act on it intelligently.

The Problem Caret Solves

The name Caret (^) is the symbol that marks where text will be inserted — a deliberate choice that ties the product’s identity directly to the act of writing. As a student-originated project, Caret starts from a genuine pain point: document writing is not nearly as agile as code writing with modern AI tools, and no major company is solving this effectively. Caret targets that underserved space with a focused, content-sovereign editor that puts agentic AI at its core rather than appending it as an afterthought.

Key Capabilities

Caret ships with a tightly integrated feature set across the editor, AI layer, and collaboration infrastructure. Rich Tiptap Editor — Built on Tiptap 3 and ProseMirror, the editor supports the full range of structured writing primitives: headings, lists, code blocks, tables, and more. The editing surface is designed around the Swiss Focus philosophy: minimal chrome, maximum content. Agentic AI Assistant — An AI panel (opened with Ctrl/Cmd+K) exposes two operating modes. In general mode the assistant responds conversationally; in analyst mode it performs deeper document reasoning. The AI can read, modify, and enhance document content rather than just suggesting text in a side panel. RAG Context Retrieval — The AI service stores document embeddings in Supabase’s pgvector extension, enabling retrieval-augmented generation. When the AI reasons about your document, it can draw on semantically relevant content from across your workspace. Real-Time Collaboration — A dedicated Y.js collab service delivers conflict-free real-time co-editing over WebSocket. Multiple users can edit the same document simultaneously with cursor presence and automatic state reconciliation. Workspaces and Folders — Documents are organized into workspaces and folders managed by the document service. Each workspace is a self-contained context for a project or team. Supabase Auth — Authentication is handled through Supabase, including JWT issuance and user profile management. Row-level security policies in PostgreSQL enforce access control down to the data layer.

Architecture Overview

Caret is built as a set of independent microservices, each responsible for a single domain, communicating through an API Gateway.
Frontend (React/Tiptap)
  | REST/SSE via /api/v1
  v
API Gateway (Express, port 3000)
  | /api/v1/auth       -> auth-service      (port 3001)
  | /api/v1/documents  -> document-service  (port 3002)
  | /api/v1/workspaces -> document-service  (port 3002)
  | /api/v1/folders    -> document-service  (port 3002)
  | /api/v1/ai         -> ai-service        (port 8000)

Frontend collaboration WebSocket
  -> collab-service /document/{doc_id}?token={jwt}  (port 3003)

All services
  -> Supabase Cloud (PostgreSQL + Auth + pgvector)
The collaboration service is intentionally kept off the API Gateway path. WebSocket connections are long-lived and use a different protocol from HTTP REST calls; routing them through the gateway would add unnecessary latency and complexity. The frontend connects directly to the collab service.

Tech Stack

LayerTechnology
FrontendReact 19, Vite, TypeScript, TailwindCSS v4, Tiptap 3, Y.js, TanStack Query, Zustand
API GatewayNode.js, TypeScript, Express
Auth ServiceNode.js, TypeScript, Express
Document ServiceNode.js, TypeScript, Express, Drizzle ORM
Collab ServiceNode.js, TypeScript, ws, Y.js
AI ServicePython, FastAPI, PydanticAI, SQLAlchemy async, Alembic
Database & AuthSupabase Cloud (PostgreSQL, Auth, pgvector)
InfrastructureDocker Compose, Hetzner VPS, Coolify, Cloudflare DNS
Caret’s UI is built around the Swiss Focus design philosophy: a minimal, focused aesthetic that keeps chrome out of the way and lets content take centre stage. The editor surface deliberately avoids clutter so that the document — not the toolbars — is the primary object of attention.

Explore the Docs

Quickstart

Clone the repo, add your Supabase credentials, and run the full stack locally with a single Docker Compose command.

Editor

Learn about the Tiptap-powered rich text editor, formatting primitives, and the Swiss Focus design system.

AI Assistant

Explore the agentic AI panel, general and analyst modes, RAG context retrieval, and keyboard shortcuts.

Collaboration

Understand how Y.js and the collab service deliver real-time conflict-free co-editing over WebSocket.

Architecture

Dive into the microservices topology, inter-service routing, and the Supabase data layer.

API Reference

Browse the REST API exposed by the API Gateway for workspaces, folders, documents, auth, and AI endpoints.

Build docs developers (and LLMs) love