claros
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 49 GitHub stars
Code Basarisiz
- network request — Outbound network request in apps/dashboard/public/claros.js
- execSync — Synchronous shell command execution in apps/dashboard/scripts/capture-readme-screenshots.mjs
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
Open-source, self-hosted lifecycle email engine for SaaS. Describe flows in plain language, AI drafts each email with your own key, and nothing sends until you approve. Runs on Docker and Postgres or Cloudflare Workers and D1, with an API and MCP server. MIT licensed.
Claros
The open-source lifecycle email engine. Your data, your transport, your LLM.
An AI-native alternative to Customer.io, Loops, and Mautic. Flows are written in plain language, compiled once by an LLM into a deterministic execution plan, and run by a deterministic engine. Self-host it with Postgres (one Docker image, one database, no Redis, no Kafka, no message broker) or on Cloudflare Workers + D1. One instance can serve several products.

Why it is different
Flows are prompts, compiled once. There is no drag-and-drop builder. You describe the flow ("welcome them, nudge them if they have not activated in 2 days, stop when they do"), the LLM compiles it into an inspectable plan, and the engine executes that plan deterministically. The AI never touches timing, targeting, or the send path.
The dashboard shows the compiled flow as a timeline: what starts it, each email with its wait, what ends it early. Open an email to write fixed copy in a code editor with a live preview, or to give the AI its instruction, examples and the links and knowledge base entries it may use. New flows start from an example (welcome, onboarding, trial ending, payment failed, win back, at-risk check-in), from a description, or blank.

Everything AI-written waits for a human. Generated emails queue in an approval workspace. You approve, reject or edit, tell the drafter what to change ("shorter, and mention the export feature") and get a revised draft, or let a trusted flow auto-send. The preview shows the mail as the recipient will see it, in the product's template, and a person card shows who it is going to. The AI drafts; you publish. The queue is also an MCP server: ask Claude what is waiting, then edit and approve from the chat.

Guardrails on what the AI writes. Drafts may only use the product's named links (any other URL fails the draft), follow find/replace and forbidden-phrase rules, and stay under a daily token budget. An assess step drops messages that are not worth sending. A step can limit itself to one call to action.
Templates you edit by talking to them. Pick one of seven built-in email templates (narrow or wide), open it in the template studio and say what you want: "center the logo", "make the header band dark navy", "16px body text". The preview updates as each change lands, in the light or the dark design, and the assistant keeps the two in step. The assistant only works on that template and knows how Outlook, Gmail, Apple Mail and Yahoo render email: ask for something that would break in one of them (a CSS background photo, a flexbox row) and it tells you what would happen where and offers a version that works everywhere. Every template keeps the unsubscribe footer, and deterministic client checks run on every change.

Your stack, your keys. Emails go through your Resend or SMTP account, or Cloudflare Email Service for transactional mail. AI runs against your OpenAI-compatible endpoint (OpenAI, Anthropic, Gemini, Groq, Ollama). The only infrastructure is Postgres, or your Cloudflare account on the Workers install. Nothing phones home.
A retention grid, not a vanity dashboard. Contacts are bucketed by tenure and recency into a 4x4 grid. Each cell is an audience you can act on: create a flow, see who is there, watch the trend. The grid adapts to your product's natural rhythm.

