Back to case studiesComplete digital business

A digital product store automated end to end

Client
Second Spring
Industry
Printable digital products
Where
International business
Built with
HTML + print CSSHeadless ChromeCloudflare PagesCloudflare WorkersCloudflare D1ffmpeg + PythonGenerative models
Store sales, sustained since week two after launch
$150/day
Digital products produced and published
5
Servers the business has to maintain
0
Regenerates the entire catalog from its source
1 command

The store takes around $150 a day, and has since the second week after launch, without anyone fulfilling an order. Getting there meant building a complete digital products business rather than just a website: product, store, checkout, delivery, lead capture, ad measurement, and a creative factory, all wired together.

Automation flow of the digital storeThe visitor lands on the site. The site sends the email to an edge function that stores it in the database, sends events to the measurement platform, and takes the visitor to the checkout, which delivers the product.Visitorad or searchStatic siteglobal CDNno build stepEdge functionvalidates, filters botsstores the signupCheckoutdelivers the PDFFunnel measurementview and initiate checkoutDatabasefirst-party, exportable
How a visitor travels through the system, from the ad to delivery.

The result

Around $150 a day, sustained since the second week after launch.

That is the number that matters, but it is not the part that took the most work. The hard part was making it arrive on its own. Nobody fulfills an order, nobody copies an email into a spreadsheet, nobody assembles an ad by hand, and nobody checks whether the sale came through. The store charges, delivers, and measures with no person in the middle.

That is the part that transfers to another business, which is why the rest of this page explains which pieces we connected and why.

What a client actually buys here

  1. A digital product catalog that regenerates with one command from its source.
  2. An extremely fast static store with reproducible deploys and near-zero hosting cost.
  3. A first-party email capture system at the edge, with no dependency on an email platform.
  4. Clean funnel measurement, with explicit rules that keep the data from being corrupted.
  5. An AI video creative production line, with timings calculated by script.
  6. A written compliance framework that avoids platform rejections and legal risk.

Context and the real constraints

The project started with three constraints that shaped the entire architecture.

ConstraintDesign consequence
The founder does not reside in the United States and cannot open a seller account on the niche's main marketplaceThat channel was dropped, and we chose a checkout platform that acts as merchant of record, works internationally, and handles taxes and payments
The niche is women's healthA total ban on medical claims, a literal legal disclaimer on every page and product, and language rules for the ads
A very limited marketing budgetMeasurement had to be correct from the first dollar, and free traffic is the main engine

The strategic conclusion that guided everything: the bottleneck is not producing, it is distributing. Producing a PDF costs minutes; getting the visit costs money. So production was automated until it became trivial, and the human effort went into distribution and trust.

The architectural principle

Every piece is replaceable. The store does not depend on the email provider, measurement does not depend on the checkout, and the product does not depend on the store. If the payment processor changes tomorrow, only links change, not the architecture.

The seven automated systems

Each one removes repeated manual work. This is the part that transfers to another business as is.

1. Product factory: from source to PDF with one command

The products are not designed in a graphics tool: they are written as HTML and share a single print stylesheet. A loop over the source folder calls the browser in headless mode and exports each file to a sellable PDF.

  • Changing one word across the five products is one edit and one command, not five redesigns.
  • The brand is impossible to break: margins, typefaces, and minimum sizes live in a single file.
  • Accessibility guaranteed by rule, with a minimum body text size on screen and in print.
  • The product is under version control, so what changed and when is auditable.

2. Publishing the catalog to the checkout platform

Creating the five product listings ran automatically against the sales platform instead of by hand: name, short address, full description with the literal legal disclaimer, cover, thumbnail, price, summary, detail rows, and the product file itself.

Two cross-sell offers were also created automatically: one that moves a single-product buyer up to the full bundle, and another aimed at whoever downloaded the free product. It is the cheapest average-order-value lever there is, and it is configuration, not traffic.

Publishing or republishing an entire catalog becomes a matter of minutes, and the listings stay consistent with each other because they come from the same text source.

3. Site and reproducible deploys

A static site, no build step, deployed by command to a pages platform on a CDN, with its own domain and a managed certificate.

We documented explicitly the detail that trips up almost every team: a deploy that does not specify the production branch publishes to a preview environment, not to the real site. That kind of documented trap is the difference between a client who operates on their own and a client who calls every week.

What is already handled on the site:

  • Privacy and terms pages, a real requirement for ad platforms to approve.
  • Social sharing tags with a per-product image.
  • "Look inside" galleries generated from real pages of the PDFs.
  • A refund guarantee visible under every call to action.
  • The literal legal disclaimer on every page.

4. First-party email capture at the edge

The free product's form does not hand the email to an outside provider. It posts to a first-party endpoint served by an edge function, which validates the format, filters bots with a hidden trap field, normalizes the value, and inserts it without duplicates into a serverless database. Then it redirects to the free product's checkout with the email already filled in.

Three decisions worth explaining:

  1. Delivery is never blocked by our own API. If the endpoint fails, the user still gets their download. Capturing a lead can never cost a conversion.
  2. The list belongs to the business. It exports with one query. No platform hostage situation.
  3. The source of every signup is recorded, so attribution by source is possible from day one without additional tools.

5. Funnel measurement, with rules that keep it clean

The site loads a first-party measurement file with a single line per page. Product pages add an attribute and that fires the content view event. One delegated click listener catches any exit toward the checkout domain and fires the initiate checkout event, no matter how many buttons the page has.

