Turn dense academic PDFs into kid-friendly Doraemon comics powered by Gemini 3 Pro.
- News
- Overview
- Demo
- Features
- Tech stack
- Getting started
- Project structure
- How it works
- Available scripts
- Troubleshooting
- Star history
🎉 Our site is ready! Visit the live application at visualize.top/zh/ai-comic-generator – transform your PDFs into Doraemon comics instantly!
Paper Comicizer ingests any academic PDF, asks Gemini 3 Pro to summarize the core ideas, plans a Doraemon-themed lesson, and renders every page of the lesson as a comic strip. The UI focuses on clarity: upload a file, monitor three workflow stages (analyze → plan → generate), and browse the generated comic with thumbnails and page navigation.
- 📄 PDF ingestion – drag-and-drop upload converts any PDF to base64 before sending it to Gemini.
- 🤖 Multi-step reasoning – Gemini analyzes the paper, plans the narrative, and renders each panel.
- 🎨 Live comic rendering – each generated page appears immediately in the Comic Viewer with full-size previews and thumbnails.
- 🔐 AI Studio key management – prompts the user to pick an API key and gracefully handles expired sessions.
- ⚙️ Service layer –
services/geminiService.tscentralizes prompt templates, error handling, and typed responses. - 🧠 Typed workflow state –
AppStatus,ProcessingState, andComicPagekeep the UI predictable and resilient.
| Layer | Details |
|---|---|
| Front-end | React 19 + TypeScript, Vite 6 |
| Styling | Utility classes (Tailwind-style) with playful fonts and gradients |
| AI | @google/genai SDK calling Gemini 3 Pro (text + image) |
| Build | Vite dev server, static export-ready |
- Node.js 18.18+ (Vite 6 requires modern Node runtimes)
- npm 9+ (comes with recent Node releases)
- A Gemini API key with billing enabled (https://ai.google.dev/gemini-api/docs/api-key), Currently free for gemini3 and nano banana 2
# clone your fork, then:
cd Paper-Comicizer
npm installCreate a .env.local file in the project root with your Gemini API key:
GEMINI_API_KEY="your-key-here"AI Studio automatically injects the key if you launch the hosted experience, but local development requires this file.
npm run devOpen the printed localhost URL. Upload a PDF and watch the progress indicator walk through the three stages.
To create an optimized production build:
npm run build
npm run preview # optional: serve the dist folder locally.
├── App.tsx # App workflow coordinator (upload → progress → viewer)
├── components/
│ ├── FileUpload.tsx # Drag-and-drop area + API key CTA
│ ├── ProgressBar.tsx # Stage-aware progress + errors
│ └── ComicViewer.tsx # Thumbnail navigator & page viewer
├── services/
│ └── geminiService.ts # Analyze, plan, and render helpers for Gemini 3 Pro
├── constants.ts # Prompt strings and shared model configuration
├── types.ts # Strong typing for app status and comic pages
├── metadata.json # AI Studio metadata for deployment
└── vite.config.ts # Vite + React plugin setup
- Authenticate – The app checks whether AI Studio already has a selected key. If not, it prompts you to choose one.
- Analyze –
analyzePapersends the PDF (base64) to Gemini 3 Pro for summarization. - Plan –
planStoryrequests a JSON plan that breaks the topic into kid-friendly scenes. - Generate – For each plan step,
generateComicPagecalls the image endpoint and streams progress back to the UI. - Review –
ComicViewerdisplays full-resolution images with captions so you can retell the paper to younger audiences.
| Script | Description |
|---|---|
npm run dev |
Start Vite in development mode with HMR |
npm run build |
Bundle the app for production |
npm run preview |
Preview the production build locally |
- "Authentication Required" – Click Connect API Key to re-authorize with AI Studio.
- Stuck on analysis – Ensure the PDF is under Gemini’s payload limit and your API key has sufficient quota.
- Blank images – Regenerate; Gemini occasionally produces empty frames if the prompt budget is exceeded.
Email: [email protected]
Happy comicizing! 🎨📚
This project is sponsored by OpenSQZ
