Tech Stack Overview
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + TypeScript | UI components and state management |
| Build Tool | Vite 5.1 | Fast development and optimized builds |
| Backend | Cloudflare Workers | Serverless API endpoints |
| Hosting | Cloudflare Pages | Static site hosting with edge functions |
| CMS | Sanity.io | Content management (episodes + generated assets) |
| Vector DB | Pinecone | RAG for design templates and brand guidelines |
| Editor | TipTap | Rich text editing (Notion-like) |
| Image Generation | Kie.ai (Nano Banana Pro) | AI-powered infographic generation |
| Testing | Vitest + Testing Library | Unit and integration tests |
| Styling | Tailwind CSS + Emotion | Utility-first CSS with styled components |
Architecture Diagram
Data Flow
1. Upload & Generate Pipeline
Upload Transcript
User uploads edited transcript from Adobe Podcast
- Stored in Sanity “Content Production” bucket
- Triggers automatic PRF generation
Generate PRF (Auto)
Podcast Repurposing Framework document generated using:
- Transcript as input
- RAG from Pinecone (brand guidelines, past examples)
- AI (Anthropic Claude or OpenRouter)
- Opens in TipTap rich text editor for refinement
Generate Viral Hooks (Auto)
After PRF validation, system auto-generates:
- 5-10 viral hooks from key moments
- Editable in TipTap editor
Generate Metadata (Manual)
Click to generate episode metadata:
- Title, description, tags
- Guest credentials
- Pushes to Sanity “Episodes” bucket
2. Design Page Flow (Infographics)
Sanity Schema Structure
Bucket 1: Episodes (Existing)
Used for public podcast website:Bucket 2: Content Production (New)
Used for content generation workflow:Key Components
Rich Text Editor (TipTap)
Features:- Formatting: Bold, italic, headings, lists
- Tables, images, colors, highlights
- Custom blocks (quote cards, infographic previews)
- Slash commands:
/heading,/quote,/image - Context menu: “Create Infographic”, “Create Quote Card”
- Drag-and-drop block reordering
AI Content Generation
RAG Pipeline (via Pinecone):- Query design database for relevant templates
- Retrieve brand guidelines
- Check generation history for variety
- Construct prompt with context
- Generate using Anthropic Claude
- Return structured output
- Circular: Doom Loop, Hub & Spoke, Concentric Circles
- Linear: Timeline, Staircase, Pipeline/Funnel
- Comparison: Split Screen, Quadrant Matrix, Spectrum
- Hierarchical: Pyramid, Tree, Pillars
- Grid: Card Grid, Dashboard Panels
- Network: Node Network, Workflow, Sankey Diagram
Image Generation (Kie.ai)
Endpoint:POST https://api.kie.ai/api/v1/jobs/createTask
Request:
- Aspect Ratios: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, auto
- Resolutions: 1K, 2K, 4K
- Key Feature:
image_inputallows transforming up to 8 existing images
Security & Authentication
JWT-based authentication:- Restricted to
@popularit.netemail addresses - 24-hour session expiration
- Password reset via Resend email service
- All team members have equal access
- Guest brand kit pages (
/share/:token) remain public
- Local:
.dev.varsfile (gitignored) - Production: Cloudflare Pages environment variables
- Wrangler CLI:
wrangler secret put SECRET_NAME
Performance Optimizations
Code Splitting (Vite)
API Caching (React Query)
Edge Computing (Cloudflare)
- API responses served from 200+ global edge locations
- Static assets cached at edge
- Sub-100ms response times worldwide
Next Steps
Setup
Get your local environment running
Testing
Learn the testing strategy
Deployment
Deploy to Cloudflare Pages
Contributing
Contribution guidelines