Mango

Available

Grow your audience and send newsletters with reviewed content and delivery reporting.

Mango is available as MIT-licensed source for self-hosting. See its public source and release documents for setup. Business can also install and run projects for invited accounts; the app shows whether it offers Mango before checkout.

Run Mango on your own computer with one line:

npx -y @runeditrun/rer dev just-every/run-mango

It clones the public source, installs it, sets up a local owner and starts the app; nothing is deployed. To set up without starting, run npx -y @runeditrun/rer setup just-every/run-mango. Without Node 22 or later, run curl -fsSL https://runeditrun.com/install.sh | sh -s -- dev just-every/run-mango.

For HappyToHelp: Assisted is in early access; Managed is in early access.

Category
marketing
Licence
MIT
Version
0.3.0
Requirements
87 clauses
Release signature
Signed by just-every · key rer-ed25519-5a42fb9c9c4f8acb2b32386e9e40461c · statement
Target release
v0.3.0 · published
Publisher’s stage
newsletter-release-candidate
Instead of
Mailchimp, Klaviyo

Screenshots

Mango v0.3.0 contact ledger at 1600 pixels: saved sample contacts with channel-specific email and SMS consent and last activity, from the product screenshot named in RELEASE.json.

Mango screenshot 1: mango contact ledger 1600

Outside services

The services the project declares it sends data to, each with its reason.

