Home / Archive / More in this area
Archived version Updated May 21, 2026 · Affirmology_DemoLaunchPlan_v1.md
Goal: Stand up affirmology.ai/demo so an investor or partner can enter their birth data, watch their report appear, listen to their personalized audio, and get the same package emailed to them. All driven by the existing Python agent in affirmology-agent/.
Scope (locked): Investor / partner demo, not public launch. No payments, no accounts, no abuse protection beyond a basic rate cap. Polish over throughput.
Four moving pieces, each chosen for the shortest path from your existing assets to a live affirmology.ai/demo URL.
affirmology.ai/demo and affirmology.ai/demo/r/[id] is one DNS-free config change, free tier covers 100x our needs.affirmology-agent/, dockerized once, deployed in five minutes. ~$5 to $20 per month for this volume.The result HTML page on Cloudflare Pages and the GHL email are two delivery channels for the same payload. The user sees their report and audio inline immediately. They also have it waiting in their inbox.
affirmology.ai/demo. Static page served from Cloudflare Pages. Sees the intake form styled in the established Affirmology aesthetic (cream #faf6ee, gold #b38a3a, Cormorant Garamond headlines, Inter body, JetBrains Mono accents from Brief v7)./api/runs endpoint. The agent returns a run_id immediately and starts work in the background. The page redirects to affirmology.ai/demo/r/[run_id]./api/runs/[id] every 3 seconds. While pending, it shows a calm progress sequence ("Calculating your chart", "Composing your script", "Recording your voice", "Mixing your audio"). When complete, it injects the report markdown rendered as HTML and shows the audio player with the signed R2 URL.Path: affirmology.ai/demo/index.html
Lives in: Cloudflare Pages project
Fields: First name (required), Middle name (optional), Last name (required), Birth date (date picker), Birth time (time picker, with a "I do not know" toggle that disables time and surfaces a warning about degraded rising sign and houses), Time zone (auto-detected from browser, editable), Birth location (text input with city autocomplete via a free geocoder), Email (required).
Submit handler: Fetch POST to the Railway agent's /api/runs. On success, window.location to the results page with the returned run_id.
Visual direction: Pull the existing Brief v7 CSS variables and typography directly so the demo page reads as a sibling of the deck and the executive summary. Treat the form as a single centered column on cream, with the gold accent reserved for the submit button and the section dividers. No competing visual ornament. The form is the page.
Path: affirmology.ai/demo/r/[run_id] (Cloudflare Pages function or static + client routing)
Initial state: Branded waiting state with the four-step progress indicator and a soft animated ornament (the gold ✦ from Brief v7, breathing).
Polling: Client polls /api/runs/[id] every 3 seconds for status. Status values: queued, computing_chart, generating_script, recording_audio, mixing, delivered, failed.
Delivered state: Renders the markdown report inline using a small client-side markdown library (marked.js) styled with the same Cormorant headers and Inter body. The audio player sits in a sticky bar at the top or bottom of the viewport with the user's first name above it ("Sol, here is your soul's song"). The audio file is served from R2 via a signed URL.
Optional "listen to unlock" mechanism: The page can hide a final CTA section (Book a deeper session, See the methodology, etc.) until the audio's ended event fires, or until 80% of the audio has been played. Simple JavaScript listener on the <audio> element. We add this in v2 if you want it for the in-room demo experience.
Wraps: The existing affirmology-agent Python package.
Stack: FastAPI + uvicorn, dockerized. Background work via a simple in-process worker (sufficient for demo volume; no Redis or Celery needed yet).
Endpoints:
- POST /api/runs accepts the form payload, validates, starts a background task, returns { run_id, status: "queued" }.
- GET /api/runs/{run_id} returns current status plus, once delivered, the report markdown, the signed audio URL, and any verification flags.
- POST /api/webhook/ghl (optional, for testing GHL handoff in isolation).
Background task does: compute_chart (existing) → generate_reports (existing) → verify_report (existing) → generate_script (Phase 2 work, partly stubbed today) → synthesize_audio (ElevenLabs, new) → mix_audio (FFmpeg, new) → upload_to_r2 (new) → notify_ghl (new) → mark delivered.
Deploy: railway up from the affirmology-agent directory after adding a Dockerfile and a web service config. Environment variables for ANTHROPIC_API_KEY, ELEVENLABS_API_KEY, ELEVENLABS_VOICE_ID, R2_ACCESS_KEY, R2_SECRET_KEY, R2_BUCKET, GHL_WEBHOOK_URL.
Inbound webhook: Create a workflow in GHL that starts on "Inbound Webhook". Map the JSON fields the agent will send: first_name, last_name, email, birth_date, birth_time, birth_location, audio_url, report_url, run_id. On trigger, Create or Update Contact, store the new fields as custom fields, then fire the "Demo Delivered" email template.
Email template: Cream + gold, matches the page. Subject: "Your Affirmology, ready". Body includes the audio link (button), the report link (button), and a single follow-on CTA ("Book a deeper session with Jeff"). HTML and plain-text version both.
You configure this in the GHL UI: I cannot click into your GHL account, but I will give you the exact field names the agent will send and a copy-paste workflow recipe so the setup takes 15 minutes.
Bucket: affirmology-demo-renders
Objects per run: runs/{run_id}/audio.mp3, runs/{run_id}/report.pdf, runs/{run_id}/report.md, runs/{run_id}/chart.json.
Access: Signed URLs valid for 30 days, generated server-side in the agent. No public bucket.
Why R2 over S3: Same Cloudflare account as the domain, zero egress, simpler IAM, free for the demo's volume.
The order matters because each step is independently verifiable and each one unblocks the next.
/api/runs that returns a canned report and a placeholder audio after 30 seconds. This is the demo we can show on a laptop tomorrow if needed, and it locks the visual direction before any backend work. About one focused session.compute_chart and generate_reports exposed behind POST /api/runs and GET /api/runs/{id}. The audio in the response is still the placeholder. This proves the deploy story and gives us a real URL to point the page at. About one focused session.Affirmology_Script_v5.md as the script template for v1; Phase 2 of the architecture doc swaps in the personalized script generator later. About one to two sessions.delivered. You build the email automation in the GHL UI in parallel. About half a session for me, 15 minutes for you in GHL.affirmology.ai/demo. Point the Cloudflare Pages project at the subpath. About 10 minutes once the page is built.Total time to a live demo: 4 to 6 focused sessions. Most of the surface area is glue, not original code, because Phase 1 of the agent already exists.
You (manual setup, one-time):
- Create the Railway account and connect it to a new GitHub repo for affirmology-agent (or upload directly).
- Create the Cloudflare Pages project, point it at the demo/ folder I will deliver, configure the affirmology.ai/demo route.
- Create the Cloudflare R2 bucket and generate API credentials.
- Get an ElevenLabs API key on the Creator tier and pick a voice (Sarah, Charlotte, Brian, or Will from your demo build plan).
- Build the GHL inbound webhook workflow and the email template using the recipe I will provide.
- Hand me the resulting URLs and tokens (over a secure channel) so I can wire the agent's .env.
I build: - The intake and results HTML, CSS, and JS. Self-contained, no framework. - The FastAPI wrapper around the existing Python agent. - The Dockerfile and Railway service config. - The ElevenLabs and FFmpeg integration. - The R2 upload helper and signed-URL generator. - The GHL webhook POST in the agent. - The GHL workflow recipe and field mapping doc. - A README that ties the deploy steps together.
These are the calls I need from you before or during the first build session. None block writing v1 of the HTML page.
Heavenly Circuit.mp3 in the repo as the v1 bed for every demo, or do you want me to wire a small library and a mood-matching rule first? For an investor demo, one bed is plenty.jeff@jeffparker.love or a new hello@affirmology.ai?The intake and results HTML, mocked, in the established Affirmology visual language. One file each, dropped into AFFIRMOLOGY/CLAUDE OUTPUTS/Affirmology/ for review. The mock agent returns a canned report and the existing Heavenly Circuit.mp3 after a simulated 30-second render so you can feel the experience end to end on your laptop today.
Say the word and I will build it next.