Several products, one instance
One Claros install serves as many products as you run. Each product is fully separate: its own contacts and events, flows and templates, topics and consent, transports and routing, brand, knowledge base, API keys and team. The same email address in two products is two contacts, and nothing crosses between them.
- People: one login per person, with a role per product (owner or member). Instance admins manage the install and act as owner in every product.
- Dashboard: with two or more active products it opens on a product picker; the sidebar switcher moves between them.
- API: ingestion keys belong to one product. Dashboard sessions and instance keys (
clr_ik_) pick the product with theX-Claros-Product: <slug>header. Instance keys script the install from CI: create products, give each an admin key, set up its transports. - Archiving: an archived product stays readable, refuses ingestion with
403and sends nothing until it is unarchived.
Products work the same on both runtimes. See Products.
Get running
Two install options run the same HTTP API and engine. Pick one.
| Docker + Postgres | Cloudflare Workers + D1 |
|---|---|
git clone https://github.com/claroshq/claros.git && cd clarosdocker compose run --rm installdocker compose up |
npx @claroshq/claros deploy --domain claros.example.com |
| Needs Docker; the compose stack bundles Postgres 16 + pgvector, or point it at your own Postgres | Needs a Cloudflare account; creates the D1 database, queues, secrets and Worker for you |
Upgrade: git pull, docker compose build, docker compose up (migrations run on boot) |
Upgrade: npx @claroshq/claros upgrade |
| Quickstart, Installation | Install on Cloudflare Workers + D1 |
Either way, open the claim URL printed at the end, enter your email, and you are the owner. The Quickstart walks through the rest: connect a transport, activate the library flow, send a test event, and receive a real email - all from the browser. Architecture lists the differences between the two backends.
What's new since 0.8
- 0.8.0: the Cloudflare Workers + D1 install option, multi-product instances, topics and consent, several transports per product, operational alerts, admin keys and config as code, signed webhooks and an analytics sink, date triggers, context sources, knowledge base v2, the
choosestep and send-history import - 0.8.4 to 0.8.7:
engagement_events(which events count as activity), brand logo upload, the dashboard product picker, an embedding provider separate from the LLM provider, knowledge base search without embeddings - 0.8.8 to 0.8.10: email templates and the template studio, the flow editor redesign, an email template per flow, notes, topic switches and delete / exclude actions on a person's page
- 0.8.11: importing event history and recomputing lifecycle state from it, for products that move to Claros with existing users
- 0.9.0: an MCP server, so you can work the approval queue and look up contacts and flows from Claude Code, Claude Desktop or any MCP client; the lifecycle state
churnedis returned asgone_quiet - 0.10.0: revise a draft with AI (reviewer instructions, kept on the message), Sent Mail shows each message as received in its template, with numbered pages
- 0.11.0: edit a person's name in the dashboard; an edited name is locked against identify calls until you release it
- 0.12.0 to 0.13.3: a Home overview (what needs you, the last 7 days, active flows, lifecycle movement) and Connect your AI, which sets up the MCP server for Claude Code, Claude Desktop, Cursor or VS Code; a dashboard visual revision with one named type scale
- 0.14.0: Claude works again as the LLM through Anthropic's OpenAI-compatible endpoint; the analytics sink sends contact traits
- 0.15.0: no silent drops: a failed batch item answers
503so the sender retries, conditions seepayment_status, a draft whose flow exit was met is cancelled, and the value gate shows its objection instead of holding a draft quietly - 0.16.0 and 0.17.0: the Approvals workspace (toolbar with keys, next draft opens, five-second undo, Approved and Needs attention tabs), a person card for the recipient, Refresh, double-click protection; the analytics sink in the dashboard and API
- 0.18.0: drafting backs off when the LLM provider rate-limits or fails instead of failing drafts; Needs attention groups failures by reason with retry and dismiss; the drafter knows common email practice by default
- 0.19.0 and 0.19.1: a Light / Dark switch for template previews, Add dark mode for templates without one, readable links and buttons in every built-in template's dark design
Postgres installs upgrade in place; Workers installs run npx @claroshq/claros upgrade. See the CHANGELOG for the full list and the upgrade notes.
What it does
- Lifecycle state machine - 7 contact states (
signed_upthroughresurrected) with engagement depth scoring and a payment overlay. Event-driven and time-driven transitions;engagement_eventschooses which events count as activity - Prompt-defined flows - compiled to deterministic plans. Triggers: events, lifecycle transitions, retention-grid and lifecycle segments, contact dates (
date_property,date_schedule) and manual enrollment. Steps with delays, conditions (all/any/not, traits, send history), send windows, exit conditions, context sources and thechoosestep. Each email is fixed copy or AI-drafted per contact. Edited as a timeline in the dashboard or as JSON in a config file. See Flows - Brain - compile, decide, draft, assess, choose, revise. Real LLM calls to any OpenAI-compatible endpoint, only at compile time, content time and in the template studio, never in timing, targeting or the send path. The drafter follows common email practice by default (sentence-case subjects, one point, at most one call to action, no leftover placeholders) unless your guidelines say otherwise. When the provider rate-limits or fails, drafting pauses and backs off (5 to 60 minutes, honouring
Retry-After) and resumes on its own, instead of failing drafts - Email templates and the template studio - seven built-in templates (
classic,letter,banner,compactnarrow;wide,broadsheet,canvaswide), each with a light and a dark design, custom copies, and a chat that edits a template with mail client knowledge built in; a Light / Dark preview switch and Add dark mode for a template without one; client checks for Outlook, Gmail, Apple Mail and Yahoo without the LLM. One template per product, and a flow can send in its own. See Email templates - Branding and language - logo (uploaded and served by Claros, or an external URL), accent color, Reply-To, postal address; the product
localesets the drafting language and the language of the mail footer and unsubscribe pages (English and Spanish) - Approval workspace - AI-drafted messages are held for human review by default; approve, reject, edit, revise with an instruction to the drafter, redraft, cancel or exclude a person; undo a decision for five seconds; a person card with the recipient's state, flows, notes and recent timeline; keyboard shortcuts for every action; per-flow auto-approve when you trust it; an optional daily digest of waiting approvals to the product's owners. See Approvals
- Needs attention - failed messages grouped by where they stopped (drafting or sending) and why, with what to do, a link to the setting that fixes it, and retry or dismiss per message or per group. Drafts the value gate held from an auto-send flow wait here too
- MCP server -
POST /v1/mcpon every install: connect Claude Code, Claude Desktop or another MCP client with an admin key and review the queue from the chat (what is waiting, read a draft, edit, revise, approve, reject, cancel, exclude a person), look up a contact and their timeline, list, pause and resume flows. Connect your AI in the dashboard creates the key and gives a ready snippet for each client. Approval only moves a message toapproved; the normal send checks still apply. Nothing is sent, configured or deleted from it. See MCP server - AI guardrails - named links and a link allowlist,
text_rules(find/replace and forbidden phrases), product guidelines,single_cta, a daily LLM token budget and the assess value gate - Event ingestion - Segment-compatible
/v1/track,/v1/identify,/v1/batch. Publishable and secret API keys, rate limits, browser snippet at/claros.js - Multi-product instances - one install serves several products, each with its own contacts, flows, topics, transports, brand, keys and team; per-product memberships, instance admins, instance keys (
clr_ik_) and theX-Claros-Productheader; a product picker in the dashboard; archive and unarchive. See Products - Transports - Resend (with open/click/bounce webhooks), generic SMTP (including the Amazon SES SMTP endpoint) and Cloudflare Email Service (transactional mail only). Several transports per product, routed by topic kind. See Transports
- Topics and consent - marketing, lifecycle and transactional topics with per-topic unsubscribe. See Topics
- Compliance built in - RFC 8058 one-click unsubscribe built in for lifecycle and marketing mail, a CAN-SPAM postal footer on every outgoing email, suppression list enforced before everything, a suppression API, and erasing a person (with their events and messages) in one product or across the instance
- Throttle and send windows - per-contact frequency caps, quiet hours, per-flow critical bypass;
scheduledflows run beside the nurture flow and still respect caps and windows - Link tracking - UTM parameters and a message id added to links on the product's domains at send time (never on unsubscribe or footer links)
- Knowledge base - entries with categories, pinning and per-contact deduplication, injected into compile and draft prompts; semantic search with an optional embedding provider (pgvector on Postgres), word matching without one; a guided import in the dashboard (Markdown, text, CSV, JSONL or JSON files, with a dry run before anything is written) and a bulk API (
POST /v1/kb/import, admin key scopekb) to keep it in sync from your own system. See Knowledge base - Config as code and admin keys - one JSON file of flows, templates, topics, routing, settings and webhooks, applied with
claros apply; scoped admin keys for the management API. See Config as code and API keys - Webhooks and analytics sink - signed outbound webhooks (Standard Webhooks) and flow and email events, with the contact's known traits, to StatsRaven or your own endpoint; set the sink in the dashboard, the API or the config file. See Webhooks
- Alerts and health - dead jobs, send and webhook errors and missing configuration mailed to an instance admin, plus a Health page. See Alerts
- Dashboard - React SPA: Home, Approvals, Flows, Templates, Knowledge Base, People, Lifecycle, Sent Mail, Analytics, Integrate, Connect your AI, Settings (including Health for instance admins). Home lists what needs you and the last 7 days. A person's page shows the profile, the timeline, topic switches, team notes and delete / exclude actions, and the name can be edited (and locked against identify). Sent Mail shows each message as the recipient received it, by day, with numbered pages. Light and dark themes
- History import - bring a product's earlier sends (counted for caps, re-entry and history conditions) and its event history, then recompute each contact's lifecycle state from those events without sending anything or firing flows. See Importing history
- Operator CLIs - in the Docker image: guided setup, login links, transport/LLM configuration, user recovery, deployment diagnostics.
npx @claroshq/claros: deploy, upgrade and diagnose a Cloudflare install, apply config, import knowledge base entries, send history and event history (with a lifecycle recompute)
Not yet built
- Calendar triggers not tied to a contact date (flows enroll on events, lifecycle transitions, segments, contact dates and manual enrollment today)
- SES API-mode transport and non-Resend feedback webhooks (SES works today through its SMTP endpoint)
- Knowledge base import from PDF or Word documents, and site crawl
- Anonymous identity stitching (contacts key on
userIdtoday) - Moving an existing Postgres install to D1 (Postgres installs stay on Postgres and upgrade in place)
Documentation
| Document | What it covers |
|---|---|
| Quickstart | Three commands to a running install, then a real email via the browser |
| Architecture | Components, the two install options, capability differences between backends |
| Installation and Configuration | Docker + Postgres: every run mode, every environment variable and setting, migrations, upgrading, backups |
| Install on Cloudflare Workers + D1 | npx @claroshq/claros deploy, bindings, upgrades, product hosts, local trial with wrangler dev |
| Deployment | External Postgres, multiple instances, the role split, secrets that must match |
| Concepts and Guides | The model: events, contacts, compilation, approvals, content modes. Task guides |
| Flow Prompt Library | Working prompts to paste into the flow editor |
| Ingestion | Sending events: curl, browser snippet, server SDKs, Segment compatibility, GTM |
| Flows, Email templates, Config as code, Products, Topics, Transports | Triggers and step fields, the config file, multi-product instances, consent, sending |
| API keys, MCP server, Webhooks, Approvals, Alerts, Knowledge base, Import | Integrating with your product and operating an instance |
| FAQ and Troubleshooting | Lost admin access, secrets, email not sending, AI features idle, backups, data egress |
| Contributing | Issues, pull requests, running the checks locally |
| Security | Vulnerability reporting |
Changes are recorded in CHANGELOG.md and on the releases page.
Development (from source)
Requires Node.js 22+ (with npm) and Postgres 16 with pgvector.
npm install
npm run db:migrate # apply migrations to DATABASE_URL from .env
npm run dev # API on :3000 (watch mode), dashboard dev server on :5173
Details and the production image are in Installation and Configuration.
License
MIT - see LICENSE. Bug reports welcome in GitHub Issues.
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi