Plan, write, approve and track multilingual SMS and email campaigns in one workspace, with AI-assisted audiences and a delivery engine built to recover from retries and restarts.
Measured local read throughput · Nov 8, 20262,000+ RPS
Campaign list API2,040 to 2,261 requests/s with message previews in the current measured version. This measures API reads, separately from message sending.
Configured delivery policy · shared across workers100 / SECOND
Per-channel send limitSMS and email each have their own 100 calls/s budget. Retries share that budget; adding workers preserves the channel limit.
Recorded Claude benchmark · Nov 9, 2026243 / 247
Expected model outcomesOne run: 2 false blocks, 2 visible misses and 0 silently wrong outcomes. This is a repository-authored case set, not a production accuracy estimate.
The whole campaign, together.
A marketer starts with an offer and an audience in mind. Getting that campaign out means translating the brief into filters, writing each channel and language, choosing a design, checking the final message and finding out who actually received it.
Smart Campaign Composer brings those steps into one workspace. The brief becomes a proposed audience, reusable templates give the copy a home, and every campaign keeps its language versions, approval, schedule and delivery history together. The marketer can move from an idea to an inspectable result without handing each step to a separate tool.
The AI helps with the writing and audience proposal. Backend checks, a reviewed revision and durable delivery protect the path to sending. The included provider simulates SMS and email delivery, so the complete workflow can be demonstrated locally.
Built around the marketer.
Cart reminders, new arrivals and win-back offers use the same workflow. Choose the audience, shape the message and see the result with the campaign's context still in front of you.
Turn intent into an audience
Describe a city, recent cart activity, purchases or a period without contact in ordinary language. Inspect the resulting rules and how each condition narrows the audience. Save segments for the next campaign; unsupported conditions remain visible for review.
The marketer can check who will receive the campaign before writing or sending it.
Write for each recipient's language
Generate SMS and email in Turkish, English, German, French and Spanish for the audience languages you choose. Edit fields directly or ask for a revision. The preview fills in customer names, discount codes and links; unselected languages fall back to English.
One campaign keeps its audience, offer and language versions together.
Make the design reusable
Start from eight email templates or create a layout in the block editor. Manage banners in the image library and set the logo, colors, font and footer in the brand kit. The model fills the copy while the chosen layout and assets stay under the marketer's control.
Every new campaign starts from an existing design rather than a blank email.
Schedule and compare
Send immediately, choose a future time or configure a repeating campaign. Inspect upcoming runs in the calendar. A/B campaigns keep each person's assigned version stable across retries and later runs, and report results by version.
Planning, recurring delivery and variant comparison share the same workflow.
Track the message after sending
Follow live progress and inspect individual delivery histories. Per-message SMS short links count opens and redirect to the campaign destination. Reports distinguish provider acceptance, simulated delivery, bounces and skipped recipients; analytics compares campaigns across the workspace.
A send ends with an inspectable result for each recipient and channel.
From brief to test inbox.
The recorded walkthrough starts with a cart reminder for customers in İzmir: no purchase after adding to their cart in the last 14 days, 15% off, code SEPET15 and a destination link. It follows audience validation, message review, approval and 173 queued messages into the test inbox.
Repository demo, 3:16. Model writing is sped up. Claude Haiku 5.5, seeded customers and a mock delivery provider.
Describe and validate. Choose channels and a template; inspect the proposed filters, counts, assumptions and unsupported conditions.
Write and review. Generate and edit each language’s messages. Review binds approval to the audience, content and options shown.
Approve and queue. Send now or schedule a run. Workers claim durable deliveries, recheck consent and coordinate per-channel permits.
Follow the result. SSE carries progress; the report distinguishes acceptance, simulated delivery, bounces, skipped messages and unknown outcomes.
Capacity and delivery policy.
The campaign list has measured throughput above 2,000 API requests per second on the local test machine. Sending follows a separate policy: a maximum of 100 provider calls per second for SMS and another 100 for email, shared across workers.
What was measured
Result
Scope
Campaign list, with previews
2,040 to 2,261 requests/s
Current measured read path, three alternating runs.
Earlier list, without previews
2,123 to 2,609 requests/s
The earlier result behind the roughly 2,500 RPS figure.
Six-endpoint API mix
800 requests/s served
Recorded on 494k deliveries; 600 requests/s with 10k campaigns.
Outbound provider calls
100/s per channel
Configured send ceiling across every worker, including retries.
Queue stress test
1.02 million waiting deliveries
Baseline test: 2.6 ms median claim time; one 180-second observation window.
Why sending stays at 100
The delivery budget keeps calls within the configured provider allowance. SMS and email have independent queues and limits, so trouble on one channel does not hold up the other. More workers can share the work while Redis coordinates the same channel budget. Provider latency, retries and pauses can reduce the accepted rate below that ceiling.
The performance work focused on avoiding repeated history scans: snapshot approved audiences, keep finished-run counts, index progress reads and read list previews from generated columns. Twenty open campaign pages then needed four database queries a second instead of eighty, and hidden tabs stopped polling.
API, PostgreSQL and the load generator shared an 8-CPU Docker environment on one Mac. Read throughput and the configured send rate measure different operations; these tests do not establish a 2,500-message/s delivery capacity.
The API and worker communicate through PostgreSQL rather than calling each other. Campaign state, approval, recipient snapshots, runs, delivery attempts and the send queue live in the same durable store.
PostgreSQL owns the durable business state; Redis holds the shared, short-lived delivery controls. This keeps a campaign's place in the queue and its recorded status in one transaction. The worker runs independent SMS and email loops with up to 32 calls in flight per channel, while the shared limiter determines how many calls may proceed.
The Go API validates model output and freezes a human-reviewed campaign in PostgreSQL. Independent workers claim durable deliveries, coordinate permits through Redis and send to a journaled mock provider. Signed reports return to the API; the browser follows progress over SSE.
01
Proposal and approval
Model output passes backend validation before a person can approve a specific review revision.
Vue workspace submits Go API + model. Go API + model presents for review Human approval. Human approval freezes PostgreSQL.
ClientVue workspacebrief, channels and template
submits
AnalyzerGo API + modelstructured proposal, validation and repair
presents for review
ControlHuman approvalrevision check and recipient snapshot
freezes
PersistencePostgreSQLimmutable version, runs and durable queue
02
Delivery and reporting
Sending is independent of the API process; retries keep the same delivery identity.
Go worker coordinates with Redis permits. Redis permits gates calls to Mock provider. Mock provider reports through Signed webhook → API.
ServiceGo workerqueue claim, consent check and lease
coordinates with
ControlRedis permitsshared per-channel limit and pauses
gates calls to
OutputMock providerjournaled idempotency and test inbox
reports through
ObservabilitySigned webhook → APIdelivery history and live SSE progress
Architecture notes
The queue and delivery state share PostgreSQL; unique run/recipient/channel keys, leases and claim tokens protect recovery.
Redis grants permits before queue claims. Losing the limiter window pauses the channel for eight seconds.
Only the mock provider receives messages. Unknown outcomes remain explicit, and the report separates acceptance from simulated delivery.
The campaign, generated content, approval, send run and individual delivery have different lifetimes. Explicit ownership keeps a late model answer, stale browser tab or restarted worker from changing a decision that has already moved on.
The latest generation owns the result
A model run claims the campaign under a row lock and keeps a generation token. Every save checks that token. A claim abandoned for five minutes can be taken over; output from the older run is then discarded. Content revision checks also stop a stale page from silently overwriting another edit.
Templates are JSON block documents rendered by Go's html/template, with an unsubscribe footer that the editor cannot remove. A campaign takes its own design copy; editing the library template cannot alter it. Approval records the design name and a hash of its appearance alongside the reviewed content.
A campaign version holds the approved words and rule; a run represents one send. One-time sends use the approved recipient set. Recurring runs evaluate the frozen rule again and apply the schedule's re-entry choice: new recipients only, a minimum gap, or everyone who matches. A finished run keeps final counts for later reporting.
Status changes, related rows and the audit event commit in one transaction. PostgreSQL supplies the clock for leases and stalled campaigns. The API and workers can restart independently; a reconnected browser reads the durable state and resumes progress updates rather than reconstructing a send from browser memory.
The model proposes structured rules and message fields. The backend checks the schema, facts, offer, links and personalized length limits, then allows at most three attempts with validation errors returned for repair. Streamed text is a preview; a repair clears it, and multilingual generation saves all validated versions together. SQL uses bound values and an empty rule matches nobody. Known semantic gaps remain documented.
Approve a specific revision
A campaign row lock protects the review check. A stale revision is refused, approval keeps the one-time recipient set, and a database trigger makes the approved version immutable. Consent is checked again when sending; recurring runs recompute their audience.
Keep the queue in PostgreSQL
The delivery record is also its durable queue entry, claimed with FOR UPDATE SKIP LOCKED. Queue state, delivery state and attempts commit together, avoiding a database-to-broker dual write. Unique run/recipient/channel keys prevent duplicate rows; a stable idempotency key survives retries. A one-minute lease recovers interrupted work, and claim tokens stop late workers overwriting newer results.
Treat missing answers as uncertain
The mock provider journals accepted keys before replying and replays them after restart. If a call may have succeeded but retries cannot resolve it, the delivery ends as UNKNOWN rather than claiming it failed.
Coordinate every worker
Redis grants permits per channel before delivery claims. A lost limiter window pauses sending for eight seconds. Backoff, credential locks, circuit breakers and stalled-campaign pauses keep provider failures inspectable and recoverable.
Recovery is part of sending.
A transient provider problem should leave messages waiting for the right recovery action. The worker distinguishes a busy channel, refused credentials, a lost answer and an interrupted process instead of treating every unsuccessful call as a failed recipient.
Interruption
System response
What stays intact
Provider returns 429
Pause the channel across workers for Retry-After, then retry.
The message keeps its attempt budget.
Credentials return 401
Hold the channel; allow one shared credential probe every 30 seconds.
Pending messages stay retryable; the other channel continues.
Worker crashes mid-send
Recover the delivery when its one-minute lease expires.
The retry uses the same idempotency key; a stale worker cannot record over the new claim.
Provider answer is lost
Retry with backoff and jitter. Exhausted attempts with a timeout end as UNKNOWN.
The report preserves uncertainty about whether the message was accepted.
Redis loses its window
Wait eight seconds before granting new permits.
The durable delivery queue remains in PostgreSQL.
Campaign stops progressing
After ten minutes with retries waiting and no deliveries finishing, pause for a person's Resume.
Queued messages and their keys survive the pause.
A circuit breaker holds a failing channel and probes for recovery. The mock provider journals accepted keys and owed delivery reports before replying, so a restart can recognize a retry and resume reporting. Duplicate prevention depends on the provider honoring that key; a real integration must preserve the same contract.
The product carries the campaign through authoring, audience review, branded content, scheduling and reporting. Open any screenshot to inspect the full interface.
Start with the brief
Choose the channels and email template. A discount code and destination link become explicit campaign options.
Check the audience
Inspect the audience funnel, language counts and any condition the system cannot apply before proceeding.
Review each language
Edit the generated copy and inspect the customer preview. Discount and short-link placeholders are resolved when sending.
Account for each delivery
Separate provider acceptance from simulated delivery, with retry history, skipped recipients and per-channel results.
Build the email once
Arrange logo, image, heading, text, button and divider blocks with desktop and phone previews. Reuse the design across campaigns.
Keep the brand in every language
Review the generated subject, headline, message and button inside the selected template, with the customer's name and discount code filled in.
Plan the next send
Switch between day, week and month views of drafts, scheduled campaigns and completed runs, including recurring sends.
Compare campaign results
See channel outcomes, provider calls over time and campaigns by failure rate across the workspace.
Evidence with its limits.
Model behavior and delivery reliability are measured separately. The figures below describe recorded repository runs, with source reports linked in the deep dive.
Read-path performance
2,040 to 2,261 requests/s
Campaign list endpoint · local Docker · 2026-11-08
Three alternating runs, with message previews. An earlier version without previews measured 2,123 to 2,609 requests/s. These are API reads, not send throughput.
Model benchmark
243/247 expected
Claude Haiku 5.5 · 2026-11-09 · one run
0 silently wrong outcomes, 2 false blocks and 2 visible misses. Deterministic grounding still has documented gaps; a clean model run does not close them.
Fault verification
24 load scenarios
Recorded Compose verification · 2026-11-08
No duplicate acceptance recorded. Deliberate worker overconfiguration and clock jumps above 100 ms exceeded the provider rate limit and are reported explicitly.
External security probes
19 passed
Recorded verification stack · 2026-11-08
Known open items remain, including unsigned identity cookies, missing browser security headers and no API request rate limit.
What remains open
The deterministic validator has known cases where a model can drop a condition without being caught. The latest recorded model run had no silently wrong outcomes, but does not prove the validator complete.
The load report records rate overshoot when workers are deliberately configured above the provider limit or Redis’s clock jumps beyond 100 ms. Default tested scenarios recorded no duplicate acceptance.
Sign-in records a claimed identity using an unsigned cookie; it is not authentication. Missing security headers, no API request rate limit and default development secrets remain documented deployment limitations.
Run the complete path locally.
Go
Vue
TypeScript
PostgreSQL
Redis
Docker Compose
Prometheus
OpenTelemetry
Anthropic API
OpenAI API
Docker Compose starts the frontend, API, worker, PostgreSQL, Redis, mock provider and setup job. The first install seeds 6,000 fake customers, eight email templates and an example brand kit. Mock AI needs no API key.
git clone https://github.com/negativexq/smart-campaign-composer.git
cd smart-campaign-composer
docker compose up --build -d --wait
# Open http://localhost:8080
Prometheus metrics, JSON logs with trace IDs, OpenTelemetry spans and the audit trail expose both operational failures and campaign decisions.
In short
What is Smart Campaign Composer?
A local Go and Vue campaign application that turns a brief into validated audience rules and multilingual SMS and email, requires human approval, and sends through a mock provider with live delivery reporting.
Does it send real SMS or email?
No. Delivery goes to a mock provider with a test inbox, simulated failures and delivery reports. The complete flow runs with mock AI and no model API key.
What prevents an unreviewed campaign from being sent?
Approval checks the specific review revision and unresolved audience blockers, freezes the version in PostgreSQL and stores the one-time recipient set. Workers claim deliveries only from dispatching campaigns.
How do API capacity and sending limits compare?
The current measured campaign list serves 2,040 to 2,261 requests per second locally; an earlier version without message previews reached 2,609. Sending has a separate configured ceiling of 100 provider calls per second per channel, shared by all workers and retries. The read benchmark does not measure maximum send capacity.