Your Story, Your Song — Process Flow
The complete path from a customer clicking the menu item through behind-the-scenes automation to a paid $79 order — and on into production and delivery.
What the customer sees / does Behind the scenes (automation / backend)
Phase 1
Arrive & Tell the Story
Customer (on-site)
- Customer clicks "Your Story, Your Song" in the site navbar.
- Page loads at /your-story-your-song — reads about the $79 package, then clicks "Create Your Song".
- Fills out the questionnaire: name, email, who the song is about (required); three memories, what made them special, what they loved (required, 30+ characters each); optional photo, musical style, CD title, pronunciation, and companion songs (up to 70 min from the catalog).
- Optional photo is uploaded through the UploadFile integration, which returns a file_url.
- Clicks the "Send My Song" button (active only once required fields are complete).
Behind the scenes
Front-end form validates required fields before the button unlocks.
No payment yet — the story is collected first so it can be reviewed and linked to the order later.
Phase 2
Story Received (Backend)
Customer (on-site)
- Questionnaire switches to the "Thank You — Your Story Is on Its Way" panel showing a timeline of next steps and a "Continue to Payment — $79" button.
- A confirmation email arrives in the inbox ("Your Story, Your Song — We received your request").
Behind the scenes
sendSongStoryRequest backend function runs:
• Validates name + email (format checked); rejects malformed or oversized payloads.
• Applies rate-limiting per email to prevent spam.
• Clamps/sanitizes every field.
• Creates a SongRequest entity (status = "story_received") storing the full story, photo, and companion songs — so it survives beyond the email and can be linked to the payment.
• Sends the studio a full notification email (story + songs) to skybrookstudio@gmail.com via Resend.
• Sends the customer a warm confirmation email.
• Returns the new songRequestId to the front-end (used in the next step).
Phase 3
Pay $79 (Stripe Checkout)
Customer (on-site)
- Customer clicks "Continue to Payment — $79" on the success panel.
- Browser is redirected to Stripe's secure, hosted checkout page (card payment).
- Customer email is pre-filled; on-screen guidance explains to use "Pay without Link" to enter card details manually.
- Customer enters a credit/debit card and completes the $79 payment.
Behind the scenes
Front-end first blocks checkout if the app is running inside an iframe (preview sandbox) — protects against opening checkout from an unpublished app.
createStorySongCheckout backend function runs:
• Validates customer name + email.
• Creates a Stripe Checkout session for the $79 one-time "Personalized Song Package" price (price_1U7Ndn…), mode = payment.
• Sets metadata: flow = "story_paid_upfront", customer_name, song_subject, song_request_id, base44_app_id (for transaction tracking).
• success_url → /order-confirmation?session_id={CHECKOUT_SESSION_ID}
cancel_url → /your-story-your-song
• Returns the hosted checkout URL; the browser navigates to it.
Phase 4
Payment Captured (Stripe Webhook)
Customer (on-site)
- (Nothing for the customer to do — this all happens in the background the moment the card is charged.)
Behind the scenes
Stripe fires a checkout.session.completed event to /functions/stripeWebhook.
stripeWebhook backend function runs (authoritative source of truth — only it creates orders):
• Verifies the request signature using STRIPE_WEBHOOK_SECRET (rejects anything not genuinely from Stripe).
• Retrieves the full session + line items; confirms the product is the "Your Story, Your Song" package.
• Idempotency check — skips if an Order already exists for this session_id (safe against Stripe retries).
• Creates an Order entity (status = pending, $79, payment_method = session_id).
• Links the earlier SongRequest: updates it with order_id, stripe_session_id, and status = "paid".
• Sends the studio an email: "New $79 Your Story, Your Song Payment" with the customer + order details so the payment can be matched to the story-submission email.
Phase 5
Confirmation Screen
Customer (on-site)
- Stripe redirects to /order-confirmation?session_id=…
- Page shows "Your Song Is Coming to Life" — a confirmation that the personalized song process has begun and a private delivery link will arrive in about 2–3 weeks.
- Local cart data is cleared.
Behind the scenes
OrderConfirmation calls createOrderFromSession (read-only verification) to detect this is a custom-song order and render the right confirmation view.
createOrderFromSession never creates or modifies an order — the webhook is the single source of truth for that.
Phase 6
Production & Delivery (Studio)
Customer (on-site)
- Dave reads the story and replies by email within ~2 business days to confirm details.
- Lyrics are written personally from the story; (sometimes) a short rough scratch mix is emailed first for the customer's input (optional).
- Finished song + personalized CD are produced (~2–3 weeks): MP3, a 30-second shareable preview, MP4 lyric video, and CD artwork.
- Customer receives a private reveal link by email; opening it shows the finished song, artwork, lyrics, downloads, and a personal note.
Behind the scenes
Admin uses ScratchPreview to optionally send a watermarked rough mix (sendScratchPreview).
When the song is finished, Admin creates a SongDelivery record (with a unique unguessable token) via createSongDelivery — triggers the private reveal-link email.
Customer opens /delivery?token=… — getSongDelivery validates the token and serves the reveal page.
If a link is lost, resendSongDelivery re-sends the private reveal email.
SongRequest lifecycle: story_received → paid → delivered.
Skybrook Studios
Songs That Inspire. Stories That Last.
Tip: use your browser's Print dialog and choose "Save as PDF" for a digital copy.