The two rules written into the code itself are the expert part:

  • The site never fires the purchase event. The charge happens on the external platform, which already fires it. Duplicating it would inflate every sale and ruin the campaign report.
  • Product identifiers are normalized. The sales platform's short addresses do not match the internal identifiers, so a translation table exists. Without it, the same product would show up split in two and the funnel would not close.

On top of that, every measurement call is wrapped so a failure or an ad blocker can never break navigation or checkout.

6. Video creative factory

We built a video ad production line that requires no shoot: generated images, motion generated from those images, synthetic voice, captions rasterized to image, and final assembly with ffmpeg. The vertical and square formats are not crops of the same file but separate layouts, so the headline never gets cut off.

The technical piece that saves the most time: the edit is not timed by hand. A script reads the real duration of each voice line and derives from it every cut, every caption, the length of each shot, and the final dissolve. Changing the voice changes the pacing, and the video reassembles itself with two commands. For the piece with a presenter, the cuts come from a transcript with per-word timestamps rather than planned timings, so every caption lands on the exact word.

The cost per piece in generation credits and which model suits which task were also documented, which is exactly the kind of knowledge a client does not have and is paying for.

7. Content governance and compliance

A set of hard rules was written that applies to both the product and the advertising:

  • No medical or treatment claims. Everything is framed as organizing, recording, and preparing.
  • No invented reviews. Any sample testimonial is labeled as a sample.
  • The literal legal disclaimer, identical, on every product and page.
  • In ads: no faces claiming first-hand experience, because a generated face narrating a personal experience is, in practice, a fake review. No clinical material on screen, and the condition is never named.
  • The AI-generated content disclosure box checked on the ad platform.
  • A human review gate before anything goes out.

This is not bureaucracy. In health niches it is what separates an active ad account from a banned one, and a store that sells from a lawsuit.

Decisions worth understanding

DecisionAlternative rejectedReason
Static site with no frameworkAn app on a modern frameworkThe site is a brochure with buy links. A framework would have added maintenance without adding a single sale
First-party database for signupsAn email platform from day oneThe list gets captured today and connects to a provider once there is budget and a sequence. Capture first, decide later
External checkout as merchant of recordOur own payment gatewayWith no US legal entity, running your own gateway means handling international taxes. That is not a software problem
Optimize campaigns on initiate checkoutOptimize on purchaseThe external checkout reports in a limited way. At low volume, optimizing on purchase leaves the algorithm without signal
Always send traffic to our own sitePoint the ad straight at the checkoutSending to our own site is what keeps the funnel events inside our measurement
Product as HTMLProduct in a design toolVersionable, regenerable, and editable by script

Current state and what was delivered

  • A catalog of five digital products defined, produced, and published.
  • Their own store on their own domain, live, with legal pages and real previews.
  • Checkout on a branded domain, with two cross-sell offers configured.
  • Email capture live, with first-party, exportable storage.
  • Measurement installed, with a content view and initiate checkout funnel.
  • Two finished video ads in two formats each, plus static creatives.
  • A written campaign plan with budget, numeric expectations, and a review gate.
  • The store taking around $150 a day, sustained since the second week.

Deliberate open items, left by decision rather than oversight: a follow-up email sequence, a free traffic engine on the niche's visual social network, and the marketplace channel, which stays blocked until a legal entity exists.

Honesty about the numbers. The first paid campaign was planned on the assumption that it would not be profitable, and the plan spelled out what that budget actually bought: learning about which hook stops the scroll, and a clean account history. Reality came out ahead of the plan. We still prefer to put the conservative expectation in writing before spending, because a vendor who only ever shows you the good scenario is not a vendor you can plan around.

What transfers to another business

This project works as a template for any digital product or lead capture business, and each piece sells separately:

  1. Digital store in a week: catalog generated from source, static site, external checkout, legal pages, measurement, and first-party lead capture.
  2. First-party lead capture: edge endpoint, database, export, and source attribution, for anyone locked into an email platform.
  3. Creative factory: AI video ad production, with the edit assembled automatically from the voice track, in multiple formats.
  4. Clean measurement: an audit of duplicate events, normalization of product identifiers, and optimization rules matched to real volume.
  5. Compliance in sensitive niches: language rules, legal disclaimer, AI disclosure, and a human review gate.

They all share the same thesis: automate what repeats, and reserve human judgment for trust and taste.

Risks and limits

This goes in the proposal, not in the fine print:

  • Automation does not create demand. With zero traffic, a perfect store sells zero.
  • Health niches carry higher ad costs and a higher risk of ad rejection.
  • Depending on an external checkout platform means accepting its measurement limits.
  • Generative models change in price and in quality. The production line has to be able to swap models without being rebuilt.
  • Everything published goes through human review. The automation proposes, the person approves.

Glossary

TermWhat it means here
Edge functionCode that runs on the server closest to the user, with no server of your own to maintain
CDNA distribution network that serves the site from the point closest to the visitor
Merchant of recordThe checkout platform legally sells on your behalf and handles taxes
PixelA measurement snippet that reports funnel events to the ad platform
Printable productA file the buyer downloads, prints, or fills in on screen
Lead magnetA free product whose goal is capturing the email, not revenue
Cross-sellAn offer that moves a single-product buyer up to the full bundle

Do you have a digital product and you are still doing everything else by hand? That is exactly the part that gets automated.

Every week you wait leaves money on the table.

In 30 minutes I'll show you what to automate first, what it costs, and when it pays back. Free.