commerce-store
Mango needs the buyer's real customers, products, carts, browsing signals, orders, refunds, and inventory to identify and recheck opportunities.
ai-provider
A language model turns structured evidence into reviewable campaign content and explanations; Cloudflare primitives do not provide that model capability.
design-provider
An image-generation design service (12ui, reached with the owner's own API key) turns an operator's brief into candidate email designs and a structured layout; Cloudflare primitives do not generate designs. It is contacted only when an operator asks for designs or chooses one, never otherwise. Privacy: No contact, audience, personalisation value or token is sent. 12ui's sub-processors are OpenAI, fal.ai, Google and Cloudflare, and 12ui may keep briefs and images in its internal evaluation corpus until the account owner asks for deletion. 12ui's generated artifacts expire after 7 days, so Mango stores the candidates and layout it uses in its own R2 bucket.
mail-sender
Internet email delivery, domain authentication, bounce handling, and complaint feedback require a delivery provider with established sending infrastructure. Managed hosting explicitly selects RER for transactional sign-in and subscription confirmations; Free and Assisted hosting retain their own-provider connections.
sms-sender
Registered sending numbers, carrier routing, country approval, compliance keywords, and delivery receipts require a telecommunications provider.
link-dns-resolver
A public DNS-over-HTTPS resolver verifies that each approved external link, image and redirect target resolves outside private networks before dispatch. Images this deployment stores itself at /media/ are verified in its own storage and never resolved or fetched.
signup-turnstile
Optional abuse prevention on hosted and embedded signup. Only a trusted pointer or keyboard interaction with the form loads the browser challenge. The server verifies the token before accepting consent.
sender-dns-resolver
Cloudflare DNS-over-HTTPS verifies sender domain authentication records before dispatch.
approved-content-destinations
Dispatch preflight checks explicitly approved external links and images, including each allowed redirect, for reachability after DNS safety checks.
owner-editor
An authenticated owner can open the configured Run Edit Run editor and explicitly share page context for requested visual edits.
sender-receipt-receiver
An installer-selected authenticated receipt service supplies original diagnostic email and trusted authentication observations before marketing sending is enabled. The optional paired MAILBOX_RECEIPT_URL and MAILBOX_RECEIPT_RECIPIENT inputs select its HTTPS origin, secret URL token and diagnostic mailbox; redirects and off-origin responses are refused.

Scope and limits

One self-hosted newsletter and its role-controlled operators. Mail is required; commerce, SMS, AI and email design are optional. Wider commerce and multichannel contract clauses remain release obligations.

What it will not do

  • Multiple stores or workspaces
  • A general CRM
  • Signup-form, landing-page, and website builders
  • Social and advertising campaigns
  • Store transactional messaging (order, shipping, and account notifications)
  • Autonomous sends
  • Visual journey automation
  • A/B and multivariate testing
  • Predictive send-time models
  • Multi-touch attribution
  • Purchased-list prospecting
  • Native mobile apps

Extension points

Optional conveniences for common changes. Owners can change any source, including core logic, schema and infrastructure.

  • operator.management.v1
  • contact.opt-in.v1
  • contact.soft-bounce.v1
  • proposal.selection.v1
  • audience.exclusions.v1
  • audience.frequency.v1
  • campaign.send-time.v1
  • sms.quiet-hours.v1
  • campaign.attribution.v1
  • store.event-recorded.v1
  • contact.consent-recorded.v1
  • contact.channel-suppressed.v1
  • contact.merged.v1
  • proposal.created.v1
  • proposal.failed.v1
  • campaign.scheduled.v1
  • campaign.dispatch-paused.v1
  • campaign.cancelled.v1
  • campaign.completed.v1
  • delivery.outcome-recorded.v1
  • app.navigation.after.v1
  • decision-desk.header.after.v1
  • proposal.evidence.after.v1
  • proposal.actions.before.v1
  • campaign.review.summary.after.v1
  • campaign.review.audience.after.v1
  • campaign.review.safety.after.v1
  • campaign.detail.tabs.after.v1
  • contact.detail.tabs.after.v1
  • settings.sections.after.v1
  • commerce.store.v1
  • ai.provider.v1
  • design.provider.v1
  • mail.sender.v1
  • sms.sender.v1
  • platform.link-inspector.v1
  • routes.v1
  • pages.v1
  • navigation.v1
  • settings.sections.v1
  • jobs.v1
  • cron.v1
  • queue.consumers.v1

Declared limits

Status
estimated-until-load-tested
Max Contacts
100,000
Max Stored Commerce Events
5,000,000
Max Contact Import Rows
50,000
Max Campaign Steps
10
Max Eligible Contacts Per Campaign
100,000
Max Campaign Asset Bytes
10,485,760
Allowed Campaign Asset Content Types
image/jpeg, image/png, image/gif, image/webp
Max Campaign Asset Pixels Per Side
4,096
Max Email Html Bytes
102,400
Max Sms Segments Per Recipient Step
3
Email Handoffs Per Minute
3,000
Sms Handoffs Per Minute
600
Deliverability Reporting Window Days
30
Operator Requests Per Minute
300
Public Requests Per Minute Per Ip
60
Unsubscribe Requests Per Minute Per Token
10
Media Requests Per Minute Per Asset
6,000
Provider Webhooks Per Minute
5,000
Provider Reconciliation Interval Minutes
15
Unresolved Provider Outcome Hours
1
Max Test Sends Per Day
100

Requirements

All 87 clauses of Mango’s CONTRACT.md. They say what the project must do; the handover and verification records say what is built and tested.

HOME 1 clause

  1. HOME-001
    Lobby and public landing An installed Mango answers its sessionless root (/) with Base's shared Lobby (src/base/lobby.ts, edition identity in src/identity.ts): Mango's mark and name, one line about this newsletter, and one action, “Finish setup” (/setup) until the owner has saved the sender identity at first-run setup and “Sign in” (/signin) after; GET /setup/state answers exactly {"state":"unclaimed"} or {"state":"claimed"} from the same reading (owner decision, 12 October 2026). The landing below is the run site's homepage (run-mango.com, built by rer build --site from src/site/pages.tsx), where the primary action reads “Run Mango” and opens the Run page (/run) and no link reaches sign-in; everything else about it is unchanged. The landing is a static page for Mango's default newsletter profile, drawn in one hand-illustrated style. Its header carries Mango's mark and name with links to How it works, Docs (/docs) and, on an installed Mango's docs pages, the page's only link named “Sign in” (/signin). Its hero headline is the page's only top-level heading; directly under the lead, one line reads “100% free, open source alternative to Mailchimp and Klaviyo” with the two product names in bold and the wording unchanged (the same sentence, as plain text, ends the page's meta description, and seed.json replaces names both products), naming what Mango replaces without comparing against it; the hero offers “Start your newsletter” (/docs/install) and “Read the docs” (/docs). Sections then cover how a letter leaves Mango (collect, write, approve, schedule, deliver), consent, approval of the exact letter, scheduling, delivery reports and ownership, followed by a closing call to action; the footer repeats the section links, Docs and (on an installed Mango) operator sign-in and shows the configured deployment owner's name and one-line description. It may show the static credit Powered by Mango · runeditrun.com only when the owner enables it in configuration. It describes only capabilities the newsletter profile ships and contains no vendor pricing, testimonials, customer logos, ratings, metrics, cross-store claims, third-party brand logos or telemetry; sample addresses, names, counts and dates inside its drawings are pictures, never records. It reads no operator, contact or campaign record and no session, sets no cookies, is written once by the site build, serves every font, style, icon and image from the site's own origin (its drawings are inline), keeps its own fixed light palette in a dark-themed browser, and stays fully readable without scripts and with reduced motion.

DOCS 1 clause

  1. DOCS-001
    Public documentation The public paths /docs and /docs/<slug> serve Mango's first-party operator documentation: the Markdown files that docs/site.json lists as published, in the sections and order it gives, which is the only navigation, with the first page as the docs home at /docs (and /docs/). The Markdown is rendered to HTML at build time: a Vite plugin renders each page to static HTML when Vite loads it, in a build and in development, and never in the Worker or the browser. The emitted Worker and client bundles contain no Markdown or syntax-highlighting code, and each page is its own lazily loaded chunk that the Worker renders per request. A page has its title as its one top-level heading, a section sidebar listing the pages in manifest order with the current one marked, an on-this-page list of its sections, previous and next links, and a "Contents" disclosure for narrow screens, inside the public landing's shared header (with Docs marked as the current section) and footer, in the landing's palette, faces and paper drawings. Every Markdown file at the repository root, under docs/ and as a top-level <directory>/README.md is either published or listed in the manifest as not published with a reason, and an unlisted file, a broken link or anchor, a link to a page the site does not publish, raw HTML, an image outside docs/media/ or an absolute build-machine path fails verification or the build. The pages link to no source repository and offer no edit link. Published pages describe the default newsletter profile and contain no maintainer-only material. The documentation reads no workspace record, session or database row, sets no cookie, runs no analytics or tracking and loads only same-origin resources. An unknown, miscased or nested slug, and /docs/index, answer 404 with a short not-found page in the same shared header and footer that links back to /docs and /; a request for another host is answered as it is for every other path.

OPER 3 clauses

  1. OPER-001
    Operators and the default role Until an owner assigns roles (OPER-004), every operator holds the Admin role and can see and act on every proposal, campaign, flow, contact, and setting. First-run /setup requires a native session and valid business sender identity before app documents open, on both server and client navigation. Saving through the existing sender settings authority completes setup; valid existing environment identity also counts. This navigation gate does not deny authenticated configuration APIs or claim provider readiness.
  2. OPER-002
    Management Operators are invited and removed in settings. An invitation requires fresh email proof from the signed-in operator; a session without that proof cannot grant another operator access. Settings can request a confirmation link bound to the current session so the operator can confirm and retry the invitation. Confirmation GET and HEAD remain read-only; affirmative POST supplies the proof. The operator configured at setup can be removed only by themselves. Policy: operator.management.v1; default: any operator may invite with fresh email proof or remove.
  3. OPER-003
    Removal does not rewrite history Removing an operator revokes their sessions and leaves every proposal, approval, revision, and audit entry attributed to them intact.

STORE 7 clauses

  1. STORE-001
    Store and event connections One or more connections (Shopify, WooCommerce, BigCommerce, Stripe, Square, Stall and the events API: INT-001 to INT-007), each made by the owner from Settings with no developer step (for Shopify, INT-015), import customers, products, variants, inventory, orders, refunds, carts, checkouts, subscriptions and browsing events through commerce.store.v1, retaining each source record's identifier, connection and occurrence time. Each connection declares the source types it supplies (STORE-006); a contact seen through two connections is one contact (CONT-001) with both sources' records.
  2. STORE-002
    Source identity A commerce webhook or scheduled sync carrying a source identifier already stored updates that source record; it never creates a second customer, order, cart, refund, or browsing event.
  3. STORE-003
    Freshness The Decision Desk shows, per source type, the completion time of the last successful sync and the error of any sync that has failed since it.
  4. STORE-004
    Source failure If the configured commerce adapter is unavailable, ingestion and proposal generation record a failed operation carrying the adapter's error; saved drafts and already recorded delivery outcomes remain readable and no campaign is sent as a side effect.
  5. STORE-005
    Stale sources block approval A source type is stale when its last successful sync completed more than 24 hours ago or a sync has failed since it. A proposal or campaign whose inclusion or exclusion rule reads a stale source type is labeled stale and cannot be approved until that source type syncs successfully.
  6. STORE-006
    Declared adapter capability The commerce connection declares which source types it supplies. An audience rule, exclusion, or proposal that requires a source type the connection does not supply is shown as unavailable and cannot be approved; it never resolves to an empty or partial audience.
  7. STORE-007
    Ingestion latency A source record from an accepted commerce webhook is readable in the operator app within 60 seconds of the webhook being acknowledged.

CONT 13 clauses

  1. CONT-001
    Contact identity Email addresses are compared case-insensitively after trimming, phone numbers are stored in E.164 form, and one canonical email address or phone number identifies at most one contact.
  2. CONT-002
    Channel status Each contact has an independent state per channel: pending (consent captured, confirmation outstanding), subscribed, non-subscribed (no consent evidence recorded), unsubscribed (opted out), or suppressed (blocked by CONT-006 or CONT-013). Only subscribed is eligible for a marketing send. Store activity or consent on one channel never changes the other channel's state.
  3. CONT-003
    Consent evidence Every subscription stores the channel, brand or legal sender, SMS sender or program where applicable, message subject or category, disclosed frequency, destination jurisdiction, capture method and source, occurrence time, consent text and version, and confirmation evidence. Consent applies only to that recorded scope and current recipient; a capture or import without the evidence creates a non-subscribed contact, except where the contact arrives subscribed from an incumbent or a connected store with the incumbent-held evidence CONT-024 defines, and a phone number reported as reassigned or no longer belonging to that recipient becomes non-subscribed until fresh evidence is captured.
  4. CONT-004
    Opt-out precedence An email unsubscribe, one-click unsubscribe, or SMS opt-out sets that channel to unsubscribed before the request is acknowledged, and excludes it from every draft, scheduled campaign, and queued recipient-step. Later imports, syncs, store events, merges, or operator edits never reverse it. During a parallel run (MOVE-013), opt-outs and suppressions the incumbent reports apply the same way, and Mango's are written back to the incumbent.
  5. CONT-005
    Resubscription A previously unsubscribed channel becomes subscribed only from new affirmative consent evidence recorded after the opt-out and confirmed per CONT-009. A suppressed channel also requires the suppression cause to be resolved. An operator edit alone cannot resubscribe either state. A person resubscribes themselves through a public form under CONT-027. During a parallel run (MOVE-013), a confirmed resubscribe is written back to the incumbent as subscribed where its API allows; otherwise it is listed in the cutover report (MOVE-006).
  6. CONT-006
    Email suppression A hard bounce, spam complaint, or provider suppression suppresses that email address before the next hand-off to any campaign. Soft bounces are recorded and visible, and suppress the address according to the bounce policy; a later provider-confirmed delivery resets its consecutive-soft-bounce count. These facts arrive through the signed delivery webhook Mango creates when the sending provider is connected (DELIV-008); an installation whose webhook step has not passed cannot approve, so no address keeps being mailed after a bounce Mango could not see. Policy: contact.soft-bounce.v1; default: suppress after three consecutive soft bounces. - 2026-10-08 local authority clarification (CONT-004/006, OPER-001): Refreshing local session/setup credentials while retaining D1 preserves the effective contact hash authority, including suppression and surviving opt-out records without contact rows. New local installations record a versioned independent contact salt in .dev.vars; missing, empty, unknown-version or unversioned authority fails closed. Explicit conversion of a verified legacy session-key installation retains its original effective session authority before rotating authentication credentials. An upgrade must never select a previously unused secret merely because it exists.
  7. CONT-007
    SMS compliance replies A signed inbound SMS webhook consumes the adapter's canonical result for that sender, program, and destination jurisdiction. STOP, STOPALL, END, QUIT, CANCEL, UNSUBSCRIBE, OPTOUT, and REVOKE always opt out; HELP and INFO request help; START and UNSTOP begin the fresh-consent flow required by CONT-005 and never subscribe by themselves. Mango records each reply once and applies an opt-out before acknowledging the webhook. It returns the configured compliance response only when the provider has not already sent the required reply.
  8. CONT-008
    Contact history A contact page shows source activity, consent changes, suppressions, campaign eligibility decisions, channel deliveries, and operator actions in time order. Acceptance: the native Worker/D1 contact-history journey shows those categories together at their original occurrence times, including confirmation, approved eligibility, dispatch exclusions, channel hand-offs and provider outcomes. At 1440 and 390 pixels, older events remain reachable, unrelated contacts and private payloads remain absent, and each event retains its source.
  9. CONT-009
    Confirmation Where the opt-in policy requires confirmation for a channel, a contact captured with consent on it enters pending and receives one confirmation message on that channel; following its opaque per-contact confirmation link sets the channel to subscribed and stores the confirming request's time. A pending channel receives no marketing send, and a confirmation link stops working 30 days after it is issued. Where the policy does not require confirmation, the captured consent evidence of CONT-003 sets the channel to subscribed directly. An operator chooses single or double opt-in per form and per source under CONT-025. Policy: contact.opt-in.v1; default: confirmation is required on both channels for Mango's own forms, popups, landing pages and API captures; CONT-025 states each source's default.
  10. CONT-010
    Import An operator imports contacts from a CSV whose rows carry an email address or phone number and, optionally, the consent evidence CONT-003 requires. Each row is validated independently; a row matching an existing canonical identifier updates that contact rather than creating a second; re-running the same file changes nothing further. The import reports created, updated, and rejected row counts with a reason per rejected row, and never sets a channel to subscribed for a contact CONT-004 has unsubscribed. A file the owner names as an export from another platform can carry that platform's subscribed status as incumbent-held evidence (CONT-024) under the owner's once-per-source attestation; a file with no named source stays under CONT-003's per-row rule. One review holds up to the import-row floor SCALE-001 sets.
  11. CONT-011
    Merge An operator can merge two contacts. The surviving contact keeps the union of source activity, consent records, campaign history, and suppressions, and takes the most restrictive state per channel: suppressed beats unsubscribed, which beats non-subscribed, which beats pending, which beats subscribed. A merge cannot resubscribe a channel.
  12. CONT-012
    Dormancy without deletion A contact with no recorded click, order, or consent change inside the dormancy window is labeled dormant and excluded by the audience policy (AUD-003, AUD-008). Each of these counts at the time it originally happened, including clicks, orders and consent changes a move-in imports with the time the incumbent recorded (MOVE-001 to MOVE-005, MOVE-009); opens never count. A contact whose move-in carried no engagement history for them is labeled no-history, not dormant, and their dormancy window starts when that move-in completed, so a migrated list is never excluded as dormant for lack of history Mango was never given. A dormant contact whose only imported activity inside the window is opens is labeled open-only within dormant, because Apple Mail Privacy Protection and image proxies make those opens unreliable (RESULT-002). Mango never deletes, unsubscribes, or suppresses a contact for inactivity; BASE-DATA-002 stands, and clearing a dormant list is an operator action.
  13. CONT-013
    Erasure and surviving opt-out Deleting a contact removes their profile, source activity, consent evidence, message content, and delivery detail within five minutes, confirms completion, and anonymizes their actor identity in retained audit entries as BASE-DATA-003 requires. For each known unsubscribed or suppressed channel identity, including opted-out aliases, it retains an opt-out record with a one-way destination hash keyed with the installation secret, the channel, reason, and time. It also retains the audience_portable_hashes mapping from that local hash to the unsalted SHA-256 of mango-audience-export-v1: followed by the destination. Contacts CSV exports carry restrictions under this portable hash even after erasure, and complete local archives carry the retained mapping. These values contain no readable address but are not anonymous: a holder of a mapping or export can compare hashes of guessed addresses or an address dictionary without the installation secret, and the stable portable hash allows matching across installations and exports. Treat the retained mappings and exports as sensitive personal data. A later import, sync, or capture matching the local or portable identity preserves the restriction; erasure opt-outs make that channel unsubscribed. The person's own confirmed resubscribe through a public form is the one way back, and only for an unsubscribe or erasure reason, never a suppression (CONT-027). Supersedes BASE-DATA-003 only for this opt-out dependency, including its retained portable mapping and exported hashes; all of that baseline clause's other guarantees and all other personal-data entities remain unchanged. For subscribed identities with no surviving restriction, erasure removes all mapping aliases and retains no address-derived row tombstone. Restore uses source-wide epoch floors: any archive older than known local or supplied current matching authority is refused in full, including unaffected older archives. Nonempty legacy row journals are refused before staging. Upgrade 0044 retires legacy journals and transfers after advancing every known source floor; offline copies without current authority cannot reveal later erasure.

PROP 9 clauses

  1. PROP-001
    Decision Desk The Decision Desk lists proposals in the proposed state ordered by the proposal policy, highest-ranked first. Policy: proposal.selection.v1; default: rank by expected revenue where this deployment has enough of its own attribution history (RESULT-003) to estimate it, then by the earliest send-by instant; proposals with neither rank last.
  2. PROP-002
    Evidence A proposal names its triggering source events, lookback window, inclusion rule, exclusion rule, source-data as-of time, send-by instant, proposed channels and step instants, and the method behind every forecast or confidence label.
  3. PROP-003
    Counts A proposal distinguishes candidates, excluded contacts, eligible contacts, and per-channel recipient-steps. No count is labeled recipients until exclusions have been applied.
  4. PROP-004
    Content A proposal contains an editable campaign name, email subject and body, SMS body when SMS is proposed, sender identity, destination links, and a preview for every selected channel.
  5. PROP-005
    Owner control A generated proposal is a draft and cannot schedule or send anything until an operator explicitly approves a particular saved revision.
  6. PROP-006
    Grounded generation AI-generated audience explanations, timing claims, and forecasts use only this deployment's imported store data and configured knowledge, supplied to ai.provider.v1. A generation containing a claim not derivable from that evidence is rejected and the proposal is marked failed per PROP-007; no generic marketing copy is substituted.
  7. PROP-007
    Generation failure If the configured AI adapter returns invalid output or does not complete within 60 seconds, the proposal is marked failed carrying the provider error, no semantic fallback is created, and existing proposals and campaigns are unaffected.
  8. PROP-008
    Forecast provenance Every revenue, recovery-rate, or confidence figure names the deployment's own campaigns and store events it was computed from and the number of them. Mango never presents a benchmark drawn from other stores, and where its own history is too thin to compute a figure it says so instead of showing a range.
  9. PROP-009
    Proposal states A proposal is proposed, approved (an operator approved a revision and a campaign exists), dismissed (an operator rejected it, with the reason recorded), expired (its send-by instant passed), or failed (PROP-007). Only a proposed proposal can be approved or dismissed, and every transition records its actor and time.

AUD 7 clauses

  1. AUD-001
    Review snapshot Campaign review shows the audience rule and as-of time, candidate count, each exclusion reason with its count, eligible contact count, and the recipient-step count per channel.
  2. AUD-002
    Consent and suppression Contacts whose state on a channel is pending, non-subscribed, unsubscribed, or suppressed are excluded from that channel regardless of segment membership or an operator-authored inclusion rule.
  3. AUD-003
    Commerce and dormancy exclusions Contacts excluded by the audience policy are listed in review with their reason and count. Policy: audience.exclusions.v1; default: exclude a contact from a product campaign for seven days after purchasing that product, while a refund or return of it is unresolved, and while the contact is dormant under a twelve-month dormancy window (CONT-012). AUD-008 states which inactivity rule governs a send, what counts for migrated contacts and how an operator turns the dormancy exclusion off for one campaign.
  4. AUD-004
    Frequency protection A contact inside the channel's frequency window is excluded from that step and recorded with the reason frequency-window, never silently deferred to a later time. Policy: audience.frequency.v1; default: 24 hours since the contact's last marketing email and 72 hours since their last marketing SMS. AUD-009 states how these windows combine with FLOW-014 caps and how an operator overrides them for one campaign, with the override recorded.
  5. AUD-005
    Dispatch recheck Eligibility is recalculated when a step's dispatch begins and again immediately before each provider hand-off, so a purchase, refund, opt-out, bounce, complaint, consent change, merge, or frequency-window change after approval prevents that delivery and is recorded as the exclusion reason. Every source type used by the audience must still satisfy STORE-005; if refresh fails or the source becomes stale, the affected channel pauses before any further hand-off and resumes only after a successful refresh.
  6. AUD-006
    Multi-step exit Each later step re-applies its audience and exclusion rules; a contact who converts or becomes ineligible after an earlier step receives no later step. Status: done. The two-step journey (tests/go-live/multistep.journeys.ts) exercises saved inclusion rules, custom exclusions and current consent after the first send, records each skip reason, and keeps newly matching contacts outside the frozen approved audience.
  7. AUD-007
    Frozen candidate set Approval freezes the candidate set resolved at that instant. A contact who first matches the inclusion rule after approval is never added to the approved campaign, and each contact yields at most one recipient-step per channel per step even when they match the rule more than once. Exclusions still apply at dispatch (AUD-005).

CAMP 12 clauses

  1. CAMP-001
    States A campaign is draft (editable, nothing scheduled), scheduled (an approved revision with a future step instant), dispatching (a step has begun handing off), paused (dispatch stopped by SEND-009), completed (SEND-007), canceled (CAMP-009), or failed (its first step could not begin before its deadline because a required adapter or sender registration was unavailable). Every transition records its actor or the feature that acted, and its time; an invalid transition is rejected.
  2. CAMP-002
    Draft editing Operators can edit and persist the campaign name, selected channels, audience rule, message content, sender identity, links, and schedule while a campaign is a draft. An email body saves whenever its sent size is within BUILD-012's limit; a larger one is refused with its measured size and the limit named, never truncated.
  3. CAMP-003
    Revision preview Desktop, mobile, and plain-text previews render from the saved revision that will be approved, including resolved personalization examples and the compliance footer or SMS opt-out text that will be sent.
  4. CAMP-004
    Approval checks Approval atomically validates the audience, consent, source freshness (STORE-005, including incumbent sync freshness during a parallel run, MOVE-013), sender registration, email authentication, sending reputation (MSG-011), compliance content, personalization, links (MSG-006, MSG-013 to MSG-015), schedule, and adapter configuration. A sender adapter must provide effective deduplication and provider reconciliation as required by SEND-001 and SEND-008. Any failure leaves the campaign a draft and names every blocking check.
  5. CAMP-005
    Idempotent approval Repeated approval requests carrying the same campaign and revision identifier produce one scheduled campaign and one set of steps and recipient-steps, whatever the number of requests.
  6. CAMP-006
    Schedule Each step stores an IANA time zone and the resolved UTC instant. A local time that does not exist or is ambiguous under daylight saving is rejected until the operator chooses an unambiguous instant. Policy: campaign.send-time.v1; default: resolve every step against the store time zone and the operator-selected local time.
  7. CAMP-007
    Scheduled edits Editing a scheduled campaign creates a new draft revision and leaves the approved revision active until the replacement passes approval. Replacement approval atomically makes the new revision the campaign's only active schedule and cancels every pending recipient-step of the prior revision. Once any step has begun dispatching, edits can only create a new campaign; the original campaign and its later steps remain active until the operator explicitly cancels them.
  8. CAMP-008
    Test send A test sends only to the configured operator test addresses or phone numbers, or to the typed addresses CAMP-019 admits, is visibly marked as a test in its content and in campaign history, and changes no contact activity, reporting, attribution, or frequency protection.
  9. CAMP-009
    Cancellation Canceling a scheduled, dispatching, or paused campaign stops every step and every recipient-step confirmed not handed to a provider within 30 seconds, records provider-confirmed hand-offs separately, and leaves an in-flight request in handoff-unknown until SEND-008 reconciles it. It never claims to recall a delivered message. Campaign detail shows the time remaining until the next step dispatches.
  10. CAMP-010
    Step deadline Each step carries a send-by instant, defaulting to the end of that step's scheduled local day. Recipient-steps not handed to a provider by then are skipped and recorded as deadline-passed; a step whose deadline passes before dispatch begins does not send.
  11. CAMP-011
    Dispatch punctuality Dispatch of a scheduled step begins within 60 seconds of its resolved UTC instant, and each step's instant dispatches exactly once even if the scheduler runs twice.
  12. CAMP-012
    Campaign images A signed-in operator can upload a JPEG, PNG, GIF or WebP image within the byte and pixel limits in seed.json. Its type is read from the file's own header, never from the name or type the client declares, and the file must be complete; anything else is refused and nothing is stored. Each image is stored once under its SHA-256 and is never changed or deleted, so the bytes behind an approved revision cannot change, except that contact erasure (CONT-013) removes the bytes of an image holding an erased contact's identifier; such an image then answers 410 and blocks approval. It is served without a session at /media/<sha256> on this deployment with its exact content type, X-Content-Type-Options: nosniff, an immutable public cache and no cookie, answers 404 for an unknown name, and is rate-limited per image at the limit in seed.json, not per client address, returning 429 without affecting other images. Serving an image records nothing about who requested it. Every image is exported as its original file (DATA-001).

DESIGN 4 clauses

  1. DESIGN-001
    Optional design module The design module is disabled while both DESIGN_PROVIDER_API_KEY and DESIGN_PROVIDER_ORIGIN are absent; supplying either requires both, and startup fails naming what is missing. The origin must be an HTTPS origin with no path; only a copy running on a computer may name a loopback http: origin. A disabled module constructs no adapter, shows no design-generation control, contacts no design service, and its routes refuse to start a run with design_unavailable naming the inputs. An enabled module contacts the design service only with the owner's own key and only because an operator started a design run or chose one of its candidates.
  2. DESIGN-002
    Draft-only design generation From a draft's email editor an operator can ask the design service for two to four designs from a brief that starts as the draft's name, subject, preheader, sender name and current text and that the operator may edit. An estimate of the spend on the owner's design-service account is shown before each paid step: drawing the candidates and preparing the chosen layout. The run belongs to the draft and continues in the background: candidates appear as they land and the run is shown again after a reload. The operator chooses one with Use this design beside its image; Mango fetches its layout and then opens the design import path (DESIGN-004), where the browser builds the email; it opens by itself only as the continuation of that choice while the operator has done nothing else in the page, and otherwise the run shows a notice whose action opens it, so nothing opens over, or takes focus from, an operator who is working: photos hosted as campaign images, the HTTPS button destination the operator enters, the managed footer, and every design line not in the brief highlighted. The result is an unsaved edit of the email body that replaces existing content only after confirmation. The run and its candidates stay on offer until the draft is saved with the design or the operator discards them, so discarding the edit, reloading, a failed layout step or starting another run never loses a design that was paid for, and using the same prepared design again buys nothing. After a failed layout step the run says which step failed and whether the design service's allowance or wallet is the cause, and offers to try the layout again (a new paid layout) or choose a different design; a new run leaves earlier runs' designs reachable under the latest run. While the design service holds a run back, the editor says why and when Mango asks again, until the service answers. A run never saves, approves, schedules or sends; the body reaches the editor already in the canonical form saving stores (CAMP-003 policy), and the operator's Save stores it through the ordinary draft save path, where it passes every approval check like any other draft. A run that fails or outlives its deadline is shown as failed with Mango's own reason and changes nothing in the draft; Mango never substitutes content of its own for a design the service did not deliver.
  3. DESIGN-003
    Design data and records A run sends the design service only Mango's fixed description of an email layout with the operator's brief, every {{…}} token removed, and then only the chosen candidate image: never a contact, audience, personalization value or token. Every paid request carries an idempotency key derived from the run, so a retried or replayed request never buys again. Each run records its brief, the service's run and layout identifiers, each candidate's outcome, SHA-256 and size, the chosen candidate, the operator, its times and a safe failure code, and is never deleted; the candidate images and the layout are stored in R2 as authoring evidence and exported with everything else (DATA-001). Each paid request records a cost fact (RESULT-004).
  4. DESIGN-004
    Design import An operator editing a draft can import a design made with their own 12ui CLI: a LayerDoc version 2 file and the PNG candidate it was converted from. Mango compiles it in the operator's browser into the same email grammar every authored body uses (MSG-009, MSG-012): the photos become campaign images hosted by this deployment (CAMP-012), the design's button links to an HTTPS destination the operator enters, and its footer becomes the managed unsubscribe link and saved postal address. Layers Mango does not import are listed by their LayerDoc text, and every line of the design that does not appear in the operator's brief is highlighted for review. An unsupported version, a non-HTTPS button destination or a design the grammar cannot hold is refused visibly with the body unchanged; nothing outside the grammar is ever saved. Import only produces an unsaved edit of a draft's email body: it never saves, approves, schedules or sends, and the result passes every approval check and exact-revision approval like any other draft. Import itself makes no request to 12ui; generating designs inside Mango is DESIGN-001 to DESIGN-003.

MSG 12 clauses

  1. MSG-001
    Sender identity Every email uses the configured business display name, From address, reply-to address, and physical postal address; every SMS uses a sender registered for the recipient's country.
  2. MSG-002
    Email authentication A marketing email cannot be scheduled unless the mail adapter reports SPF, DKIM, and DMARC passing for the sending domain and the visible From domain aligns with an authenticated domain.
  3. MSG-003
    Email unsubscribe Every marketing email carries a visible unsubscribe link and an opaque per-recipient HTTPS List-Unsubscribe URL with List-Unsubscribe-Post: List-Unsubscribe=One-Click; DKIM covers both headers. The one-click URL accepts a context-free HTTPS POST body of List-Unsubscribe=One-Click, does not redirect, and applies CONT-004 before returning success. The visible link opens a page that applies CONT-004 on a single confirming action and never on page load, so a mailbox scanner or link prefetcher cannot unsubscribe anyone. Both paths are idempotent under repeats, need no session or cookie, and reveal no contact other than their own.
  4. MSG-004
    SMS permission An SMS is eligible only when its phone number is subscribed for the recorded consent scope and the SMS adapter confirms an approved sender for that recipient's country. For every permitted sender and jurisdiction, the adapter must be able to receive and enforce the standard opt-out and help keywords in CONT-007; otherwise SMS is blocked for that recipient.
  5. MSG-005
    SMS opt-out Every marketing SMS carries the configured program identity and Reply STOP to unsubscribe, or the jurisdiction's required equivalent, and the configured frequency disclosure where required. An opaque unsubscribe URL may be additional but never replaces reply-based opt-out. Review shows the exact compliance text and resulting segment count.
  6. MSG-006
    Links Scheduling is blocked when a destination link is malformed; uses a scheme other than HTTPS or the contact schemes MSG-013 admits (http:, javascript:, data:, file: and every other scheme block); or resolves, on the link itself or on any redirect it follows, to a host outside the allowed link hosts MSG-014 sets out. Image sources must be HTTPS on an allowed host. Review names every blocked link with the scheme or host that blocks it, and offers MSG-015's allow action for each blocked host. Approval (CAMP-004), flow activation (FLOW-008), the link inspector and tracking (RESULT-005) apply this one rule.
  7. MSG-007
    Content checks Review names blocking and advisory content findings per channel. An operator can acknowledge an advisory finding; the consent, sender registration, opt-out, authentication, link, personalization, and reputation checks are blocking and cannot be overridden.
  8. MSG-008
    Personalization Every personalization token carries a fallback value. A bare token is refused by the authoring checks and blocks approval and scheduling even when every current eligible contact resolves it, because the audience can change before send. When a contact has no value for a valid token, its saved fallback is rendered and the count of eligible contacts using a fallback is shown in review.
  9. MSG-009
    Email body Every marketing email is sent as multipart/alternative with an HTML part and a plain-text part carrying the same offer, links, and unsubscribe link, plus the preheader text set on the revision. Operator-authored HTML is saved as the WHATWG HTML parser reads it and transmitted exactly as saved within the allowed tag, attribute, and inline-style set and within the size limit BUILD-012 derives from delivery, which admits no script, form, stylesheet, class, or CSS function. The single exception is the responsive block BUILD-010 generates from builder settings: no author writes it, saving regenerates it, and the checker judges the email with and without it. One checker, reading the stored body with that parser, decides approval, test send, and delivery; the preview renders the HTML sanitized per BASE-INPUT-002 from the same parse and keeps its styles only when that checker passes, and the plain-text part is derived from the same parse.
  10. MSG-010
    Unsubscribe availability The unsubscribe path answers within 2 seconds and is rate-limited per unsubscribe token at the limit in seed.json, not per client IP address. The token is the rate-limit key declared for this public path under BASE-ACCESS-003, so mailbox-provider requests for unrelated recipients cannot consume one another's allowance; an exceeded token allowance returns 429 without affecting other tokens.
  11. MSG-011
    Sending reputation Once a sending domain has at least 1,000 marketing deliveries in the reporting window, scheduling a marketing email from it is blocked while provider-reported complaints divided by delivered marketing emails are at or above 0.3%, or hard bounces divided by attempted marketing hand-offs are at or above 5% (RESULT-006). A provider's stricter block applies at any volume. The block names each numerator, denominator, reporting window, and provider rule, cannot be acknowledged away, recomputes when late facts arrive, and clears only when every applicable threshold is below its limit.
  12. MSG-012
    Hidden or deceptive presentation Authored presentation cannot hide or disguise content. Approval, test send, and delivery judge the tree mail clients build from the stored body. Only table cells and the email's outer wrapper paint a background, no element changes its display, and nothing in the grammar can carry text out of the table cell that holds it, so every text run is drawn on the background of its nearest table cell that paints one, or outside any on the wrapper or the white page; they are blocked, with the reason named, when text sits below 3:1 contrast against that background (text on the wrapper also against the white page, since a block does not hold what overflows it) in standards or quirks rendering, when a style hides, clips, fades, shrinks below 10px, moves, overlays, or reverses text, when presentation stands where the grammar does not admit it (a background outside a table cell or the outer wrapper, any display, a width or height that could make a box smaller than its text, a border on an inline element, a rounded painted corner over the text it holds, right-to-left text outside a cell, overlapping styled cells), when styled markup is not written the way HTML parsers build it, or when markup is written in a way mail clients read differently from how it looks. The unsubscribe link and postal address fall under the same rule.

SEND 9 clauses

  1. SEND-001
    Provider hand-off Email uses mail.sender.v1 and SMS uses sms.sender.v1. Every recipient-step carries a provider-effective idempotency key derived from the campaign, revision, step, and contact. Mango stores the provider message identifier before treating it as handed off. A timeout or lost response becomes handoff-unknown and is reconciled by provider lookup before any retry; an adapter whose deduplication retention cannot cover the campaign deadline and reconciliation window cannot pass CAMP-004. A retried job, redelivered queue message, or resumed dispatch therefore never produces a second provider message.
  2. SEND-002
    Quiet hours SMS is handed off only inside the recipient-local legal and provider-required windows. The recipient time zone is resolved from recorded location evidence with its source and freshness, never substituted with the store time zone; an unknown or stale zone blocks hand-off; the US area-code evidence SMS-003 defines counts as recorded location evidence. Legal and provider windows are mandatory minima that a policy cannot weaken. Policy: sms.quiet-hours.v1; default: defer until the next allowed instant at or before the step's send-by instant (CAMP-010), otherwise skip and record quiet-hours-deadline.
  3. SEND-003
    Throttling and progress Dispatch paces hand-offs to the provider and carrier rate limits in seed.json. Campaign status shows the estimated completion instant and updates the handed-off, delivered, skipped, and failed counts within 30 seconds of each change.
  4. SEND-004
    Transport failure A transient provider or network failure on a recipient-step is retried up to 5 times over 1 hour with increasing delay, except that handoff-unknown is reconciled rather than retried. A permanent rejection or exhausted retry budget marks that recipient-step failed with the provider's error and campaign detail shows it; a hard rejection, complaint, or provider suppression also updates CONT-006 atomically before another hand-off.
  5. SEND-005
    Provider-event identity Every signed provider webhook is stored once as an immutable fact using the strongest identity that adapter declares: provider event identifier where supplied, otherwise provider message identifier, event kind, provider event time or version, and a stable payload digest. Replaying or reordering delivery, bounce, complaint, suppression, and SMS reply facts produces the same derived delivery disposition and contact state, and an older fact never downgrades a later provider disposition.
  6. SEND-006
    Delivery truth A recipient-step has a transport disposition of queued, handoff-unknown, handed-off, accepted, delivered, bounced, skipped, or failed, plus independent complaint and suppression facts. Delivered is recorded only from a provider fact asserting delivery; provider acceptance is never reported as delivery. A later complaint remains visible without erasing the earlier delivery fact, and a skipped disposition carries its reason.
  7. SEND-007
    Partial completion A campaign becomes completed only once every recipient-step has a terminal transport disposition; handoff-unknown is not terminal. Its summary keeps delivered, skipped, failed, bounced, complained, and suppressed totals separate and never sums them into a single success figure. Later complaint or suppression facts update the completed campaign's summary and the contact ledger.
  8. SEND-008
    Resumable dispatch and reconciliation Dispatch survives worker eviction, redeployment, and restart: it resumes from recipient-steps without a terminal transport disposition, sends nothing twice (SEND-001), and needs no operator action. At the reconciliation interval in seed.json, it queries the provider for handoff-unknown and other unresolved messages and imports missed provider facts. After the provider's declared lookup window expires, an unresolved message becomes failed with outcome-unconfirmed; it is never counted as delivered or retried blindly. A campaign never remains dispatching with no work or reconciliation in progress.
  9. SEND-009
    Provider outage When hand-offs to a provider fail transiently for 5 continuous minutes, or the adapter reports the provider unavailable, the affected campaign channel moves to paused and no recipient hand-offs are attempted on it. The adapter runs a bounded health probe or non-recipient canary at the reconciliation interval in seed.json; a successful probe resumes dispatch automatically, subject to CAMP-010 and AUD-005. The pause and provider error are shown on campaign detail, and each operator is emailed once as soon as the mail provider is available.

RESULT 6 clauses

  1. RESULT-001
    Campaign history Operators can list campaigns by state and channel, open the approved revision, and inspect its audience snapshot, delivery timeline, cancellation, and per-channel outcome totals.
  2. RESULT-002
    Engagement Clicks and store conversions are shown as observed events. Open tracking is off by default; when an operator enables it, opens are labeled privacy-sensitive estimates and never support a confidence, deliverability, or attribution figure.
  3. RESULT-003
    Attribution Revenue attributed to a campaign names the qualifying store event and attribution window, is reported separately from any forecast, and is assigned at most once per order. Policy: campaign.attribution.v1; default: the most recent non-automated tracked click in the seven days before purchase wins; a cancellation or refund subtracts the corresponding attributed amount.
  4. RESULT-004
    Cost Each AI call and provider hand-off records the external provider, model or channel, billable units, and reported cost; totals are visible by campaign and by day.
  5. RESULT-005
    Link tracking A tracked link is rewritten to an opaque per-recipient-step redirect on this deployment that records the request and forwards to the original URL. The redirect sets no cookie, loads nothing, and carries no address, name or contact ID in the destination URL; the only thing it adds is CONT-018's opaque, expiring click token, and only to a connected store's storefront host. Known mailbox security scanners and bot requests are retained as automated events but excluded from engagement and attribution. An operator can disable tracking per campaign, which sends the original URLs and records no clicks. Contact links (mailto:, tel:, sms:; MSG-013) are never rewritten and record no click.
  6. RESULT-006
    Deliverability reporting Per sending domain and SMS sender, Mango shows the delivered, bounced, complained, and failed counts and the resulting hard-bounce and spam-complaint rates over the reporting window in seed.json, and the rates MSG-011 is currently evaluating.

DATA 1 clause

  1. DATA-001
    Export contents The export contains every contact, source record, consent record, suppression and surviving opt-out record (CONT-013), proposal, campaign, revision, audience decision, message, recipient-step outcome, attribution event, setting, and audit entry as JSON, and every uploaded campaign asset as its original file.

MGMT 2 clauses

  1. MGMT-001
    Signed first-owner admission A claim is bound to the trusted management issuer, installation, configured app origin and owner email, expires promptly, and can initialize an installation only once. GET and HEAD never initialize it. Admission uses ordinary Base operator-auth and its native owner session. An existing installation cannot claim another first owner.
  2. MGMT-002
    Native owner editor Only an active native owner receives a short-lived editor grant. The frame loads from the exact configured management origin and trusts messages only from that frame and origin. Anonymous visitors receive no widget. Logout, authorization loss and grant expiry remove it. Compiled visual edits apply after the real route leaf has hydrated. Mango product authority follows OPER-004's six roles (Owner, Admin, Manager, Author, Analyst and Support), separately from Base's unchanged owner/admin/member roles. The last product Owner is always protected, and product authority on restore belongs to the destination installation. CSV export remains Owner/Admin only.

Baseline

Selected ownership clauses from the 22 in the project’s BASELINE.md. They are declared requirements; evidence is recorded separately.

  1. BASE-DATA-005
    Independence. The deployment makes no request to the marketplace or the seed author. There is no telemetry, phone-home, licence check, or kill switch.
  2. BASE-DATA-001
    Export and import. pnpm export produces every record and attachment; pnpm import restores it into an empty deployment; export, import, export yields an archive with equivalent contents.
  3. BASE-DATA-004
    Outbound flows. User data leaves the deployment only through externals declared in seed.json → externals. No other outbound request carries user data.
  4. BASE-PUBLIC-001
    Privacy. Public surfaces (widgets, booking pages, forms, status pages) set no cookies, load nothing from third-party domains, and send no visitor data before the visitor's first interaction.
  5. BASE-SECRET-001
    No leakage. No secret appears in the client bundle, in logs, or in an error response.

View as agent

These publisher documents are copied unmodified from the release. Site presentation summaries and historical screenshots are attributed separately on this page. An agent evaluating Mango can read them instead of the page.

seed.json
The manifest: capabilities, outside services, extension points, limits, operating cost and deployment needs.
CONTRACT.md
The requirements on this page, in source form.
AGENTS.md
Instructions for the coding agent that maintains an installation.
LICENSE
RELEASE.json
README.md
Source setup, available commands and implementation status.
BASELINE.md
The baseline requirements the project declares.
OPERATIONS.md
How the project is set up, operated and deployed.
ACCEPTANCE.md
What the publisher accepts as a finished release.
publisher-release.json

Every project, with its availability, is in /agents/catalogue.json; the agents page describes the machine-readable files.