MuMuAINovel: Write Novels With AI, Minus the Clutter

11月3日 Published inAI Writing Tools

MuMuAINovel is a structured AI writing assistant designed for long-form fiction. Rather than simply generating raw text, it provides a comprehensive framework to organize your creative process. You choose the AI backend that suits your needs, with native support for OpenAI, Google Gemini, and Anthropic Claude.

The platform streamlines the initial drafting phases, including outlining, character management, and worldbuilding. Dedicated panels allow you to track character arcs and setting details, while chapters can be drafted, refined, or entirely rewritten with a single click. Built with a responsive Ant Design interface, MuMuAINovel runs via Docker and stores data locally using SQLite. It supports multi-user environments with authentication via local credentials or LinuxDO OAuth.

Installing MuMuAINovel

Prerequisites

  • Docker deployment: Docker and Docker Compose installed.
  • Local development: Python 3.11+ and Node.js 18+.
  • API key: An active key from OpenAI, Gemini, or Anthropic.

Starting MuMuAINovel

Option 1: Build Docker Image From Source

  1. Clone the repository:
    git clone https://github.com/xiamuceer-j/MuMuAINovel.git
    cd MuMuAINovel
    
  2. Set environment variables:
    cp backend/.env.example .env
    
    Edit .env to include your API keys.
  3. Launch the service (this builds the image automatically):
    docker-compose up -d
    
  4. Access the app at http://localhost:8000 in your browser.

Option 2: Local Development

Backend Setup
  1. Navigate to the backend folder:
    cd backend
    
  2. Create a virtual environment:
    python -m venv .venv
    
  3. Activate the environment:
    • Windows: .venv\Scripts\activate
    • Linux/Mac: source .venv/bin/activate
  4. Install dependencies:
    pip install -r requirements.txt
    
  5. Configure the environment:
    cp .env.example .env
    
    Edit .env with your specific configurations.
  6. Start the backend:
    python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
    
Frontend Setup
  1. Navigate to the frontend directory:
    cd frontend
    
  2. Install packages:
    npm install
    
  3. Launch the frontend:
    • Development mode (requires backend to be running): npm run dev
    • Production build: npm run build

Deployment Details

Docker Compose (Recommended)

Using Prebuilt Images

  • Pull the latest image:
    docker pull mumujie/mumuainovel:latest
    
  • Start the container:
    docker-compose up -d
    
  • Manage the container:
    • View logs: docker-compose logs -f
    • Stop: docker-compose down
    • Restart: docker-compose restart
    • Update: docker-compose pull && docker-compose up -d

Sample Docker Compose Configuration

services:
  ai-story:
    image: mumujie/mumuainovel:latest
    container_name: mumuainovel
    ports:
      - "8800:8000"
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./.env:/app/.env:ro
    environment:
      - APP_NAME=mumuainovel
      - APP_VERSION=1.0.0
      - APP_HOST=0.0.0.0
      - APP_PORT=8000
      - DEBUG=false
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s
    networks:
      - ai-story-network
networks:
  ai-story-network:
    driver: bridge

Production Notes

Environment Variables

  • Required:
    • OPENAI_API_KEY or GEMINI_API_KEY: At least one active AI service.
    • LOCAL_AUTH_PASSWORD: A strong password for the admin account.
  • Recommended:
    • OPENAI_BASE_URL: Required if using a proxy or third-party endpoint.
    • DEFAULT_AI_PROVIDER: Set to openai, gemini, or anthropic.
    • DEFAULT_MODEL: e.g., gpt-4o-mini, gemini-2.0-flash-exp.

Data Persistence

Volumes ensure your work is not lost when the container restarts:

  • ./data: Stores the SQLite database.
  • ./logs: Stores application logs.

Ports

  • Default mapping is 8800:8000. Access the interface at http://your-server-ip:8800.

Nginx Reverse Proxy (with HTTPS)

server {
    listen 80;
    server_name your-domain.com;
    return 301 https://$server_name$request_uri;
}
server {
    listen 443 ssl http2;
    server_name your-domain.com;
    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;
    location / {
        proxy_pass http://localhost:8800;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_cache off;
        proxy_set_header Connection '';
        proxy_http_version 1.1;
        chunked_transfer_encoding off;
    }
}

If using a domain, remember to update LINUXDO_REDIRECT_URI and FRONTEND_URL in your .env file.

Configuration Guide

Environment Variables in .env

# ===== AI Services =====
OPENAI_API_KEY=your_openai_key_here
OPENAI_BASE_URL=https://api.openai.com/v1
# GEMINI_API_KEY=your_gemini_key_here
# ANTHROPIC_API_KEY=your_anthropic_key_here

DEFAULT_AI_PROVIDER=openai
DEFAULT_MODEL=gpt-4o-mini
DEFAULT_TEMPERATURE=0.8
DEFAULT_MAX_TOKENS=32000

# ===== Application =====
APP_NAME=MuMuAINovel
APP_PORT=8000
DEBUG=false

# ===== LinuxDO OAuth =====
LINUXDO_CLIENT_ID=your_client_id_here
LINUXDO_CLIENT_SECRET=your_client_secret_here
LINUXDO_REDIRECT_URI=http://localhost:8000/api/auth/callback
FRONTEND_URL=http://localhost:8000

# ===== Local Account =====
LOCAL_AUTH_ENABLED=true
LOCAL_AUTH_USERNAME=admin
LOCAL_AUTH_PASSWORD=your_secure_password_here

AI Model Selection

Provider Recommended Models Primary Use Case
OpenAI gpt-4o, gpt-4o-mini High-quality logic and prose
Anthropic claude-3-5-sonnet Nuanced, natural creative writing

Using API Proxy Services

If you use a proxy service, update the OPENAI_BASE_URL in your .env file. Ensure the URL includes the version suffix (e.g., /v1). Supported proxies include New API, API2D, OpenAI-SB, or any self-hosted One API instance.

Authentication Methods

  • Local Account: Enabled by default for private use.
  • LinuxDO OAuth: Ideal for shared deployments; requires registering an OAuth application on the LinuxDO platform.

Using MuMuAINovel

Starting Your First Project

  1. Login: Use your local admin account or LinuxDO credentials.
  2. Create a Project: Select the "New Project" option.
  3. Use the Wizard (Recommended): Input your title, genre, and setting. The AI will generate an initial outline, character list, and worldbuilding notes for you to review.
  4. Iterate: Refine the generated outline, expand character bios, and begin drafting chapters using the AI's "Continue" or "Regenerate" functions.

API Documentation

Once the server is running, interactive documentation is available at:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc