# ๐ฌ LocalMiniDrama
**A locally-running AI short drama & comic generator โ download and run, no cloud required, fully open source**
[](../../releases)
[](../LICENSE)
[](#)
[](#)
[](../../pulls)
**[ไธญๆ](../README.md) | English | [Author's Story](story.md)**
---
There are plenty of AI short-drama tools out there, but almost none that truly run **offline locally, work out of the box, and keep your assets private**.
This project is built entirely in JavaScript from scratch. Connect your own AI API and start generating your own AI short drama immediately.
> โ
No subscription ยท โ
Data stays local ยท โ
Multiple AI providers ยท โ
Fully open source
---
## ๐ธ Screenshots
 Project list ยท Export/Import projects |
 Storyboard editor ยท One-click image + video generation |
---
## โจ Features
### ๐ Full Creation Workflow
| Step | Feature | Description |
|:----:|---------|-------------|
| 1 | **Story Generation** | Enter a synopsis + style; AI generates a full multi-episode script |
| 2 | **Script Editing** | Manage episodes and freely edit script text |
| 3 | **Character Generation** | AI extracts characters; generate a portrait image for each |
| 4 | **Scene Generation** | Auto-extract scenes from script; generate scene background images |
| 5 | **Prop Generation** | Extract / manually add props; generate prop images |
| 6 | **Storyboard Generation** | Auto-generate storyboard per episode (shot type, camera, dialogueโฆ) |
| 7 | **Image / Video Generation** | Generate still image and video clip for each shot |
| 8 | **Video Synthesis** | Automatically merge all shot videos into a complete episode |
### โก One-Click Pipeline
- **Generate All**: Characters โ Scenes โ Storyboard โ Images โ Videos โ Synthesis โ fully automated
- **Fill & Generate**: Intelligently skips already-generated content; only fills what's missing
- **Auto Retry**: Up to 3 retries per step (handles 429 rate limits etc.); errors are logged and the pipeline continues
- **Live Progress**: Shows the current step and full error log in real time
### ๐ Project & Asset Management
- **Project Export / Import**: Pack the full project as a ZIP (images, videos, text, configs); share or migrate with one file
- **Material Library**: Global character / scene / prop library reusable across projects; per-project and global libraries are strictly isolated
- **Aspect Ratio**: Set the ratio (16:9 / 9:16 / 1:1 โฆ) when creating a project; all generated images and videos adapt automatically
- **Episode Management**: Add / delete episodes; script preview
### โ๏ธ Storyboard Fine Editing
- **Classic vs Universal mode**: Toggle per storyboard. **Classic** shows the main reference image in the center (video is blocked with a prompt if no reference image); **Universal mode** uses a **segment prompt** field (`universal_segment_text`) for omni video APIs โ pair with **`volcengine_omni`** (Volcengine Ark Seedance 2.0 multi-image) or **`kling_omni`** (Kling Omni), with a pre-submit config check. Classic fields remain; switch back anytime
- **`@Image1` โฆ slot references**: In the segment prompt, use **`@ๅพ็1` / `@ๅพ็2` โฆ** to align with the reference order (scene โ characters โ props; excludes the classic center panel image); โGenerate from storyboardโ can fill camera/movement hints. If the segment prompt is non-empty, **only that text** is sent for video (structured video fields are not concatenated)
- **Tail-frame link** (v1.2.7): Extract the last frame from the current shotโs completed video and set it as the next shotโs first frame
- **Export storyboard sheet** (v1.2.7): Export the current episode to an HTML table for review and collaboration
- **Image Prompt**: View and edit the image-generation prompt for each shot; regenerate after changes
- **Video Prompt**: Edit the full prompt text, or expand the composition panel to edit individual fields (scene / duration / action / mood / camera / shot type) โ auto-reassembled on save
- **Image Management**: AI generation, manual upload, drag-and-drop; replace at any time
### ๐ค AI Configuration
- Three independent model slots: **image generation**, **video generation**, **text generation**
- Compatible with **Alibaba DashScope**, **Volcengine (Doubao)**, **locally-deployed models** and any OpenAI-compatible API
- Visual config panel; changes take effect immediately; **connection test** supported
- Built-in quick-setup wizards for DashScope and Volcengine, with step-by-step API key instructions
### ๐ UI / Theme
- **Dark mode** (default) and **Light mode** toggle, preference persisted
- Theme toggle available on every page
---
## ๐ Quick Start
### Option A โ Download exe (recommended)
Go to **[Releases](../../releases)** and download the latest:
- `LocalMiniDrama Setup x.x.x.exe` โ NSIS installer
- `LocalMiniDrama x.x.x.exe` โ portable, no install needed
Double-click โ open **AI Config** โ enter your API key โ start creating.
> On first launch a config file is created at:
> `%APPDATA%\LocalMiniDrama\backend\configs\config.yaml`
### Option B โ Development Mode
> Requires Node.js >= 18
```bash
# 1. Clone
git clone https://github.com/your-username/LocalMiniDrama.git
cd LocalMiniDrama
# 2. Backend (port 5679)
cd backend-node
npm install
cp configs/config.example.yaml configs/config.yaml
# Edit config.yaml โ set your AI API endpoint and key
npm run migrate # first run: initialise DB
npm start
# 3. Frontend (new terminal, port 3013)
cd frontweb
npm install
npm run dev
```
Open `http://localhost:3013` in your browser.
You can also double-click `run_dev.bat` at the project root to **start both servers at once**.
๐ Full developer guide, packaging, and FAQ โ **[Quickstart Guide](quickstart.md)**
---
## ๐ค AI Provider Support
| Provider | Text | Image | Video |
|----------|:----:|:-----:|:-----:|
| Alibaba DashScope (Qwen) | โ
| โ
| โ
|
| Volcengine / Doubao | โ
| โ
| โ
|
| Local (Ollama, OpenAI-compat.) | โ
| โ | โ |
| Other OpenAI-compatible APIs | โ
| โ
| โ |
๐ API key registration and configuration โ **[Configuration Guide](configuration.md)**
---
## ๐ Architecture
```
LocalMiniDrama/
โโโ backend-node/ # Node.js backend (Express + SQLite)
โ โโโ src/
โ โ โโโ config/ # YAML config loader
โ โ โโโ db/ # SQLite connection & migrations
โ โ โโโ services/ # Business logic (generation, export/importโฆ)
โ โ โโโ routes/ # REST API routes
โ โโโ configs/ # config.yaml lives here
โโโ frontweb/ # Vue 3 frontend (Vite + Element Plus)
โ โโโ src/
โ โโโ views/
โ โ โโโ FilmList.vue # Home: project list & material library
โ โ โโโ DramaDetail.vue # Drama: info / episodes / resource library
โ โ โโโ FilmCreate.vue # Studio: script / characters / storyboard
โ โโโ api/ # Backend API wrappers
โ โโโ stores/ # Pinia state management
โ โโโ styles/ # Global styles & theme variables
โโโ desktop/ # Electron shell (builds the exe)
โโโ docs/ # Documentation
โโโ README.md
```
**Tech Stack:**
| Layer | Technology |
|-------|-----------|
| Frontend | Vue 3 + Vite + Element Plus + Pinia + Axios |
| Backend | Node.js + Express + SQLite (better-sqlite3) |
| Desktop | Electron 28 + electron-builder |
| Language | Plain JavaScript (no TypeScript) |
---
## ๐ Changelog
Full version history โ **[CHANGELOG](changelog.md)**
**Latest v1.2.7 highlights:**
- ๐ **Tail-frame link** โ one-click extract the last frame of the current shotโs video (server-side ffmpeg) and set it as the **next shotโs first frame**
- ๐ **Export storyboard sheet** โ export the current episodeโs shots to an **HTML table** (dialogue, narration, universal segment, prompts, etc.)
- ๐ **Unified generation task progress** โ shared Pinia store for character/scene/prop/storyboard image & video async jobs, with recovery after page refresh
- ๐ง **Video mode guards** โ Universal mode checks **`kling_omni`** or **`volcengine_omni` + Seedance 2.x** before Omni multi-ref submit; Classic mode blocks video when no storyboard reference image
- ๐ง **Separate first/last frame binding** โ last frame no longer overwrites the main panel; Seedance 2.0 certified assets marked stale when the character main image changes
**v1.2.6 / v1.2.5 highlights:**
- ๐ **Seedance 2.0 + Universal storyboard mode** โ `volcengine_omni` / `kling_omni`, multi-ref **`@ๅพ็N`**, `universal_segment_text` (see [CHANGELOG](../CHANGELOG.md))
**v1.2.3 highlights:**
- ๐ **Storyboard narrator (narration)** โ optional per-shot voice-over text separate from character `dialogue`, for TTS and editing
- ๐ **Export narration SRT** โ build subtitle cues from shot order and durations
- ๐ง **First-shot empty narration fix** โ incrementally saved rows are merged from the final parsed JSON so stream-early inserts are not stuck without `narration`
- ๐ง **Stricter narration prompts** โ system/user instructions require opening VO and non-empty lines when the mode is enabled
- ๐จ **Narration UI** โ textarea/button contrast in light & dark themes; high-contrast โExport SRTโ button
**Earlier releases:** see **[CHANGELOG.md](../CHANGELOG.md)** for v1.2.2 (coherent frames, novel import, ffmpeg) and full history.
---
## ๐ฏ Who Is This For
| User | Scenario |
|------|----------|
| ๐น Content creators | Batch-produce AI short dramas / comics |
| ๐ Privacy-conscious users | Keep all assets local, no cloud uploads |
| ๐ Developers | Extend AI providers or customise the pipeline |
| ๐ฑ Beginners | Explore the AI video space at zero cost |
---
## ๐ Similar Tools
| Tool | Notes |
|------|-------|
| **Kino ่ง็** | Active Chinese AI short-drama platform; cloud-based, closed source |
| **Filmaction AI** | AI-driven plot / storyboard / voice; SaaS / web, partly paid |
| **oiioii** | Open source, lightweight AI visual creation, flexible deployment |
| **ChatFire** | AI dialogue-based short drama; inspired this project's backend design |
This project focuses on **local offline use, a friendly UI, and easy customisation**. Feel free to open an [Issue](../../issues) to recommend other tools.
---
## ๐ค Contributing
All contributions are welcome!
- ๐ **Report a bug** โ [New Issue](../../issues/new)
- ๐ก **Suggest a feature** โ [New Issue](../../issues/new)
- ๐ง **Submit code** โ Fork โ Edit โ Pull Request
- โญ **Star the project** โ Help others discover it
---
## โ Buy the Author a Coffee
LocalMiniDrama is **free, open source, and runs locally** โ maintained in spare time. If it saved you hours or helped ship a short drama, optional tips are warmly appreciated (any amount; totally voluntary).
> Tips do **not** affect features, issues, or PRs. A โญ Star or sharing the repo helps just as much.

WeChat Pay
|

Alipay
|
---
## ๐ฌ About the Author
Just an ordinary game developer who got excited about the AI short-drama trend and built this open-source tool in JavaScript. Ship first, figure out the rest later.
Full story, inspirations, and acknowledgements โ [Author's Story](story.md)
---
## ๐ License
[MIT](../LICENSE)
---
**If this project helps you, a โญ Star is the best encouragement for the author!**