Back to .md Directory

AI TikTok Slideshow Generator — Full Info Sheet

Defines a manual workflow for generating AI-powered TikTok slideshows, including hook creation, image generation, review queue, posting, and performance tracking.

May 2, 2026
0 downloads
3 views
ai claude openai
View source

What this file does

Defines a manual workflow for generating AI-powered TikTok slideshows, including hook creation, image generation, review queue, posting, and performance tracking.

When to use it

  • Building a personal tool for high-volume TikTok content creation
  • Automating slideshow generation with AI image and text models
  • Implementing a feedback loop to improve hooks and CTAs over time
  • Setting up a monorepo with tRPC, Hono, React, and SQLite

Assumes this stack

BunTurborepoHonotRPCReactTanStack Router

AI TikTok Slideshow Generator — Full Info Sheet

What It Does

Personal tool that generates TikTok photo carousel slideshows for your product. You trigger everything manually from a dashboard, review and approve, then add music in TikTok and publish. The system tracks performance and gets smarter over time.

Why Slideshows, Not Video

  • TikTok data: carousels get 2.9x more comments, 1.9x more likes, 2.6x more shares vs video
  • TikTok algorithm actively pushing slideshows in 2026
  • AI image gen is solved — consistent, cheap, fast
  • AI video is expensive ($0.10-0.40/sec) and inconsistent
  • Cost: ~$0.30-0.70 per slideshow vs $2-10 per video
  • Volume wins on TikTok — need 2-3 posts/day, slideshows make that affordable

Tech Stack

LayerTech
RuntimeBun
MonorepoTurborepo
BackendHono
APItRPC
FrontendReact + TanStack Router
DatabaseSQLite + Drizzle ORM
UIshadcn/ui + Tailwind
ScaffoldedBetter-T-Stack

Project Structure

slidelot/
├── apps/
│   ├── server/          # Hono backend (port 3000)
│   │   └── src/index.ts # tRPC at /trpc/*, CORS, logger
│   └── web/             # React frontend (port 3001)
│       └── src/
│           ├── routes/  # TanStack file-based routing
│           ├── components/ui/  # shadcn components
│           └── utils/trpc.ts   # tRPC client
├── packages/
│   ├── api/             # tRPC routers (packages/api/src/routers/)
│   ├── db/              # Drizzle schema (packages/db/src/schema/)
│   ├── config/          # Shared TS config
│   └── env/             # Zod env validation

Models & Services

Core (required)

ComponentModel/ServicePriceNotes
Hook + captionClaude Sonnet 4.5~$0.02/postStructured output: hook, script, caption, CTA
Image generationOpenAI GPT Image 1.5$0.04-0.12/imgHighest quality (1264 Elo). Batch API = half price
Text overlaysharp (local)FreeFull control over font size, position, line breaks
TikTok postingPostiz APITheir pricingPosts as drafts. Also provides analytics API

Optional / Future

ComponentModel/ServicePriceNotes
Text-heavy slide 1Ideogram 3 API~$0.04/imgBest text rendering if sharp overlay not enough
Cheaper imagesGemini 3 Pro Image~$0.02/imgGreat quality, half the price of OpenAI
Fast/cheap imagesFlux 2 Pro via fal.ai~$0.03/imgBest value, ultra fast
Revenue trackingRevenueCat APIFree tierFull funnel: views -> downloads -> trials -> paid
Video (later)fal.ai gateway$0.05-0.40/sec600+ models: Kling 3.0, Veo 3.1, Sora 2 via 1 API
Voice (later)Fish Audio~$60-90/yr#1 on TTS-Arena, better value than ElevenLabs

Skipped

SkippedWhy
HiggsfieldUI layer over other models. Bad API docs. No benefit over direct calls
MidjourneyNo public API. Discord-only. Can't use programmatically
Runway Gen4.5Great for video but we're doing slideshows. Expensive
ElevenLabsFish Audio is cheaper and ranked #1 on TTS-Arena

Cost Per Slideshow

ItemCost
6 images (GPT Image 1.5 batch)~$0.24-0.48
Claude for hook + caption~$0.02
Text overlay (sharp, local)$0.00
Total~$0.30-0.50

At 3 posts/day: ~$30-45/month

The 6-Slide Structure

SlidePurposeDetails
1HookBold text overlay + scene. Determines everything
2ProblemRelatable pain point your audience feels
3Discovery"Then I found..." moment
4Transform 1Before/after or first result
5Transform 2Another angle or deeper result
6CTASoft sell, natural product mention

Image Generation Rules

RuleValueWhy
Dimensions1024x1536 portraitAlways. TikTok is vertical
Scene consistencyOne locked descriptionSame scene across all 6. Only style/content changes
Text font size6.5% of image heightSmaller = unreadable on phones
Text position30% from topTop 10% hidden by TikTok status bar
Bottom dead zoneBottom 20%Hidden by caption + buttons
Line breaksEvery 4-6 wordsPrevents horizontal squashing
Hook on slide 1Full hook, never splitPeople swipe away before slide 2

Hook Strategy

Proven Formulas

  • "I showed my [person] what AI thinks and they couldn't believe it"
  • "Nobody talks about..."
  • "POV: you just discovered..."
  • "I was today years old when..."
  • "[Person] reacted to..."

Rules

  • Always include another person + their reaction (relatability)
  • "I redesigned my room" = nothing. "I showed my landlord" = 200K views
  • 80% of creative energy goes into hooks
  • Every hook scored by views after posting
  • Winners cloned into 3 variations
  • Losers logged with reasons

Caption Rules

  • Storytelling format, not feature lists or ad copy
  • Continue narrative from the hook
  • Natural product mention: "I used [app] and honestly wasn't expecting much but look at this"
  • Never: "Download MyApp now!"
  • Max 5 hashtags (TikTok limit)

Database Schema

Tables

posts — generated slideshow posts

  • id, hookId, status (pending/approved/posted/rejected)
  • slides (json array of file paths)
  • caption, postedAt, postizId, createdAt

hooks — hook texts with performance scores

  • id, text, formula, viewCount, score
  • status (untested/winner/loser)
  • parentHookId (for variations), createdAt

analytics — performance data per post

  • id, postId, views, likes, comments, shares
  • downloads, trials, conversions, pulledAt

learnings — auto-generated rules from performance

  • id, rule, source (auto/manual), createdAt

settings — niche, product info, API keys

  • key, value

tRPC Routers

posts

  • posts.list — filter by status (pending, approved, posted)
  • posts.get — single post with slides
  • posts.approve — sets status, triggers Postiz upload
  • posts.reject — sets status, logs reason
  • posts.regenerate — re-queues with same hook

hooks

  • hooks.list — all hooks with scores
  • hooks.generate — trigger Claude to generate new hooks
  • hooks.update — edit a hook

generation

  • generation.createSlides — generate slideshow for a hook
  • generation.status — check if generation is running

analytics

  • analytics.dashboard — today's numbers, top posts
  • analytics.diagnosis — the 2x2 matrix (views x conversions)
  • analytics.pull — trigger Postiz analytics fetch
  • analytics.report — run diagnosis + update learnings

settings

  • settings.get — read all settings
  • settings.update — update a setting

Dashboard Routes

RoutePurpose
/Dashboard — quick stats, recent posts
/generateGenerate hooks -> create slides -> review
/queueReview queue — swipeable slide previews, approve/reject
/post/$idSingle post — full slide gallery, caption, analytics
/hooksHook library — scored list, formulas, winners/losers
/analyticsPerformance charts + diagnosis matrix
/settingsConfig: niche, product, API keys

User Flow (all manual, no cron)

1. Open dashboard -> hit "Generate Hooks"
   -> Claude generates 5-10 hooks based on niche + past performance

