No description
Find a file
xrd d71f0f2f83
Some checks failed
CI / Build and Test (push) Has been cancelled
CI / E2E (Playwright) (push) Has been cancelled
CI / Lint (push) Has been cancelled
Merge pull request 'feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence' (#1) from feature/disable-registration into main
Reviewed-on: #1
2026-06-28 00:43:03 +00:00
.claude Clean up settings and enhance deployment workflow! 🐾 Removed unnecessary command hooks from settings.json and added migration status check in deploy.yml for better database management! Kyuuun! 💖 2025-07-23 01:08:21 -04:00
.cursor/rules Update configuration files and dependencies for improved project structure! 🐾 Added schema and extends to biome.json, updated bun.lock and package.json for new versions, and refined formatting in various files! Kyuuun! 💖 2025-07-21 22:26:44 -04:00
.github Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
.vscode Update .vscode/settings.json 2025-07-21 22:33:23 -04:00
apps feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
e2e Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
.dockerignore Add dockerfile 2026-06-27 14:43:30 -04:00
.DS_Store Living story (#44) 2025-07-28 14:59:48 -04:00
.gitignore Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
.nvmrc feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
biome.json 🐛 Fix CI failures from dependency-bump fallout (lint, build, type-check) 2026-06-09 12:17:43 -04:00
bts.jsonc Update configuration files and dependencies for improved project structure! 🐾 Added schema and extends to biome.json, updated bun.lock and package.json for new versions, and refined formatting in various files! Kyuuun! 💖 2025-07-21 22:26:44 -04:00
bun.lock Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
CLAUDE.md feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
docker-compose.yml feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
docker-entrypoint.sh feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
Dockerfile feat: add runtime DISABLE_REGISTRATION toggle and configure wrangler persistence 2026-06-27 20:42:26 -04:00
FEATURES.md Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
LICENSE.md Update LICENSE.md and setup-openwrite.ts for improved clarity and consistency! 🐾 Added program name and copyright details in LICENSE.md, and refined console log statements in setup-openwrite.ts for better readability! Kyuuun! 💖 2025-07-22 12:54:13 -04:00
mprocs.yaml 🔧 Auto-start vitest watch panes in mprocs 2026-06-09 21:50:37 -04:00
package.json Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
playwright.config.ts Playwright e2e + fix two bugs it surfaced (auth origin, mobile sidebar) 2026-06-09 23:17:03 -04:00
README.md 🔧 Replace Turborepo with mprocs + bun workspace scripts; add server Vitest 2026-06-09 21:48:27 -04:00
setup-encryption.ts Enhance Organization Settings page with theme selection feature! 🐾 Added a new theme selector for improved user customization, allowing users to choose their preferred color theme and apply it instantly! Kyuuun! 💖 Also, updated encryption setup messages for clarity and security! ⚠️ 2025-07-24 17:08:19 -04:00
setup-openwrite.ts 🔧 Replace Turborepo with mprocs + bun workspace scripts; add server Vitest 2026-06-09 21:48:27 -04:00
tsconfig.json Update configuration files and dependencies for improved project structure! 🐾 Added schema and extends to biome.json, updated bun.lock and package.json for new versions, and refined formatting in various files! Kyuuun! 💖 2025-07-21 22:26:44 -04:00

OpenWrite

Open-source, AI-powered writing platform for novelists, screenwriters, and creative writers. 📝

OpenWrite helps you plan, organize, and write long-form fiction — with an AI assistant that runs on your own API keys. No subscription, no markup on tokens, no lock-in. Your manuscript lives in your database (or ours, or one you self-host).

Try it: openwrite.iliareingold.com

What works today

  • ✍️ Rich text editor with auto-save — a distraction-light Tiptap editor that persists your manuscript as you type, with live word counts and per-project progress tracking
  • 🤖 AI writing assistant (bring your own key) — chat with an assistant that knows your project's title, genre, and characters, then insert its suggestions straight into your manuscript. Supported providers:
    • OpenRouter (one key, hundreds of models — easiest start)
    • OpenAI, Anthropic, Groq, Gemini, Cohere
    • Ollama (fully local models, fully private)
  • 📚 Codex — structured world-building: characters, locations, lore entries, and plot points, organized per project
  • 🗂️ Projects — novels, trilogies, series, short story collections, screenplays; genre, status, and target word count tracking
  • 🔐 Auth & workspaces — email/password accounts with personal workspaces; API keys are encrypted at rest (AES-GCM)

In progress

Feature Status
Chapter & scene management Planned next
Streaming AI responses Planned next
Manuscript export (Markdown / DOCX / EPUB) Planned
Story canvas (visual plotting) Experimental
Real-time collaboration Designed, not built

Found a bug or want to influence what gets built? Open an issue.

Why OpenWrite

  • Your keys, your costs. Tools like Sudowrite resell AI tokens at a markup. OpenWrite talks to providers directly with your key — you pay provider rates, or nothing at all with local Ollama models.
  • Your words, your data. AGPL-3.0 licensed and self-hostable on Cloudflare's free tier. No training on your manuscript, no vendor holding your novel hostage.
  • Built for fiction. Characters, lore, and plot structure are first-class concepts, not folders of notes.

Tech stack

TypeScript end to end: React 19 + TanStack Router + TailwindCSS/shadcn-ui on the front, Hono on Cloudflare Workers with D1 (SQLite) + Drizzle ORM on the back, Better Auth for authentication. Bun workspaces with mprocs for dev orchestration and Vitest for tests.

Getting started

bun install

Database setup

This project uses Cloudflare D1 (SQLite) with Drizzle ORM. Local development runs against a local D1 instance managed by wrangler dev.

  1. Copy the example environment file and fill in the values (any random strings work locally):
cp apps/server/.dev.vars.example apps/server/.dev.vars

apps/server/.dev.vars needs BETTER_AUTH_SECRET, BETTER_AUTH_URL, CORS_ORIGIN, and ENCRYPTION_KEY (a base64-encoded 32-byte key, e.g. openssl rand -base64 32).

  1. Apply the schema:
bun db:push

Run it

bun dev

Open http://localhost:3001 for the web app. The API runs at http://localhost:3000.

Self-hosting

OpenWrite deploys as a single Cloudflare Worker (API + static frontend) backed by a D1 database — comfortably within Cloudflare's free tier for personal use:

wrangler d1 create your-database        # then update apps/server/wrangler.jsonc
wrangler secret put BETTER_AUTH_SECRET  # plus BETTER_AUTH_URL, CORS_ORIGIN, ENCRYPTION_KEY
bun run deploy

Project structure

openwrite/
├── apps/
│   ├── web/         # Frontend (React + TanStack Router)
│   ├── server/      # Hono REST API on Cloudflare Workers
│   └── docs/        # VitePress documentation

Available scripts

  • bun dev — start web + server in an mprocs TUI (db-studio and docs available as extra panes)
  • bun build — build all applications
  • bun dev:web / bun dev:server — start a single app
  • bun test — run the Vitest suites (web + server)
  • bun quality — type checking + linting (run before committing)
  • bun db:push — push schema changes to the database
  • bun db:studio — open the Drizzle Studio database UI
  • bun run deploy — build and deploy to Cloudflare

Contributing

Issues and PRs are welcome — the roadmap above is a good place to start, and the codebase is small enough to learn in an afternoon. Run bun quality before submitting.

License

AGPL-3.0