Turn a plain-language brief into a customer journey with waits, branches, email, SMS and push. AI proposes the journey, a person approves and publishes it, and a Go runtime on PostgreSQL runs it step by step for each customer.
Test Lab cases passedLive run with OpenAI gpt-6-luna: 95,151 tokens and three automatic repairs. Live Claude quality has not been measured.
Down from 177 s, local benchmark88 s
10,000 customers sentAll 10,000 mock sends accepted 87.5 to 89.5 s after a shared timer deadline, from 176.7 s before the queue SQL changes.
Down from 15.75 s9.3 s
Timer p95 latenessTimer step completion minus its due time, at p95, in the same 10,000-customer workload.
A campaign sends once. A journey keeps going.
A customer leaves a cart. An hour later they get an email; if they still have not bought after a day, a push; if they have, the journey stops. Each customer moves through the same steps at their own pace, and a journey can run for days.
Customer Journey Composer lets a marketer describe that journey in plain language and get it drawn on a canvas: the entry event, the waits, the conditions and branches, the email, SMS and push steps, and the goal that ends it. Claude or OpenAI writes the proposal; a person reviews it, edits it and decides when it goes live.
Once published, the journey belongs to the runtime. A Go worker on PostgreSQL carries every customer through the exact version they entered, survives restarts, and sends each message once. It is the sister project of Smart Campaign Composer, which handles one-off campaigns.
Built for the person running the journey.
Every journey goes through the same five steps: describe, review, test, publish and follow.
Draft a journey from a brief
Describe the journey in plain language or start from an example. Claude or OpenAI proposes the steps, and the review shows what it adds, removes and changes, with each setting before and after.
A marketer starts from a working draft instead of an empty canvas.
Edit every step on the canvas
Entry events and scheduled audiences, waits for a time or an event, conditions, multi-way branches, A/B splits, email, SMS, push, webhooks, profile updates and exits. Changes save automatically and can be undone.
The AI draft is a starting point the marketer fully controls.
Test before going live
The Test Lab runs saved scenarios on a virtual clock with injected events and provider failures. The test inbox shows every message as the customer would receive it, with its consent decision and attempts.
Days of a journey can be checked in seconds, and a failing scenario blocks publishing.
Follow customers through it
The live monitor counts entries, goals and waits on the journey map, opens any step to its people and messages, and traces a single customer's path with each transition.
A running journey stays readable step by step.
Measure honestly
Analytics filter by published version and entry period and attribute each outcome to the day the customer entered. Provider acceptance is reported apart from conversion.
Results say what actually happened, not what was sent.
From brief to live journey.
The demo workspace, Northstar Commerce, has a published Abandoned Cart Recovery journey, 14 fictional customers and five Test Lab scenarios. The path below is the one every journey takes.
Describe. Write the brief and confirm the behavior contract: what must happen when the customer buys, when they do not, and who is eligible.
Review. The proposal arrives as a diagram with a summary of each change. Ask for edits in your own words, then apply it as a draft.
Edit and test. Adjust any step on the canvas. Run the Test Lab scenarios on a virtual clock and read every message in the test inbox.
Publish. An Admin publishes a fixed version once a full sandbox run of that exact workflow has passed.
Follow. The live monitor and analytics show entries, waits, sends, goals and each customer's path.
The model proposes. The runtime executes.
The model is only involved before publishing. Its answer is checked against a versioned schema, the behavior contract and the brief, then shown to a person. Nothing it returns is saved or sent without that person applying it.
After publishing, PostgreSQL is the single source of truth. Steps, jobs, waits and the outbox are rows; workers claim due work with FOR UPDATE SKIP LOCKED, leases and fencing tokens. The API and worker share state through the database rather than calling each other.
The model proposes a journey before publishing; the Go API checks it against the schema, the behavior contract and the brief, and a person applies it. Publishing freezes a version in PostgreSQL after a passing sandbox run. Workers then carry each customer through that version with leases, fencing tokens and a transactional outbox, sending to Mailpit and mock providers.
01
Proposal and publishing
Model output is checked and reviewed; only a passing sandbox run of the exact workflow can be published.
Vue canvas submits Go API + model. Go API + model presents for review Human apply + Test Lab. Human apply + Test Lab publishes PostgreSQL.
ClientVue canvasbrief and behavior contract
submits
AnalyzerGo API + modelschema, contract and brief checks, one repair
presents for review
ControlHuman apply + Test Labdraft edits and virtual-clock scenarios
publishes
PersistencePostgreSQLimmutable published version
02
Execution and delivery
Each customer stays on the version they entered; every step and send survives a worker restart.
Go worker checks policy Send policy. Send policy sends via outbox Mailpit + mock providers. Mailpit + mock providers feeds Live monitor + analytics.
ServiceGo workerSKIP LOCKED claims, leases and fencing
checks policy
ControlSend policyconsent, frequency caps and global exit
sends via outbox
OutputMailpit + mock providersemail, SMS and push
feeds
ObservabilityLive monitor + analyticscustomer paths, goals and conversion
Architecture notes
PostgreSQL holds steps, jobs, waits, the outbox and provider channel state. There is no Redis.
Pauses, credential locks and the circuit breaker are rows on the provider channel, shared by every worker.
Messages go only to Mailpit and mock providers. An unclear SMTP outcome stays UNKNOWN.
A journey outlives the browser tab that published it and the worker that started it. These rules keep each customer's path predictable across edits, restarts and provider trouble.
A published version never changes
Customers already in a journey stay on the version they entered while a new draft is edited and published. Publishing changes only who enters next.
A wait can last a fixed time, end at a time of day or a date on the customer, or wait for an event or a message open or click with a timeout. Each is a row in PostgreSQL, so a restarted worker picks it up.
Backoff with jitter, a pause on 429, a credential lock on 401, a circuit breaker per workspace and channel, and a rate window, all held in PostgreSQL rows so every worker sees them at once.
A versioned JSON schema shapes the model's answer. The backend checks the graph, the message syntax and the behavior contract the person confirmed, and compares every link, code and number in the messages with the brief. Invalid output goes back once with the reasons and is never offered to apply.
Approve, then publish separately
Warnings need an acknowledgement, and an edit made while a proposal is open blocks applying it. Applying creates a draft; publishing is a separate Admin action with its own review and needs a passing sandbox run of the exact workflow.
Keep execution in PostgreSQL
Jobs are claimed with row locks and leases, fencing tokens stop a worker that lost its lease, and waits are rows, so executions survive restarts. There is no Redis: every worker reads the same state.
Send each action once
Events are deduplicated, every logical action has a unique identity, and a transactional outbox carries sends, so a retry never sends twice from this side. An outcome the provider leaves unclear stays UNKNOWN instead of being reported as delivered.
Decide at send time
Consent, frequency caps, the customer's lifecycle state and the journey's global exit are checked when a message is about to go, not when the journey was written. A blocked message is recorded with its reason and the journey goes on.
Provider trouble is not a failed customer.
Each message has five attempts. A busy or locked channel costs no attempt, so a provider outage holds messages instead of failing them. Every rule is a column on the channel's PostgreSQL row, shared by all workers.
What happened
What the worker does
Uses an attempt
429 from the provider
Every worker pauses the channel for Retry-After, between 1 and 30 s.
No
401 or SMTP login refused
Lock the channel; one call every 30 s tests the credentials.
No
5xx, 408 or connection failure
Retry after 2, 4, 8, 16, 32 s with jitter, under the same idempotency key.
Yes
Half of recent calls failing
Open the circuit breaker for the workspace and channel, then probe.
No, while open
No answer after a possible send
Mark SMTP outcomes UNKNOWN for an operator; never resend blindly.
The benchmark puts 10,000 customers in one published journey, moves all their timers to the same deadline and lets real workers run timer, condition, SMS and exit. Reordering the queue SQL halved the time to drain every send.
Metric
Before
After
All 10,000 mock sends accepted
176.7 s
87.5 to 89.5 s
Timer step lateness, p95
15.75 s
9.25 to 9.41 s
No index, cache, connection pool increase or Redis was added. The worker's claims now walk the ordered pending indexes first and filter after, and drains continue from where they left off instead of rescanning the queue.
PostgreSQL 17 in Docker, limited to 2 CPU and 2 GiB, two final repetitions. Ingestion latency did not improve, because the faster producer meets the per-workspace request limiter.
Every screen below is the running application with the demo workspace. Open any screenshot to see it full size.
Describe the journey
Write what should happen in everyday language, with the workspace's events and customer fields listed beside the brief.
Say what must be true
Before the model is called, confirm what the journey must do in each situation. Every proposal is checked against it.
Review the proposal
The proposal is drawn as a diagram with each path. Ask for a change in your own words, or approve it as an editable draft.
Edit it on the canvas
Triggers, waits, conditions, branches, A/B splits, email, SMS, push, webhooks and exits are all editable, with autosave and undo.
Run days in seconds
Saved scenarios run on a virtual clock in an isolated sandbox, with the path taken and every assertion.
See what the customer gets
The test inbox shows each message a scenario produced, personalized, with its trace, consent decision and attempts.
Publish a fixed version
Publishing shows what changed and the checks it passed. Customers already in the journey keep the version they entered.
Follow it live
The live monitor counts entries, goals and waits on the journey map and opens any step to its people and messages.
Trace one customer
One customer's execution with its version, exit reason and every step it passed.
Measure the outcome
Filter by version and entry period. Provider acceptance is reported apart from conversion, never as delivery.
Measured runs.
Generation quality and runtime behavior are measured separately. Each figure links back to a dated report in the repository.
Live generation
47/47 Test Lab cases
Ten journeys · OpenAI gpt-6-luna · 2026-11-15
Engagement waits and discount codes, 95,151 tokens, three automatic repairs. Earlier runs, failures included, stay in the validation history.
Queue drain
87.5 to 89.5 s for 10,000 sends
Local benchmark · PostgreSQL limited to 2 CPU and 2 GiB · 2026-11-10
Down from 176.7 s after reordering the queue SQL, with no new index, cache, pool increase or Redis.
Timer lateness
p95 9.25 to 9.41 s
Same workload, from 15.75 s
Ingestion p95 and p99 did not improve: the faster producer hits the per-workspace limiter and retries, and the report keeps that visible.
Recovery
Resumes once after a worker stop
make test-recovery, run in CI
The test stops the worker during a wait and checks the execution resumes from its last committed step exactly once.
Run it locally.
Go
Vue
TypeScript
PostgreSQL
Vue Flow
Docker Compose
Prometheus
OpenTelemetry
Grafana
Anthropic API
OpenAI API
Playwright
Docker Compose starts the web app, API, worker, PostgreSQL and Mailpit; SMS and push go to mock providers. The demo reset prepares Northstar Commerce with its journey, customers and scenarios.
git clone https://github.com/negativexq/customer-journey-composer.git
cd customer-journey-composer
make up
npm run demo:reset
# Open http://localhost:5173
OpenTelemetry traces, Prometheus metrics with tested alert rules, Grafana and Tempo cover the runtime; Playwright tests run the main flows on desktop and mobile.
In short
What is Customer Journey Composer?
A Go and Vue application that turns a plain-language brief into a customer journey on a visual canvas, requires human approval and publishing, and runs each published version on a durable PostgreSQL runtime.
Can the AI publish or send anything?
No. The model returns a proposal. A person applies it as a draft, an Admin publishes it, and the runtime then runs that fixed version without a model.
Does it send real messages?
No. Email goes to a local Mailpit inbox and SMS and push go to mock providers, so nothing leaves the machine.
How is a journey tested before it goes live?
The Test Lab runs the real journey logic in a sandbox on a virtual clock, with injected events and provider failures, and checks expected outcomes. A journey whose required scenarios fail cannot be published.