Aerdelan/MirrorNovel

AI小说生成/润色/续写/专家团/人格赋予,内置番茄小说下载器(需有一个svip账号)导出txt格式,项目自带蒸馏功能(目前暂时移除),可蒸馏导入小说的整体框架、写作风格、精彩片段,并活用于之后生成的该类型小说

MirrorNovel – AI‑powered long‑form fiction writing platform

What it is

  • A full‑stack web/desktop/mobile application that lets writers create novels (both traditional web‑novel and light‑novel styles) with the help of large language models.
  • The workflow is outline → blueprint → chapter prose → polishing, and every step is streamed to the UI so the author can watch the model’s “thinking” in real time and stop it at any moment.

Key capabilities

Feature What you get
Whole‑book or single‑chapter mode Write an entire novel in one go or focus on one chapter at a time.
Streaming generation (SSE) Outlines, blueprints, prose, polishing and editorial passes are pushed to the browser as they are produced, with live token‑usage counters.
Continuity engine Persistent chapter summaries, foreshadowing cues, character states, emotional curves and open questions are stored and automatically reused across chapters.
Writing personas Choose a preset, edit a template, or let the AI generate a persona that controls voice, pacing and style; each novel snapshots its persona so later changes don’t affect existing text.
Expert‑review mode After each chapter the system runs an automatic continuity check and can auto‑revise problem areas.
Polish & editorial engine Two‑pass “de‑AI” rewriting with diff view, plus a three‑stage workflow (structure → style → AI‑removal).
Import & continue Upload a .txt file or paste existing prose; the AI extracts context (characters, plot points, etc.) and continues the story.
Multi‑model routing For each task type (outline, writing, reasoning, polish, memory) you can point to any OpenAI‑compatible endpoint or an Ollama server.
Admin console Dashboard for user management, model‑route configuration and data overview.
Multi‑platform clients Vue 3 web UI, an Electron‑based Windows desktop client, and a uni‑app mobile app (Android APK).

How it works

  • Frontend: Vue 3 SPA for the writer, a separate Vue 3 admin SPA, and a uni‑app mobile build. All communicate with the backend via REST and Server‑Sent Events (SSE).
  • Backend: Express 4 API written in Node.js, using Mongoose to store novels, chapters, personas, summaries, etc. in MongoDB.
  • AI layer: Calls any OpenAI‑compatible Chat Completion service (or local Ollama) with per‑task routing. Deep‑thinking models (e.g., GLM‑thinking, DeepSeek‑R1) are supported; reasoning budget is kept separate from prose budget to avoid “token waste”.
  • Desktop client: An Electron shell that bundles the static web assets and proxies API calls, packaged with NSIS for Windows installers.

Quick start (development)

# clone and install all parts
git clone https://github.com/Aerdelan/MirrorNovel.git
cd MirrorNovel

# server dependencies
cd server && npm install && cp .env.example .env   # edit .env with MongoDB, JWT secret, model keys

# client, admin and mobile deps
cd ../client && npm install
cd ../admin && npm install
cd ../app && npm install

# run three services in separate terminals
cd ../server && npm run dev   # API on :3000
cd ../client && npm run dev   # writer UI on :5173
cd ../admin && npm run dev    # admin UI on :5174

Requirements: Node ≥ 18, MongoDB ≥ 6, and an OpenAI‑compatible model endpoint (or Ollama).

Desktop distribution

  • Pre‑built Windows installer (MirrorNovel Setup x.y.z.exe, ~79 MB) and a portable win‑unpacked folder are uploaded automatically via GitHub Actions on each tag.
  • The installer is unsigned; Windows SmartScreen will warn the first time.
  • The desktop app is just a shell – it still talks to the remote backend (default is the official server, configurable in Preferences).

Deployment tips

  • Build the Vue clients (npm run build) and serve the static files with Nginx/Caddy.
  • Run the Express API behind a process manager (PM2, systemd, Docker‑Compose). Proxy /api to the API and keep SSE time‑outs generous.
  • Secure the MongoDB instance, keep JWT secret and model keys out of the repo, enable HTTPS, and add rate‑limits for auth endpoints.

License

  • The repository is released under the license found in LICENSE (the exact SPDX identifier is not shown in the README). Users must also respect the terms of any third‑party model services they connect to.

MirrorNovel is a genuine open‑source AI‑assisted writing platform that combines streaming LLM generation, long‑range narrative memory, and a multi‑platform UI to help authors craft long‑form fiction.

Related

  • Project
  • Project
  • Project
  • Project