# Repository Briefing: 0xsline/StoryGen-Atelier
> Source: https://repoforai.com/repo/0xsline/StoryGen-Atelier (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/0xsline/StoryGen-Atelier
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: JavaScript
- **License**: Apache-2.0
- **Engineering Health**: B+ (65/100 · Maintenance 20/35 · Adoption 19/25 · Releases 6/20 · License 20/20)
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Self-Hosted
- **Momentum**: 1,036 ★ total (+0 24h / +10 7d) · 161 forks
- **Topics**: `ffmpeg`, `gemini`, `google`, `google-cloud-platform`, `veo`, `veo3`, `vertex-ai`
- **When to Use**: Best for: Creators and prototyping teams that want a self-hosted interface for turning a styled storyboard into a short concept video and can use cloud model APIs. Skip if: You need offline inference, strict on-premises handling of all prompts and images, or frame-accurate editing and encoding control.

## Overview
```text
### Architecture & Core Mechanics
StoryGen Atelier separates a React/Vite/Mantine UI in `frontend/` from a Node.js/Express API in `backend/`. The backend coordinates remote model calls, persists storyboard and video logs with `better-sqlite3`, and uses `fluent-ffmpeg` for media assembly. Model integration is configured through environment variables for text, image, and video stages.

In the default path, Gemini generates the script and storyboard images, then analyzes adjacent images with a sliding window to produce a transition prompt and suggested duration. The backend sends each prompt and its frame pair to Vertex AI Veo, runs clip generation in parallel, and creates a separate closing clip from the final shot. FFmpeg assembles the MP4s in storyboard order, independent of when individual clips finish.

### Key Capabilities & Differentiators
Users can set a visual style and shot count, generate storyboard frames, and turn the sequence into a single MP4. The default model settings use `gemini-3-pro-preview` for text, `gemini-3-pro-image-preview` for frames, and `veo-3.1-generate-preview` for video. The optional MiniMax path provides MiniMax-M3 for storyboard and transition text, image-01 for frames, and MiniMax-H3 for clips; its example video resolution is `2K`.

Storyboard and video logs can be viewed, exported, or cleared, while the gallery supports saving, loading, and deleting storyboards and videos. The prompt guide at `guide/VideoGenerationPromptGuide.md` gives users a reference for prompting. FFmpeg uses `-c copy`, so compatible clips are joined without re-encoding.

### Trade-offs & Limitations
Compared with calling Gemini or Veo directly and assembling outputs by hand, this app takes over prompt handoff, clip ordering, and output management. Compared with an FFmpeg script or timeline editor, it favors automated assembly over explicit control of each edit. Supplying endpoints constrains the transition but does not guarantee consistent characters, composition, or motion across independently generated clips.

Each additional shot adds another adjacent pair to plan and render, so longer storyboards increase API work, and parallel generation makes rate limits more relevant. Stream copy saves local encoding work but does not normalize incompatible clip streams, a consideration if outputs from different providers are mixed. The code is Apache-2.0; provider availability, billing, and data handling remain separate adoption considerations.

### Hardware & Deployment Guide
Install Node.js 18+, npm, and FFmpeg, then copy `backend/.env.example` to `backend/.env`. The default path needs a Gemini API key and a Google Cloud project with the Vertex AI API enabled for Veo. Set the project ID, region, and model, and confirm the deployment can authenticate to Vertex AI. For MiniMax, verify routing before running a job: setting `MINIMAX_API_KEY` can switch image and video generation even if the provider fields are blank.

Run `./start_servers.sh` from the root after granting execute permission, or use `start_macos.command` on macOS. The launcher starts the API on 3005 and the UI on 5180, checks that both ports respond, and writes separate logs. Manual startup and a frontend build are also available. No GitHub release is listed, so pin a tested revision for repeatable deployment. The app is self-hosted, but inference still requires access to external APIs.
```

## Key Capabilities
```text
- Transition planning: A sliding window over adjacent storyboard images produces a prompt and suggested duration for each transition.
- Clip execution: The default Veo path generates endpoint-conditioned transitions in parallel and adds a separate closing clip.
- Assembly: FFmpeg orders MP4 clips by storyboard sequence and joins compatible streams with `-c copy`.
- Provider routing: Text, images, and video can use MiniMax-M3, image-01, and MiniMax-H3 respectively; setting the MiniMax key can change image and video routing automatically.
- Project history: SQLite-backed storyboard and video logs support viewing, export, and clearing; the gallery separately supports saving, loading, and deleting outputs.
- Local startup: The launcher checks prerequisites, installs dependencies on first run, and waits for ports 3005 and 5180 before reporting readiness.
```

## Quick Start / Clone
```bash
cd backend
npm install
cp .env.example .env  # And fill in real keys
npm run dev           # Or npm start
```
