A local-first creative writing workspace built for Vietnamese writers and translators. All data lives in the browser — no account required, no server-side storage.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router) + React 19 |
| Language | TypeScript 5 (strict) |
| Styling | Tailwind CSS 4 + shadcn/ui |
| Database | Dexie 4 (IndexedDB) |
| AI | Vercel AI SDK v6 + provider SDKs |
| State | Zustand 5 |
| Package manager | pnpm |
git clone https://github.com/ldblckrs-258/novel-studio.git
cd novel-studio
pnpm install
pnpm dev
Open http://localhost:3000. The app runs entirely in the browser — no backend services to configure.
pnpm build
pnpm start
pnpm lint
app/
├── (landing)/ # Marketing landing page (/)
├── (dashboard)/ # App shell (sidebar + chat + panels)
│ ├── dashboard/ # Home / stats
│ ├── library/ # Novel library
│ ├── import/ # Book import (TXT, EPUB, DOCX, PDF)
│ ├── convert/ # Standalone QT convert tool
│ ├── scraper/ # Web scraper
│ ├── settings/ # Providers, instructions, data, changelog
│ └── novels/[id]/ # Novel detail, chapter editor, reader, auto-write
├── api/ # Feedback & sync endpoints
components/
├── ui/ # shadcn/ui primitives
├── chat/ # Chat panel components
├── writing/ # Writing pipeline UI
├── reader/ # TTS reader
├── name-dict/ # Name dictionary panel
lib/
├── ai/ # AI provider dispatch, tools, system prompts
├── analysis/ # Three-phase analysis pipeline
├── writing/ # Six-step writing orchestrator + agents
├── chapter-tools/ # Bulk convert, translate, name extraction
├── hooks/ # Dexie entity hooks (use-*.ts)
├── stores/ # Zustand stores (ephemeral UI state)
├── workers/ # Web Workers (QT engine, replace engine)
├── scraper/ # Site adapters + extension bridge
├── search/ # MiniSearch global search
├── tts/ # TTS providers + player
├── import/ # Book import + chapter splitting
├── db.ts # Dexie database + entity types
└── db-migrations.ts # Schema versions (v1–v11)
Novel Studio requires you to bring your own API keys. Go to Settings → AI Providers to add providers:
| Provider | Type |
|---|---|
| OpenAI | openai |
| Anthropic | anthropic |
| Google Gemini | google |
| Groq | groq |
| Mistral | mistral |
| xAI (Grok) | xai |
| OpenRouter | openrouter |
| Any OpenAI-compatible | openai-compatible |
| Browser GPU | webgpu (chat only) |
A companion Chrome extension (public/novel-studio-connector.zip) provides CORS bypass for the web scraper. Install it from the public directory or build with:
pnpm zip:ext
See CONTRIBUTING.md for guidelines on how to contribute.
MIT - Le Duc Bao