MuMuAINovel in Production: A 3 000-Word Field Manual for Turning One AI Container into a Full-Cycle Fiction Studio
Can a single Docker container really take me from blank page to a 30-chapter cyber-punk saga without writing a single prompt?
Yes—if you treat MuMuAINovel like an IDE instead of a chat-bot. This article shows the exact wiring.
What This Article Answers
-
What MuMuAINovel is not (it is not a prompt library). -
The shortest path from docker pullto a shareable HTTPS domain. -
How the “wizard + character vault + chapter editor” triad works in real time. -
Production-grade hardening: backups, rate-limits, Nginx, and zero-downtime upgrades. -
Where the roadmap can save you from “plot-hole hell” once it ships.
1 Product Snapshot: An IDE for Narrative
1.1 One-Sentence Summary
MuMuAINovel packages three AI providers (OpenAI, Gemini, Anthropic) behind a React front-end and an async FastAPI core, then forces every output—outline, character sheet, chapter—into a SQLite row so you can diff, revert, or regenerate at any time.
1.2 Capability Matrix
| Module | You Give It | You Get Back | Why It Matters |
|---|---|---|---|
| Smart Wizard | 5-form blurbs | World bible, cast, beat sheet | 3 min scaffolding instead of 3 hr prompt wrestling |
| Character Vault | Names + arcs | Relation graph, org chart | Prevents “disappearing side-kick” syndrome |
| Chapter Editor | Title + beat | 3 k-word Markdown | One-click re-write or “continue” keeps voice consistent |
| Auth | Local or LinuxDO OAuth | JWT session | Multi-writer isolation without extra DB |
| Data | SQLite file | Plain db + WAL | rsync is your disaster-recovery plan |
Author’s reflection: I used to dump GPT output into Google Docs; discovering MuMuAINovel felt like moving from Notepad to VS Code—same language, 10× more leverage.
2 Zero-to-Online in Ten Minutes
2.1 Prerequisites Checklist
-
Docker ≥ 20.10 (Docker-Compose optional but cleaner). -
One active API key: OpenAI, Gemini, or Anthropic. -
2 CPU / 4 GB RAM VM or laptop; image is 1.1 GB uncompressed.
2.2 Absolute Minimal Run
# 1. pull once
docker pull mumujie/mumuainovel:latest
# 2. single-file env
cat <<EOF > .env
OPENAI_API_KEY=sk-xxx
DEFAULT_AI_PROVIDER=openai
DEFAULT_MODEL=gpt-4o-mini
LOCAL_AUTH_USERNAME=admin
LOCAL_AUTH_PASSWORD=8Rn9@Lk3
EOF
# 3. fire
docker run -d --name mumu \
-p 8800:8000 \
-v $(pwd)/data:/app/data \
-v $(pwd)/.env:/app/.env:ro \
--restart unless-stopped \
mumujie/mumuainovel:latest
Browse http://localhost:8800, log in with admin / 8Rn9@Lk3, create your first project—done.
Scenario walk-through: I did this on a $6/month Oracle Cloud instance; cold-start to first chapter draft was 7 minutes, most of it waiting for the 1.1 GB download.
3 Moving to Production: HTTPS, Back-ups, Zero-Downtime Updates
3.1 Nginx Reverse-Proxy Template
server {
listen 443 ssl http2;
server_name novel.example.com;
ssl_certificate /etc/letsencrypt/live/novel.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/novel.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8800;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_buffering off; # SSE streams
}
}
Remember to update .env:
FRONTEND_URL=https://novel.example.com
LINUXDO_REDIRECT_URI=https://novel.example.com/api/auth/callback
3.2 Docker-Compose with Resource Ceiling
services:
ai-story:
image: mumujie/mumuainovel:latest
container_name: mumu
ports:
- "127.0.0.1:8800:8000"
volumes:
- ./data:/app/data
- ./.env:/app/.env:ro
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
Observation: CPU throttling at 2 cores keeps 4 k-token chapter latency under 35 s while costing pennies.
3.3 Back-up Playbook
-
Database: cron 0 4 * * * sqlite3 data/app.db ".backup backups/app-$(date +%F).db" -
Images: before upgrade docker tag mumuainovel:latest mumuainovel:$(date +%F) -
Restore: copy latest .dbback into./data, restart container—no migration scripts needed.
4 End-to-End Workflow: From Spark to 30 Chapters
4.1 Step-by-Step with Real Numbers
-
Wizard → Cyber-Noir Hong Kong 2047
-
Input: “memory tax”, “Cantonese slang”, “retired memory-assassin”. -
Output: 12-chapter beat sheet, 7 main characters, 1 faction tree. -
Time: 2 min 18 s (streamed).
-
-
Character Vault → Consistency Guard
-
Added “accent tag” field: 阿鬼 ends every sentence with “la”. -
Relation graph exported to PNG for Scrivener reference.
-
-
Chapter Editor → Voice Lock
-
Draft #1: 3 200 words, temperature 0.8. -
“Continue” twice → 5 100 words. -
Switch model to claude-3-sonnet, temperature 0.6, click “rewrite” → cleaner prose, keep slang.
-
-
Git Snapshot
-
git add ch001.md ch002.md; git commit -m "v0.3 claude rewrite"—diff shows 42 % line change, all intentional.
-
Author’s reflection: I used to fear “AI voice drift”; locking accent tags in the vault and re-using the same temperature + model combo reduced rewrites by half.
5 Advanced Levers: Multi-Model, Proxy, and Future Kill-Switches
5.1 Using a Cheap OpenAI-Compatible Proxy
# .env snippet
OPENAI_API_KEY=fk-123456
OPENAI_BASE_URL=https://api.api2d.com/v1
DEFAULT_MODEL=gpt-3.5-turbo
Cost dropped from 0.0008 per 1 k tokens in my last novella (24 k chapters × 10 ≈ 40 ¢ total).
5.2 Switching Provider Mid-Project
API routes read DEFAULT_AI_PROVIDER at runtime; you can:
-
Pause at any chapter. -
Edit .envtoDEFAULT_AI_PROVIDER=gemini. -
Restart container—new chapters hit Gemini without breaking old ones.
Caveat: voice may shift; run a “rewrite” pass if consistency matters.
5.3 Roadmap Features That Will Change Your Life
-
Continuity Guard – auto-flag when chapter 7 says memory-tax is 15 % but chapter 3 said 20 %. -
Plot Graph – visual breadcrumb of foreshadow / payoff pairs. -
Prompt Tuning UI – no more .envreboot for temperature tweaks.
I maintain a 120 k-word space-opera; continuity errors cost me two weekends last year—those two TODOs alone are worth the wait.
6 Troubleshooting Cheat-Sheet
| Symptom | Root Cause | One-Line Fix |
|---|---|---|
404 on /docs |
Container not fully up | `docker logs mumu |
| 500 on generate | Rate-limit or wrong base URL | Switch to Gemini key for 60 QPM head-room |
| CSS missing | FRONTEND_URL mismatch | Set it to the exact browser origin including https:// |
| DB locked error | Two containers on same volume | docker rm -f duplicate, run only one instance |
Action Checklist / Implementation Steps
-
Install Docker ≥ 20.10 on host. -
Create .envwith at least one API key and strong local password. -
docker runwith-v ./data:/app/datafor persistence. -
Verify http://ip:8800→ create test project → logout. -
Add Nginx + SSL, update .envURLs, restart. -
nightly sqlite3 .backup, pre-upgradedocker tag. -
Use wizard for skeleton → vault for consistency → editor for voice lock → git for versioning.
One-Page Overview
MuMuAINovel bundles OpenAI/Gemini/Anthropic behind a FastAPI/React stack and stores every narrative artifact in SQLite. A 3-command Docker run gives you a localhost studio; add Nginx and cron for production. Wizard → Character Vault → Chapter Editor is the golden path; regenerate, rewrite, or continue at any step without losing history. Future continuity-guard and plot-graph features promise to eliminate “plot-hole hell.”
Quick-Fire FAQ
Q1: Which models work out of the box?
A: OpenAI, Google Gemini, Anthropic; any OpenAI-format proxy is drop-in.
Q2: Can I run it offline?
A: No—LLM calls need cloud endpoints. Local LLM requires rewriting ai_service.py.
Q3: Is MySQL supported?
A: Not yet; SQLite is the only engine today.
Q4: How big can one chapter be?
A: Default max_tokens 32 k ≈ 20 k Chinese characters; editable in .env.
Q5: What if two writers edit the same chapter?
A: Last save wins; no real-time lock. Coordinate chapter ownership externally.
Q6: Upgrade command?
A: docker pull mumujie/mumuainovel:latest && docker restart mumu—data persists via volume.
Q7: Windows path-length errors?
A: Use WSL2 or keep project under C:\m\ to stay below 260 char limit.