2. Pick hooks you like -> hit "Create Slides"
   -> GPT Image 1.5 generates 6 images per hook
   -> sharp adds text overlay to slide 1
   -> Claude writes caption
   -> Posts land in review queue

3. Review queue -> swipe through slides, read caption
   -> Approve / Edit / Reject / Regenerate

4. Approved posts -> auto-push to TikTok as drafts via Postiz

5. Open TikTok -> add trending music -> publish (60 sec)

6. When you want -> hit "Pull Analytics"
   -> Fetches view counts from Postiz
   -> Optional: fetches revenue from RevenueCat

7. When you want -> hit "Run Report"
   -> Diagnosis matrix runs
   -> Updates hook scores
   -> Generates winner variations
   -> Logs failures
   -> Updates knowledge/learnings

Feedback Loop — Diagnosis Matrix

ViewsConversionsDiagnosisAction
HighHighWinnerGenerate 3 hook variations, scale
HighLowWrong audience / weak CTAKeep hook, rotate CTA
LowHighGreat CTA, weak hookKeep CTA, test stronger hooks
LowLowDudDrop it, log to failures

Bigger Picture

SignalProblemFix
Views + downloads up, nobody payingApp onboarding/paywallPause posting, fix app
Views up, nobody downloadingCTAs not workingRotate CTAs
Everything converting, views lowContent great, hooks weakFocus on stronger hooks

Knowledge System (compounds over time)

Stored in DB (learnings table) and injected into Claude prompts each generation:

  • Hook formulas — seeded with proven templates, grows as winners emerge
  • Failures — every flop with hook text, view count, one-line reason
  • Rules — auto-generated from data ("hooks with reactions outperform solo 3:1")

TikTok Account Tips

  • Warm up 7-14 days before posting (scroll, like 1 in 10, follow niche accounts)
  • Ready when For You page is almost entirely your niche
  • Post as drafts, add trending music manually (10x reach vs no music)
  • 3 posts/day target, ~1 in 4 clearing 50K views is the goal
  • Never let TikTok auto-pick audio

Environment Variables Needed

Server (apps/server/.env)

DATABASE_URL=file:../../local.db
CORS_ORIGIN=http://localhost:3001
NODE_ENV=development
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
POSTIZ_API_KEY=...
POSTIZ_INTEGRATION_ID=...
REVENUECAT_API_KEY=...          # optional

Web (apps/web/.env)

VITE_SERVER_URL=http://localhost:3000

Build Order

  1. DB schema + migrations (packages/db)
  2. tRPC routers — settings, hooks, posts, generation, analytics (packages/api)
  3. Generation logic — Claude for hooks/captions, OpenAI for images, sharp for overlays (apps/server)
  4. Settings page — configure niche, product, API keys
  5. Generate page — trigger hooks, create slides
  6. Queue page — review, approve/reject (mobile-first)
  7. Post detail page — slide gallery + analytics
  8. Postiz integration — push approved posts as TikTok drafts
  9. Analytics pull — fetch performance from Postiz
  10. Report/diagnosis — feedback loop, knowledge updates
  11. Hooks page — library, scores, formulas
  12. Analytics dashboard — charts, diagnosis matrix

What's inside

14 sections covering tech stack, project structure, models, cost, slide structure, hooks, captions, DB schema, tRPC routers, dashboard routes, user flow, diagnosis matrix, knowledge system, and build order.

Change this for your project

  • Replace Simonstorms/slidelot with your own repository name
  • Replace ANTHROPIC_API_KEY=sk-ant-... with your own API key
  • Replace OPENAI_API_KEY=sk-... with your own API key
  • Replace POSTIZ_API_KEY=... with your own Postiz API key

Where it goes

Keep with your observability configuration. Describes what to track and alert on.

Worth borrowing

  • Diagnosis matrix that maps views vs conversions to specific actions
  • Knowledge system that stores hook formulas and failures to improve prompts over time
  • Manual trigger flow with no cron, giving full control over generation and posting

Related Documents