How satlasrohit/comiccraft works
ComicCraft is a FastAPI comic-creation app. A user submits story and style details; routes orchestrate outline generation, narration, image generation, layout assembly, and preview. The preview can be exported as a multi-page PDF. The graph also shows the form, JSON API, development image endpoint, and export-success/download flow. The main runtime modules are excerpted; some UI, storage, and integrations are represented from README documentation, so their internal details are not expanded.
Main entry points: routes.py HTTP routes · comic_preview.html Comic preview · image_generator.py Panel images · panels Panel image files
Components 17
Web experience
- FastAPI app
app/main.py - HTTP routes
app/routes.py - Creation form
templates/index.html - Comic preview
templates/comic_preview.html - Export success
templates/export_success.html - Shared styles
static/css/styles.css - Comic store
app/routes.py
Story generation
- Outline generation
app/gemini_flash.py - Story writing
app/gemini_pro.py - Google Gemini
Illustration and layout
- Panel images
app/image_generator.py - Diffusers model
- Panel image files
static/panels - Layout builder
app/layout_builder.py
PDF export
- PDF exporter
app/exporters.py - Exported PDFs
static/exports
Other components
- Comic creator
Connections 21
- Comic creator → Creation form: enters details
README.md - Creation form → HTTP routes: submits prompt
README.md - FastAPI app → HTTP routes: includes router
app/main.py - HTTP routes → Outline generation: requests outline
app/routes.py - Outline generation → Google Gemini: generates outline
app/gemini_flash.py - HTTP routes → Story writing: requests story
app/routes.py - Story writing → Google Gemini: generates script
app/gemini_pro.py - HTTP routes → Panel images: generates panels
app/routes.py - Panel images → Diffusers model: runs pipeline
README.md - Panel images → Panel image files: writes images
README.md - HTTP routes → Layout builder: assembles layout
app/routes.py - Layout builder → Panel image files: checks image paths
app/layout_builder.py - HTTP routes → Comic store: registers comic
app/routes.py - HTTP routes → Comic preview: renders preview
README.md - Comic preview → Shared styles: uses styles
README.md - Comic preview → Panel image files: shows images
README.md - HTTP routes → Comic store: loads comic
app/routes.py - HTTP routes → PDF exporter: requests PDF
app/routes.py - PDF exporter → Exported PDFs: writes PDF
README.md - HTTP routes → Export success: renders result
app/routes.py - Export success → Comic creator: offers download
README.md