Animated HTML Deck Generator: A Six-Line Brief Becomes a Published Presentation
The Ark Deck Generator turns a short brief into a finished, animated web presentation with no slide software involved. A caller authenticates, POSTs a compact markdown brief with a chosen theme and depth, and receives an async job that runs a five-step pipeline — research, design, refine, publish — before returning a live URL. The output is a genuinely self-contained animated HTML deck: inline CSS keyframes and transitions for the animation, inline JavaScript, and its own shareable slug on decks.chakrakali.com. In the verified run, a roughly six-line markdown brief expanded into a 244,691-byte deck with 147 slide sections, three script blocks, three style blocks, real @keyframes animations, and the exact title from the brief — the size and structure alone prove genuine LLM synthesis and layout rather than a template echo. The service is production-real on the security front too: authentication is enforced (an unauthenticated generate request returns 401), tokens are validated cross-service against the shared ark-auth issuer (a token from a different local issuer was correctly rejected), and each user runs against a per-user quota keyed on their identity. Beyond one-shot generation, the API exposes a full editing surface — regenerate a section, edit a section, fetch a deck by slug, preview, research, and upload.
Key Metrics
Brief-to-deck output
Before
AI stops at text/outline; the human assembles and animates the deck
After
A ~6-line brief produced a complete 244 KB, 147-section self-contained animated HTML deck, published to a shareable URL
Artifact self-containment
Before
HTML with external, rot-prone dependencies
After
Inline CSS keyframes and JS in a single file — hosts anywhere, verified with 3 style + 3 script blocks and real @keyframes
Access control
Before
Open endpoint or rubber-stamped tokens
After
Enforced HS256 JWT validated cross-service (foreign-issuer token rejected), with per-user quota keyed on user_id
Request handling
Before
N/A
After
Async 202 + jobId with a pollable 5-step pipeline that survives client disconnects during the ~30-60s generation
Watch the Walkthrough
The Challenge
Turning an idea into a polished presentation is still a manual slog: open slide software, fight with layout, pick a theme, animate transitions by hand, then figure out how to share it. AI tools that promise to help usually stop at generating text or a static outline — the human still has to assemble and animate the actual deck. And a generator that does produce HTML often produces a fragile artifact: external stylesheet and script dependencies, CDN links that rot, no self-contained file to host anywhere. On top of that, any generator worth selling has to be a real service, not an open endpoint — which means enforced authentication, tokens that are actually validated (not rubber-stamped), and per-user usage limits, all of which are easy to fake and hard to get right. The goal is a generator that takes a short brief and returns a complete, self-contained, animated presentation on a shareable URL, behind real auth, with an editing surface for iteration.
Why This Approach?
Request model
Async job — 202 + jobId, pollable 5-step pipeline (research, design, refine, publish)
LLM-backed deck generation takes ~30-60 seconds. A synchronous request would time out or hold a connection open the whole time; an async 202 + jobId lets the client poll progress and survives disconnects — the job keeps running server-side even if the caller drops.
Alternatives considered: Synchronous request that blocks until done, fire-and-forget with no status
Output format
Self-contained animated HTML with inline CSS keyframes and JS, published to a slug
A self-contained HTML file with inline animation has no external dependencies to rot and can be hosted anywhere — and publishing it to a per-deck slug on decks.chakrakali.com gives every generation a shareable URL out of the box.
Alternatives considered: PDF export, external-asset HTML, a slide-editor JSON document
Authentication
Enforced HS256 JWT via the shared ark-auth issuer, validated cross-service, with per-user quota
A sellable generator must gate access for real. Validating tokens against the shared ark-auth issuer — and rejecting tokens from any other issuer — means the gate is genuine, not a rubber stamp. Keying quota on user_id makes per-user metering possible.
Alternatives considered: Open endpoint, a static API key, self-signed tokens the service trusts blindly
Build Process
Enforced authentication gate
Generation requires a valid JWT. An unauthenticated POST /api/generate returns 401 (NO_TOKEN). Tokens are HS256, minted only by the shared ark-auth issuer (auth.chakrakali.com), and validated cross-service — a token from a different local issuer was correctly rejected (BAD_TOKEN), proving the gate is real and not a rubber stamp.
Async generation pipeline
An authenticated request returns 202 with a jobId and runs a five-step pipeline — research, design, refine, publish — pollable via GET /api/generate/:id. The async model handles the ~30-60s LLM generation time and survives client disconnects, since the job continues server-side.
Self-contained animated deck
The pipeline publishes a self-contained animated HTML deck to a per-deck slug on decks.chakrakali.com. Verified: a ~6-line markdown brief produced a 244,691-byte deck with 147 sections, real @keyframes/transition/animation, and inline scripts and styles — genuine LLM synthesis and layout, not a template echo.
Theming, quota, and editing surface
A curated theme system (6+ themes including AI-picks) supports a brand-color override (brand_hex). Each user runs against a per-user quota keyed on user_id. Beyond one-shot generation, the API exposes regenerate-section, edit-section, deck/:slug, preview, research, and upload — a full iteration surface. The engine (htmlgen-engine) is invoked per request, so output can change without a redeploy.
Challenges & Solutions
Impact
The user still has to assemble, style, and animate slides by hand, and then solve hosting and sharing separately.
Solution
A pipeline that generates and publishes a complete self-contained animated HTML deck to its own shareable URL from a short brief.
Result
Verified: a ~6-line brief became a 244 KB, 147-section animated deck live at a decks.chakrakali.com slug — finished and shareable, not an outline.
How AI Powers This
AI Capability
Brief-to-Deck Synthesis
Write a few lines of markdown; get back a complete, animated, multi-section presentation — no slide software, no manual layout
Business outcome
Verified: a ~6-line brief produced a 244 KB, 147-section animated deck — proof of real synthesis and layout, not a template fill
Under the hood
POST /api/generate {content, style, title, depth} -> 202 + jobId -> 5-step pipeline (research, design, refine, publish) via htmlgen-engine -> published deck URL
How success is measured: Expansion fidelity (does a short brief yield a full, coherent deck), animation quality, title/content accuracy
AI Capability
Section-Level Regeneration & Editing
Don't like one slide? Regenerate or edit just that section instead of starting the whole deck over
Business outcome
Iterative refinement at the section level — a full editing surface, not one-shot-only generation
Under the hood
/api/regenerate-section and /api/edit-section operate on individual sections of a stored deck (fetched via /api/deck/:slug), with /api/preview for iteration
How success is measured: Section-level edit correctness, preservation of the rest of the deck
AI Capability
Themed, Brand-Colored Output
Match the deck to your brand — pick from curated themes or supply your exact brand color as a hex override
Business outcome
Decks come out on-brand without manual restyling
Under the hood
GET /api/themes exposes 6+ themes including AI-picks; a brand_hex (#rrggbb) parameter overrides the palette at generation time
How success is measured: Theme application fidelity, brand-color adherence
Results & Metrics
Brief-to-deck output
ImprovedBefore
AI stops at text/outline; the human assembles and animates the deck
After
A ~6-line brief produced a complete 244 KB, 147-section self-contained animated HTML deck, published to a shareable URL
Artifact self-containment
ImprovedBefore
HTML with external, rot-prone dependencies
After
Inline CSS keyframes and JS in a single file — hosts anywhere, verified with 3 style + 3 script blocks and real @keyframes
Access control
ImprovedBefore
Open endpoint or rubber-stamped tokens
After
Enforced HS256 JWT validated cross-service (foreign-issuer token rejected), with per-user quota keyed on user_id
Request handling
ImprovedBefore
N/A
After
Async 202 + jobId with a pollable 5-step pipeline that survives client disconnects during the ~30-60s generation
Iteration
ImprovedBefore
One-shot generation only
After
Section-level regenerate/edit plus preview, research, upload, and fetch-by-slug editing surface
System Overview
The architecture below is the technical foundation behind every business outcome on this page — built for reliability, low running cost, and the speed your customers feel.
A Rust service (htmlgenerator, :3951) fronting htmlgen-engine, invoked per request so output changes without a redeploy. Generation is auth-gated: enforced HS256 JWT minted only by the shared ark-auth issuer (auth.chakrakali.com) and validated cross-service (foreign-issuer tokens rejected), with per-user quota keyed on user_id. POST /api/generate returns 202 + jobId and runs a pollable 5-step pipeline (research, design, refine, publish) that survives client disconnects; the result is a self-contained animated HTML deck (inline CSS keyframes + JS) published to a per-deck slug on decks.chakrakali.com. A curated theme system supports a brand_hex override. Editing surface: /api/regenerate-section, /api/edit-section, /api/deck/:slug, /api/preview, /api/research, /api/upload. Live over the Cloudflare production route.Technologies Used
Rust, htmlgen-engine, ark-auth (HS256 JWT), async job pipeline, LLM synthesis, self-contained animated HTML