Skip to content

🎬 火宝短剧 - 基于AI的一站式短剧生成平台 《一句话生成完整短剧,从剧本到成片全自动化》 Huobao Drama - An AI-Powered End-to-End Short Drama Generator "One Sentence to Complete Drama: Fully Automated from Script to Final Video"

TypeScript

feat:修改readme关于我们

jiangzjdb7103aa51b2
diff --git a/README-EN.md b/README-EN.md
index ecdffca..a676b57 100644
--- a/README-EN.md
+++ b/README-EN.md
@@ -61,22 +61,26 @@ Experience AI short drama generation:
## ✨ Features
### 🎭 Character Management
+
- ✅ AI-generated character portraits
- ✅ Batch character generation
- ✅ Character image upload and management
### 🎬 Storyboard Production
+
- ✅ Automatic storyboard script generation
- ✅ Scene descriptions and shot design
- ✅ Storyboard image generation (text-to-image)
- ✅ Frame type selection (first frame/key frame/last frame/panel)
### 🎥 Video Generation
+
- ✅ Automatic image-to-video generation
- ✅ Video composition and editing
- ✅ Transition effects
### 📦 Asset Management
+
- ✅ Unified asset library management
- ✅ Local storage support
- ✅ Asset import/export
@@ -88,22 +92,24 @@ Experience AI short drama generation:
### 📋 Prerequisites
-| Software | Version | Description |
-|----------|---------|-------------|
-| **Go** | 1.23+ | Backend runtime |
-| **Node.js** | 18+ | Frontend build environment |
-| **npm** | 9+ | Package manager |
-| **FFmpeg** | 4.0+ | Video processing (**Required**) |
-| **SQLite** | 3.x | Database (built-in) |
+| Software | Version | Description |
+| ----------- | ------- | ------------------------------- |
+| **Go** | 1.23+ | Backend runtime |
+| **Node.js** | 18+ | Frontend build environment |
+| **npm** | 9+ | Package manager |
+| **FFmpeg** | 4.0+ | Video processing (**Required**) |
+| **SQLite** | 3.x | Database (built-in) |
#### Installing FFmpeg
**macOS:**
+
```bash
brew install ffmpeg
```
**Ubuntu/Debian:**
+
```bash
sudo apt update
sudo apt install ffmpeg
@@ -113,6 +119,7 @@ sudo apt install ffmpeg
Download from [FFmpeg Official Site](https://ffmpeg.org/download.html) and configure environment variables
Verify installation:
+
```bash
ffmpeg -version
```
@@ -132,7 +139,7 @@ Configuration file format (`configs/config.yaml`):
app:
name: "Huobao Drama API"
version: "1.0.0"
- debug: true # Set to true for development, false for production
+ debug: true # Set to true for development, false for production
server:
port: 5678
@@ -160,6 +167,7 @@ ai:
```
**Key Configuration Items:**
+
- `app.debug`: Debug mode switch (recommended true for development)
- `server.port`: Service port
- `server.cors_origins`: Allowed CORS origins for frontend
@@ -260,12 +268,14 @@ docker logs -f huobao-drama
```
**Local Build** (optional):
+
```bash
docker build -t huobao-drama:latest .
docker run -d --name huobao-drama -p 5678:5678 -v $(pwd)/data:/app/data huobao-drama:latest
```
**Docker Deployment Advantages:**
+
- ✅ Ready to use with default configuration
- ✅ Environment consistency, avoiding dependency issues
- ✅ One-click start, no need to install Go, Node.js, FFmpeg
@@ -280,6 +290,7 @@ The container is configured to access host services using `http://host.docker.in
**Configuration Steps:**
1. **Start service on host (listen on all interfaces)**
+
```bash
export OLLAMA_HOST=0.0.0.0:11434 && ollama serve
```
@@ -306,12 +317,14 @@ go build -o huobao-drama .
```
Generated files:
+
- `huobao-drama` - Backend executable
- `web/dist/` - Frontend static files (embedded in backend)
#### 2. Prepare Deployment Files
Files to upload to server:
+
```
huobao-drama # Backend executable
configs/config.yaml # Configuration file
@@ -372,6 +385,7 @@ WantedBy=multi-user.target
```
Start service:
+
```bash
sudo systemctl daemon-reload
sudo systemctl enable huobao-drama
@@ -401,11 +415,13 @@ sudo systemctl restart huobao-drama
```
**Reason:**
+
- SQLite requires write permission on both the database file **and** its directory
- Needs to create temporary files in the directory (e.g., `-wal`, `-journal`)
- **Key**: Ensure systemd `User` matches data directory owner
**Common Usernames:**
+
- Ubuntu/Debian: `www-data`, `ubuntu`
- CentOS/RHEL: `nginx`, `apache`
- Custom deployment: `deploy`, `app`, current logged-in user
@@ -436,6 +452,7 @@ server {
## 🎨 Tech Stack
### Backend
+
- **Language**: Go 1.23+
- **Web Framework**: Gin 1.9+
- **ORM**: GORM
@@ -445,6 +462,7 @@ server {
- **AI Services**: OpenAI, Gemini, Doubao, etc.
### Frontend
+
- **Framework**: Vue 3.4+
- **Language**: TypeScript 5+
- **Build Tool**: Vite 5
@@ -454,6 +472,7 @@ server {
- **Router**: Vue Router 4
### Development Tools
+
- **Package Management**: Go Modules, npm
- **Code Standards**: ESLint, Prettier
- **Version Control**: Git
@@ -463,19 +482,24 @@ server {
## 📝 FAQ
### Q: How can Docker containers access Ollama on the host?
+
A: Use `http://host.docker.internal:11434/v1` as Base URL. Note two things:
+
1. Host Ollama needs to listen on `0.0.0.0`: `export OLLAMA_HOST=0.0.0.0:11434 && ollama serve`
2. Linux users using `docker run` need to add: `--add-host=host.docker.internal:host-gateway`
See: [DOCKER_HOST_ACCESS.md](docs/DOCKER_HOST_ACCESS.md)
### Q: FFmpeg not installed or not found?
+
A: Ensure FFmpeg is installed and in the PATH environment variable. Verify with `ffmpeg -version`.
### Q: Frontend cannot connect to backend API?
+
A: Check if backend is running and port is correct. In development mode, frontend proxy config is in `web/vite.config.ts`.
### Q: Database tables not created?
+
A: GORM automatically creates tables on first startup, check logs to confirm migration success.
---
@@ -485,6 +509,7 @@ A: GORM automatically creates tables on first startup, check logs to confirm mig
### v1.0.2 (2026-01-16)
#### 🚀 Major Updates
+
- Pure Go SQLite driver (`modernc.org/sqlite`), supports `CGO_ENABLED=0` cross-platform compilation
- Optimized concurrency performance (WAL mode), resolved "database is locked" errors
- Docker cross-platform support for `host.docker.internal` to access host services
@@ -493,6 +518,7 @@ A: GORM automatically creates tables on first startup, check logs to confirm mig
### v1.0.1 (2026-01-14)
#### 🐛 Bug Fixes / 🔧 Improvements
+
- Fixed video generation API response parsing issues
- Added OpenAI Sora video endpoint configuration
- Optimized error handling and logging
@@ -512,13 +538,27 @@ Issues and Pull Requests are welcome!
---
## API Configuration Site
+
Configure in 2 minutes: [API Aggregation Site](https://api.chatfire.site/models)
-## 📧 Contact
-Business Contact (WeChat): dangbao1117
+---
+
+## 👨‍💻 About Us
+
+**AI Huobao - AI Studio Startup**
+
+- 🏠 **Location**: Nanjing, China
+- 🚀 **Status**: Startup in Progress
+- 📧 **Email**: [[email protected]](mailto:[email protected])
+- 💬 **WeChat**: dangbao1117 (Personal WeChat - No technical support)
+- 🐙 **GitHub**: [https://github.com/chatfire-AI/huobao-drama](https://github.com/chatfire-AI/huobao-drama)
+
+> _"Let AI help us do more creative things"_
## Community Group
+
![Community Group](drama.png)
+
- Submit [Issue](../../issues)
- Email project maintainers
diff --git a/README-JA.md b/README-JA.md
index b75ba1c..b9b1754 100644
--- a/README-JA.md
+++ b/README-JA.md
@@ -1,8 +1,8 @@
-# 🎬 Huobao Drama - AIショートドラマ制作プラットフォーム
+# 🎬 Huobao Drama - AI ショートドラマ制作プラットフォーム
<div align="center">
-**Go + Vue3 ベースのフルスタックAIショートドラマ自動化プラットフォーム**
+**Go + Vue3 ベースのフルスタック AI ショートドラマ自動化プラットフォーム**
[![Go Version](https://img.shields.io/badge/Go-1.23+-00ADD8?style=flat&logo=go)](https://golang.org)
[![Vue Version](https://img.shields.io/badge/Vue-3.x-4FC08D?style=flat&logo=vue.js)](https://vuejs.org)
@@ -18,12 +18,12 @@
## 📖 概要
-Huobao Dramaは、脚本生成、キャラクターデザイン、絵コンテ作成から動画合成までの全ワークフローを自動化するAI駆動のショートドラマ制作プラットフォームです。
+Huobao Drama は、脚本生成、キャラクターデザイン、絵コンテ作成から動画合成までの全ワークフローを自動化する AI 駆動のショートドラマ制作プラットフォームです。
### 🎯 主要機能
-- **🤖 AI駆動**: 大規模言語モデルを使用して脚本を解析し、キャラクター、シーン、絵コンテ情報を抽出
-- **🎨 インテリジェント創作**: AIによるキャラクターポートレートとシーン背景の生成
+- **🤖 AI 駆動**: 大規模言語モデルを使用して脚本を解析し、キャラクター、シーン、絵コンテ情報を抽出
+- **🎨 インテリジェント創作**: AI によるキャラクターポートレートとシーン背景の生成
- **📹 動画生成**: テキストから動画、画像から動画モデルによる絵コンテ動画の自動生成
- **🔄 完全なワークフロー**: アイデアから完成動画までのエンドツーエンド制作ワークフロー
@@ -40,7 +40,7 @@ Huobao Dramaは、脚本生成、キャラクターデザイン、絵コンテ
### 🎥 デモ動画
-AIショートドラマ生成を体験:
+AI ショートドラマ生成を体験:
<div align="center">
@@ -52,7 +52,7 @@ AIショートドラマ生成を体験:
<video src="https://ffile.chatfire.site/cf/public/fcede75e8aeafe22031dbf78f86285b8.mp4" controls width="640"></video>
-[動画1を見る](https://ffile.chatfire.site/cf/public/20260114094337396.mp4) | [動画2を見る](https://ffile.chatfire.site/cf/public/fcede75e8aeafe22031dbf78f86285b8.mp4)
+[動画 1 を見る](https://ffile.chatfire.site/cf/public/20260114094337396.mp4) | [動画 2 を見る](https://ffile.chatfire.site/cf/public/fcede75e8aeafe22031dbf78f86285b8.mp4)
</div>
@@ -61,22 +61,26 @@ AIショートドラマ生成を体験:
## ✨ 機能
### 🎭 キャラクター管理
-- ✅ AI生成キャラクターポートレート
+
+- ✅ AI 生成キャラクターポートレート
- ✅ バッチキャラクター生成
- ✅ キャラクター画像のアップロードと管理
### 🎬 絵コンテ制作
+
- ✅ 自動絵コンテスクリプト生成
- ✅ シーン説明とショットデザイン
- ✅ 絵コンテ画像生成(テキストから画像)
- ✅ フレームタイプ選択(先頭フレーム/キーフレーム/末尾フレーム/パネル)
### 🎥 動画生成
+
- ✅ 画像から動画の自動生成
- ✅ 動画合成と編集
- ✅ トランジション効果
### 📦 アセット管理
+
- ✅ 統合アセットライブラリ管理
- ✅ ローカルストレージサポート
- ✅ アセットのインポート/エクスポート
@@ -88,31 +92,34 @@ AIショートドラマ生成を体験:
### 📋 前提条件
-| ソフトウェア | バージョン | 説明 |
-|-------------|----------|------|
-| **Go** | 1.23+ | バックエンドランタイム |
-| **Node.js** | 18+ | フロントエンドビルド環境 |
-| **npm** | 9+ | パッケージマネージャー |
-| **FFmpeg** | 4.0+ | 動画処理(**必須**) |
-| **SQLite** | 3.x | データベース(内蔵) |
+| ソフトウェア | バージョン | 説明 |
+| ------------ | ---------- | ------------------------ |
+| **Go** | 1.23+ | バックエンドランタイム |
+| **Node.js** | 18+ | フロントエンドビルド環境 |
+| **npm** | 9+ | パッケージマネージャー |
+| **FFmpeg** | 4.0+ | 動画処理(**必須**) |
+| **SQLite** | 3.x | データベース(内蔵) |
-#### FFmpegのインストール
+#### FFmpeg のインストール
**macOS:**
+
```bash
brew install ffmpeg
```
**Ubuntu/Debian:**
+
```bash
sudo apt update
sudo apt install ffmpeg
```
**Windows:**
-[FFmpeg公式サイト](https://ffmpeg.org/download.html)からダウンロードし、環境変数を設定
+[FFmpeg 公式サイト](https://ffmpeg.org/download.html)からダウンロードし、環境変数を設定
インストール確認:
+
```bash
ffmpeg -version
```
@@ -132,7 +139,7 @@ vim configs/config.yaml
app:
name: "Huobao Drama API"
version: "1.0.0"
- debug: true # 開発環境ではtrue、本番環境ではfalseに設定
+ debug: true # 開発環境ではtrue、本番環境ではfalseに設定
server:
port: 5678
@@ -160,13 +167,14 @@ ai:
```
**主要設定項目:**
-- `app.debug`: デバッグモードスイッチ(開発環境ではtrueを推奨)
+
+- `app.debug`: デバッグモードスイッチ(開発環境では true を推奨)
- `server.port`: サービスポート
-- `server.cors_origins`: フロントエンドの許可CORSオリジン
-- `database.path`: SQLiteデータベースファイルパス
+- `server.cors_origins`: フロントエンドの許可 CORS オリジン
+- `database.path`: SQLite データベースファイルパス
- `storage.local_path`: ローカルファイルストレージパス
-- `storage.base_url`: 静的リソースアクセスURL
-- `ai.default_*_provider`: AIサービスプロバイダー設定(APIキーはWeb UIで設定)
+- `storage.base_url`: 静的リソースアクセス URL
+- `ai.default_*_provider`: AI サービスプロバイダー設定(API キーは Web UI で設定)
### 📥 インストール
@@ -186,7 +194,7 @@ cd ..
### 🎯 プロジェクトの起動
-#### 方法1: 開発モード(推奨)
+#### 方法 1: 開発モード(推奨)
**フロントエンドとバックエンドを分離、ホットリロード対応**
@@ -200,12 +208,12 @@ npm run dev
```
- フロントエンド: `http://localhost:3012`
-- バックエンドAPI: `http://localhost:5678/api/v1`
-- フロントエンドはAPIリクエストを自動的にバックエンドにプロキシ
+- バックエンド API: `http://localhost:5678/api/v1`
+- フロントエンドは API リクエストを自動的にバックエンドにプロキシ
-#### 方法2: シングルサービスモード
+#### 方法 2: シングルサービスモード
-**バックエンドがAPIとフロントエンド静的ファイルの両方を提供**
+**バックエンドが API とフロントエンド静的ファイルの両方を提供**
```bash
# 1. フロントエンドをビルド
@@ -221,15 +229,15 @@ go run main.go
### 🗄️ データベース初期化
-データベーステーブルは初回起動時に自動作成されます(GORM AutoMigrateを使用)。手動マイグレーションは不要です。
+データベーステーブルは初回起動時に自動作成されます(GORM AutoMigrate を使用)。手動マイグレーションは不要です。
---
## 📦 デプロイ
-### 🐳 Dockerデプロイ(推奨)
+### 🐳 Docker デプロイ(推奨)
-#### 方法1: Docker Compose(推奨)
+#### 方法 1: Docker Compose(推奨)
```bash
# サービスを起動
@@ -242,9 +250,9 @@ docker-compose logs -f
docker-compose down
```
-#### 方法2: Dockerコマンド
+#### 方法 2: Docker コマンド
-> **注意**: Linuxユーザーはホストサービスにアクセスするために `--add-host=host.docker.internal:host-gateway` を追加する必要があります
+> **注意**: Linux ユーザーはホストサービスにアクセスするために `--add-host=host.docker.internal:host-gateway` を追加する必要があります
```bash
# Docker Hubから実行
@@ -260,15 +268,17 @@ docker logs -f huobao-drama
```
**ローカルビルド**(オプション):
+
```bash
docker build -t huobao-drama:latest .
docker run -d --name huobao-drama -p 5678:5678 -v $(pwd)/data:/app/data huobao-drama:latest
```
-**Dockerデプロイの利点:**
+**Docker デプロイの利点:**
+
- ✅ デフォルト設定ですぐに使用可能
- ✅ 環境の一貫性、依存関係の問題を回避
-- ✅ ワンクリック起動、Go、Node.js、FFmpegのインストール不要
+- ✅ ワンクリック起動、Go、Node.js、FFmpeg のインストール不要
- ✅ 移行とスケーリングが容易
- ✅ 自動ヘルスチェックと再起動
- ✅ ファイル権限の自動処理
@@ -280,11 +290,12 @@ docker run -d --name huobao-drama -p 5678:5678 -v $(pwd)/data:/app/data huobao-d
**設定手順:**
1. **ホストでサービスを起動(全インターフェースでリッスン)**
+
```bash
export OLLAMA_HOST=0.0.0.0:11434 && ollama serve
```
-2. **フロントエンドAIサービス設定**
+2. **フロントエンド AI サービス設定**
- Base URL: `http://host.docker.internal:11434/v1`
- Provider: `openai`
- Model: `qwen2.5:latest`
@@ -306,12 +317,14 @@ go build -o huobao-drama .
```
生成ファイル:
+
- `huobao-drama` - バックエンド実行ファイル
- `web/dist/` - フロントエンド静的ファイル(バックエンドに埋め込み)
#### 2. デプロイファイルの準備
サーバーにアップロードするファイル:
+
```
huobao-drama # バックエンド実行ファイル
configs/config.yaml # 設定ファイル
@@ -347,7 +360,7 @@ chmod +x huobao-drama
./huobao-drama
```
-#### 4. systemdでサービス管理
+#### 4. systemd でサービス管理
サービスファイル `/etc/systemd/system/huobao-drama.service` を作成:
@@ -372,6 +385,7 @@ WantedBy=multi-user.target
```
サービスを起動:
+
```bash
sudo systemctl daemon-reload
sudo systemctl enable huobao-drama
@@ -379,7 +393,7 @@ sudo systemctl start huobao-drama
sudo systemctl status huobao-drama
```
-**⚠️ よくある問題: SQLite書き込み権限エラー**
+**⚠️ よくある問題: SQLite 書き込み権限エラー**
`attempt to write a readonly database` エラーが発生した場合:
@@ -401,16 +415,18 @@ sudo systemctl restart huobao-drama
```
**原因:**
-- SQLiteはデータベースファイル**と**そのディレクトリの両方に書き込み権限が必要
+
+- SQLite はデータベースファイル**と**そのディレクトリの両方に書き込み権限が必要
- ディレクトリ内に一時ファイル(例: `-wal`、`-journal`)を作成する必要がある
-- **重要**: systemdの`User`がデータディレクトリの所有者と一致していることを確認
+- **重要**: systemd の`User`がデータディレクトリの所有者と一致していることを確認
**一般的なユーザー名:**
+
- Ubuntu/Debian: `www-data`、`ubuntu`
- CentOS/RHEL: `nginx`、`apache`
- カスタムデプロイ: `deploy`、`app`、現在ログインしているユーザー
-#### 5. Nginxリバースプロキシ
+#### 5. Nginx リバースプロキシ
```nginx
server {
@@ -436,24 +452,27 @@ server {
## 🎨 技術スタック
### バックエンド
+
- **言語**: Go 1.23+
-- **Webフレームワーク**: Gin 1.9+
+- **Web フレームワーク**: Gin 1.9+
- **ORM**: GORM
- **データベース**: SQLite
- **ログ**: Zap
- **動画処理**: FFmpeg
-- **AIサービス**: OpenAI、Gemini、Doubaoなど
+- **AI サービス**: OpenAI、Gemini、Doubao など
### フロントエンド
+
- **フレームワーク**: Vue 3.4+
- **言語**: TypeScript 5+
- **ビルドツール**: Vite 5
-- **UIコンポーネント**: Element Plus
-- **CSSフレームワーク**: TailwindCSS
+- **UI コンポーネント**: Element Plus
+- **CSS フレームワーク**: TailwindCSS
- **状態管理**: Pinia
- **ルーター**: Vue Router 4
### 開発ツール
+
- **パッケージ管理**: Go Modules、npm
- **コード規約**: ESLint、Prettier
- **バージョン管理**: Git
@@ -462,21 +481,26 @@ server {
## 📝 よくある質問
-### Q: DockerコンテナからホストのOllamaにアクセスするには?
-A: Base URLとして `http://host.docker.internal:11434/v1` を使用します。注意点:
-1. ホストのOllamaは `0.0.0.0` でリッスンする必要があります: `export OLLAMA_HOST=0.0.0.0:11434 && ollama serve`
-2. `docker run` を使用するLinuxユーザーは追加が必要: `--add-host=host.docker.internal:host-gateway`
+### Q: Docker コンテナからホストの Ollama にアクセスするには?
+
+A: Base URL として `http://host.docker.internal:11434/v1` を使用します。注意点:
+
+1. ホストの Ollama は `0.0.0.0` でリッスンする必要があります: `export OLLAMA_HOST=0.0.0.0:11434 && ollama serve`
+2. `docker run` を使用する Linux ユーザーは追加が必要: `--add-host=host.docker.internal:host-gateway`
詳細: [DOCKER_HOST_ACCESS.md](docs/DOCKER_HOST_ACCESS.md)
-### Q: FFmpegがインストールされていない、または見つからない?
-A: FFmpegがインストールされ、PATH環境変数に含まれていることを確認してください。`ffmpeg -version` で確認。
+### Q: FFmpeg がインストールされていない、または見つからない?
+
+A: FFmpeg がインストールされ、PATH 環境変数に含まれていることを確認してください。`ffmpeg -version` で確認。
+
+### Q: フロントエンドがバックエンド API に接続できない?
-### Q: フロントエンドがバックエンドAPIに接続できない?
A: バックエンドが実行中で、ポートが正しいか確認してください。開発モードでは、フロントエンドプロキシ設定は `web/vite.config.ts` にあります。
### Q: データベーステーブルが作成されない?
-A: GORMは初回起動時にテーブルを自動作成します。ログでマイグレーション成功を確認してください。
+
+A: GORM は初回起動時にテーブルを自動作成します。ログでマイグレーション成功を確認してください。
---
@@ -485,40 +509,56 @@ A: GORMは初回起動時にテーブルを自動作成します。ログでマ
### v1.0.2 (2026-01-16)
#### 🚀 主要アップデート
-- 純粋なGo SQLiteドライバー(`modernc.org/sqlite`)、`CGO_ENABLED=0` クロスプラットフォームコンパイルをサポート
-- 並行性能を最適化(WALモード)、"database is locked" エラーを解決
-- ホストサービスへのアクセス用 `host.docker.internal` のDockerクロスプラットフォームサポート
+
+- 純粋な Go SQLite ドライバー(`modernc.org/sqlite`)、`CGO_ENABLED=0` クロスプラットフォームコンパイルをサポート
+- 並行性能を最適化(WAL モード)、"database is locked" エラーを解決
+- ホストサービスへのアクセス用 `host.docker.internal` の Docker クロスプラットフォームサポート
- ドキュメントとデプロイガイドの簡素化
### v1.0.1 (2026-01-14)
#### 🐛 バグ修正 / 🔧 改善
-- 動画生成APIレスポンスのパース問題を修正
-- OpenAI Sora動画エンドポイント設定を追加
+
+- 動画生成 API レスポンスのパース問題を修正
+- OpenAI Sora 動画エンドポイント設定を追加
- エラー処理とログ出力を最適化
---
## 🤝 コントリビューション
-IssueとPull Requestを歓迎します!
+Issue と Pull Request を歓迎します!
1. このプロジェクトをフォーク
2. フィーチャーブランチを作成 (`git checkout -b feature/AmazingFeature`)
3. 変更をコミット (`git commit -m 'Add some AmazingFeature'`)
4. ブランチにプッシュ (`git push origin feature/AmazingFeature`)
-5. Pull Requestを作成
+5. Pull Request を作成
---
-## API設定サイト
-2分で設定完了: [API集約サイト](https://api.chatfire.site/models)
+## API 設定サイト
-## 📧 連絡先
-ビジネス連絡先(WeChat): dangbao1117
+2 分で設定完了: [API 集約サイト](https://api.chatfire.site/models)
+
+---
+
+## 👨‍💻 私たちについて
+
+**AI 火宝 - AI スタジオ起業中**
+
+- 🏠 **所在地**: 中国南京
+- 🚀 **ステータス**: 起業中
+- 📧 **Email**: [[email protected]](mailto:[email protected])
+- 💬 **WeChat**: dangbao1117 (個人 WeChat - 技術的な質問には対応しません)
+- 🐙 **GitHub**: [https://github.com/chatfire-AI/huobao-drama](https://github.com/chatfire-AI/huobao-drama)
+
+> _「AI に私たちのより創造的なことを手伝ってもらおう」_
## コミュニティグループ
+
![コミュニティグループ](drama.png)
+
- [Issue](../../issues)を提出
- プロジェクトメンテナにメール
@@ -526,9 +566,9 @@ IssueとPull Requestを歓迎します!
<div align="center">
-**⭐ このプロジェクトが役に立ったら、Starをお願いします!**
+**⭐ このプロジェクトが役に立ったら、Star をお願いします!**
-## Star履歴
+## Star 履歴
[![Star History Chart](https://api.star-history.com/svg?repos=chatfire-AI/huobao-drama&type=date&legend=top-left)](https://www.star-history.com/#chatfire-AI/huobao-drama&type=date&legend=top-left)
diff --git a/README.md b/README.md
index 0be1c16..eff8381 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# 🎬 Huobao Drama - AI短剧生成平台
+# 🎬 Huobao Drama - AI 短剧生成平台
<div align="center">
-**基于 Go + Vue3 的全栈AI短剧自动化生产平台**
+**基于 Go + Vue3 的全栈 AI 短剧自动化生产平台**
[![Go Version](https://img.shields.io/badge/Go-1.23+-00ADD8?style=flat&logo=go)](https://golang.org)
[![Vue Version](https://img.shields.io/badge/Vue-3.x-4FC08D?style=flat&logo=vue.js)](https://vuejs.org)
@@ -18,20 +18,20 @@
## 📖 项目简介 / About
-Huobao Drama 是一个基于AI的短剧自动化生产平台,实现从剧本生成、角色设计、分镜制作到视频合成的全流程自动化。
+Huobao Drama 是一个基于 AI 的短剧自动化生产平台,实现从剧本生成、角色设计、分镜制作到视频合成的全流程自动化。
Huobao Drama is an AI-powered short drama production platform that automates the entire workflow from script generation, character design, storyboarding to video composition.
### 🎯 核心价值 / Core Features
-- **🤖 AI驱动 / AI-Driven**:使用大语言模型解析剧本,提取角色、场景和分镜信息 | Parse scripts using large language models to extract characters, scenes, and storyboards
-- **🎨 智能创作 / Intelligent Creation**:AI绘图生成角色形象和场景背景 | AI-generated character portraits and scene backgrounds
+- **🤖 AI 驱动 / AI-Driven**:使用大语言模型解析剧本,提取角色、场景和分镜信息 | Parse scripts using large language models to extract characters, scenes, and storyboards
+- **🎨 智能创作 / Intelligent Creation**:AI 绘图生成角色形象和场景背景 | AI-generated character portraits and scene backgrounds
- **📹 视频生成 / Video Generation**:基于文生视频和图生视频模型自动生成分镜视频 | Automatic storyboard video generation using text-to-video and image-to-video models
- **🔄 工作流 / Workflow**:完整的短剧制作工作流,从创意到成片一站式完成 | Complete production workflow from idea to final video
### 🛠️ 技术架构
-采用**DDD领域驱动设计**,清晰分层:
+采用**DDD 领域驱动设计**,清晰分层:
```
├── API层 (Gin HTTP)
@@ -63,22 +63,26 @@ Huobao Drama is an AI-powered short drama production platform that automates the
## ✨ 功能特性
### 🎭 角色管理
-- ✅ AI生成角色形象
+
+- ✅ AI 生成角色形象
- ✅ 批量角色生成
- ✅ 角色图片上传和管理
### 🎬 分镜制作
+
- ✅ 自动生成分镜脚本
- ✅ 场景描述和镜头设计
- ✅ 分镜图片生成(文生图)
- ✅ 帧类型选择(首帧/关键帧/尾帧/分镜板)
### 🎥 视频生成
+
- ✅ 图生视频自动生成
- ✅ 视频合成和剪辑
- ✅ 转场效果
### 📦 资源管理
+
- ✅ 素材库统一管理
- ✅ 本地存储支持
- ✅ 资源导入导出
@@ -90,31 +94,34 @@ Huobao Drama is an AI-powered short drama production platform that automates the
### 📋 环境要求
-| 软件 | 版本要求 | 说明 |
-|------|---------|------|
-| **Go** | 1.23+ | 后端运行环境 |
-| **Node.js** | 18+ | 前端构建环境 |
-| **npm** | 9+ | 包管理工具 |
-| **FFmpeg** | 4.0+ | 视频处理(**必需**) |
-| **SQLite** | 3.x | 数据库(已内置) |
+| 软件 | 版本要求 | 说明 |
+| ----------- | -------- | -------------------- |
+| **Go** | 1.23+ | 后端运行环境 |
+| **Node.js** | 18+ | 前端构建环境 |
+| **npm** | 9+ | 包管理工具 |
+| **FFmpeg** | 4.0+ | 视频处理(**必需**) |
+| **SQLite** | 3.x | 数据库(已内置) |
#### 安装 FFmpeg
**macOS:**
+
```bash
brew install ffmpeg
```
**Ubuntu/Debian:**
+
```bash
sudo apt update
sudo apt install ffmpeg
```
**Windows:**
-从 [FFmpeg官网](https://ffmpeg.org/download.html) 下载并配置环境变量
+从 [FFmpeg 官网](https://ffmpeg.org/download.html) 下载并配置环境变量
验证安装:
+
```bash
ffmpeg -version
```
@@ -134,7 +141,7 @@ vim configs/config.yaml
app:
name: "Huobao Drama API"
version: "1.0.0"
- debug: true # 开发环境设为true,生产环境设为false
+ debug: true # 开发环境设为true,生产环境设为false
server:
port: 5678
@@ -162,13 +169,14 @@ ai:
```
**重要配置项:**
-- `app.debug`: 调试模式开关(开发环境建议设为true)
+
+- `app.debug`: 调试模式开关(开发环境建议设为 true)
- `server.port`: 服务运行端口
- `server.cors_origins`: 允许跨域访问的前端地址
-- `database.path`: SQLite数据库文件路径
+- `database.path`: SQLite 数据库文件路径
- `storage.local_path`: 本地文件存储路径
-- `storage.base_url`: 静态资源访问URL
-- `ai.default_*_provider`: AI服务提供商配置(在Web界面中配置具体的API Key)
+- `storage.base_url`: 静态资源访问 URL
+- `ai.default_*_provider`: AI 服务提供商配置(在 Web 界面中配置具体的 API Key)
### 📥 安装依赖
@@ -202,12 +210,12 @@ npm run dev
```
- 前端地址: `http://localhost:3012`
-- 后端API: `http://localhost:5678/api/v1`
-- 前端自动代理API请求到后端
+- 后端 API: `http://localhost:5678/api/v1`
+- 前端自动代理 API 请求到后端
#### 方式二:单服务模式
-**后端同时提供API和前端静态文件**
+**后端同时提供 API 和前端静态文件**
```bash
# 1. 构建前端
@@ -223,7 +231,7 @@ go run main.go
### 🗄️ 数据库初始化
-数据库表会在首次启动时自动创建(使用GORM AutoMigrate),无需手动迁移。
+数据库表会在首次启动时自动创建(使用 GORM AutoMigrate),无需手动迁移。
---
@@ -262,12 +270,14 @@ docker logs -f huobao-drama
```
**本地构建**(可选):
+
```bash
docker build -t huobao-drama:latest .
docker run -d --name huobao-drama -p 5678:5678 -v $(pwd)/data:/app/data huobao-drama:latest
```
**Docker 部署优势:**
+
- ✅ 开箱即用,内置默认配置
- ✅ 环境一致性,避免依赖问题
- ✅ 一键启动,无需安装 Go、Node.js、FFmpeg
@@ -282,6 +292,7 @@ docker run -d --name huobao-drama -p 5678:5678 -v $(pwd)/data:/app/data huobao-d
**配置步骤:**
1. **宿主机启动服务(监听所有接口)**
+
```bash
export OLLAMA_HOST=0.0.0.0:11434 && ollama serve
```
@@ -308,12 +319,14 @@ go build -o huobao-drama .
```
生成文件:
+
- `huobao-drama` - 后端可执行文件
- `web/dist/` - 前端静态文件(已嵌入后端)
#### 2. 准备部署文件
需要上传到服务器的文件:
+
```
huobao-drama # 后端可执行文件
configs/config.yaml # 配置文件
@@ -374,6 +387,7 @@ WantedBy=multi-user.target
```
启动服务:
+
```bash
sudo systemctl daemon-reload
sudo systemctl enable huobao-drama
@@ -403,11 +417,13 @@ sudo systemctl restart huobao-drama
```
**原因说明**:
+
- SQLite 需要对数据库文件 **和** 所在目录都有写权限
- 需要在目录中创建临时文件(如 `-wal`、`-journal`)
- **关键**:确保 systemd 配置中的 `User` 与数据目录所有者一致
**常用用户名**:
+
- Ubuntu/Debian: `www-data`、`ubuntu`
- CentOS/RHEL: `nginx`、`apache`
- 自定义部署: `deploy`、`app`、当前登录用户
@@ -438,24 +454,27 @@ server {
## 🎨 技术栈
### 后端技术
+
- **语言**: Go 1.23+
-- **Web框架**: Gin 1.9+
+- **Web 框架**: Gin 1.9+
- **ORM**: GORM
- **数据库**: SQLite
- **日志**: Zap
- **视频处理**: FFmpeg
-- **AI服务**: OpenAI、Gemini、火山等
+- **AI 服务**: OpenAI、Gemini、火山等
### 前端技术
+
- **框架**: Vue 3.4+
- **语言**: TypeScript 5+
- **构建工具**: Vite 5
-- **UI组件**: Element Plus
-- **CSS框架**: TailwindCSS
+- **UI 组件**: Element Plus
+- **CSS 框架**: TailwindCSS
- **状态管理**: Pinia
- **路由**: Vue Router 4
### 开发工具
+
- **包管理**: Go Modules, npm
- **代码规范**: ESLint, Prettier
- **版本控制**: Git
@@ -465,20 +484,25 @@ server {
## 📝 常见问题
### Q: Docker 容器如何访问宿主机的 Ollama?
+
A: 使用 `http://host.docker.internal:11434/v1` 作为 Base URL。注意两点:
+
1. 宿主机 Ollama 需监听 `0.0.0.0`:`export OLLAMA_HOST=0.0.0.0:11434 && ollama serve`
2. Linux 用户使用 `docker run` 需添加:`--add-host=host.docker.internal:host-gateway`
详见:[DOCKER_HOST_ACCESS.md](docs/DOCKER_HOST_ACCESS.md)
-### Q: FFmpeg未安装或找不到?
-A: 确保FFmpeg已安装并在PATH环境变量中。运行 `ffmpeg -version` 验证。
+### Q: FFmpeg 未安装或找不到?
+
+A: 确保 FFmpeg 已安装并在 PATH 环境变量中。运行 `ffmpeg -version` 验证。
+
+### Q: 前端无法连接后端 API?
-### Q: 前端无法连接后端API?
A: 检查后端是否启动,端口是否正确。开发模式下前端代理配置在 `web/vite.config.ts`。
### Q: 数据库表未创建?
-A: GORM会在首次启动时自动创建表,检查日志确认迁移是否成功。
+
+A: GORM 会在首次启动时自动创建表,检查日志确认迁移是否成功。
---
@@ -487,6 +511,7 @@ A: GORM会在首次启动时自动创建表,检查日志确认迁移是否成
### v1.0.2 (2026-01-16)
#### 🚀 重大更新
+
- SQLite 纯 Go 驱动(`modernc.org/sqlite`),支持 `CGO_ENABLED=0` 跨平台编译
- 优化并发性能(WAL 模式),解决 "database is locked" 错误
- Docker 跨平台支持 `host.docker.internal` 访问宿主机服务
@@ -495,6 +520,7 @@ A: GORM会在首次启动时自动创建表,检查日志确认迁移是否成
### v1.0.1 (2026-01-14)
#### 🐛 Bug Fixes / 🔧 Improvements
+
- 修复视频生成 API 响应解析问题
- 添加 OpenAI Sora 视频端点配置
- 优化错误处理和日志输出
@@ -513,13 +539,28 @@ A: GORM会在首次启动时自动创建表,检查日志确认迁移是否成
---
-## API配置站点
-2分钟完成配置:[API聚合站点](https://api.chatfire.site/models)
+## API 配置站点
+
+2 分钟完成配置:[API 聚合站点](https://api.chatfire.site/models)
+
+---
+
+## 👨‍💻 关于我们
+
+**AI 火宝 - AI 工作室创业中**
+
+- 🏠 **位置**: 中国南京
+- 🚀 **状态**: 创业中
+- 📧 **Email**: [[email protected]](mailto:[email protected])
+- 💬 **微信**: dangbao1117 (私人微信不解答任何技术问题)
+- 🐙 **GitHub**: [https://github.com/chatfire-AI/huobao-drama](https://github.com/chatfire-AI/huobao-drama)
+
+> _"让 AI 帮我们做更有创造力的事"_
-## 📧 联系方式
-商务联系V:dangbao1117
## 项目交流群
+
![项目交流群](drama.png)
+
- 提交 [Issue](../../issues)
- 发送邮件至项目维护者
@@ -527,7 +568,8 @@ A: GORM会在首次启动时自动创建表,检查日志确认迁移是否成
<div align="center">
-**⭐ 如果这个项目对你有帮助,请给一个Star!**
+**⭐ 如果这个项目对你有帮助,请给一个 Star!**
+
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=chatfire-AI/huobao-drama&type=date&legend=top-left)](https://www.star-history.com/#chatfire-AI/huobao-drama&type=date&legend=top-left)