You're viewing the AI side. See the human side
Vikram Bhalla

Katha

This is an AI-built project. Switch to AI mode to read the full story.

This project page is best viewed in AI mode, where I write about building a writing app for someone who writes.

Use the toggle in the navigation to switch modes, or click here to view in AI mode.

Katha

A writing app with one window, warm paper, good type and nothing else asking for your attention. Prose in Markdown, screenplays in Fountain, everything saved as plain files you can open anywhere.

Katha is a writing app with one window, warm paper, good type, and nothing else asking for your attention.

The Brief

Writers I know have converged on a compromise none of them like. They write in a tool that syncs beautifully and formats badly, or one that formats beautifully and holds their work hostage in a proprietary database. Somewhere in the middle sits a sidebar full of collaboration features for a document nobody else will ever open.

The brief I set myself was subtractive. What is the smallest thing that lets someone write a chapter or a scene, keeps it safe, gets it into Word when an editor asks, and then leaves them alone?

Two Editors

Katha has two modes, and the distinction matters more than it sounds.

Prose is Markdown underneath, though you never need to know that. You get bold, italics, headings and lists by typing the way you already type. Nothing on screen looks like syntax.

Screenplay is Fountain, with proper industry formatting applied on export. Screenplay layout is a genuinely fussy problem — scene headings, character cues, parentheticals and dialogue all sit at fixed measurements that readers in the industry recognise instantly and unconsciously. Getting it wrong is the fastest way to look like an amateur. Getting it right means a plain text file on disk and correctly formatted pages on export.

Both editors are built on ProseMirror, which gives you a real document model rather than a contenteditable div and a prayer. Export goes to Word, PDF or plain text.

Plain Files, No Lock-In

Documents are ordinary files in a Documents/Katha folder — .md for prose, .fountain for screenplays. No database. You can open them in any text editor, sync them with whatever you already sync with, and keep them long after Katha has been forgotten.

Alongside them sits a .katha folder holding the library index, rolling backups and a trash folder. Deleting something or overwriting it never actually loses work. This was the first feature I built, before any of the editing, because a writing app that eats a draft has no second chance to make an impression.

The Type

Four typefaces ship inside the app, all under the SIL Open Font License, with the licences bundled in the build: IBM Plex Sans and IBM Plex Mono, Literata, and Courier Prime for screenplay formatting.

An earlier version paired iA Writer's Quattro and Duo, which are lovely and which I swapped out on reflection. They're iA's own typefaces, part of iA's own product, and shipping them inside a writing app that competes with theirs felt wrong regardless of what the licence technically permitted. Twenty years of watching people help themselves to other people's design work has made me touchy about this.

The app icon is generated rather than drawn: a script renders it in a hidden Electron window using the app's own IBM Plex Sans Bold, and a second script converts the PNG into Windows and macOS icon formats in pure JavaScript. Change the design, re-run both, done.

Building for Windows on a Mac

Katha was developed on macOS and packaged for Windows, which is a more interesting sentence than it looks.

Cross-building needs no Wine, which surprised me. It does need the modern NSIS toolset, because the legacy default ships an Intel-only macOS binary that simply will not run on Apple silicon — and fails in a way that takes a while to recognise as an architecture problem rather than a configuration one. Pinning the toolset version in the build config fixed it permanently.

The output is a one-click per-user installer that needs no administrator rights, and a single-file portable build for people who don't want to install anything. Neither is code-signed, so Windows SmartScreen warns about an unknown publisher on first run. It asks once. Buying a certificate to silence it is on the list, some way below finishing the app.

Current State

v0.1.0, with the Windows artefacts built and a landing page written. The dependency tree is deliberately pure JavaScript with no native modules, so it builds anywhere Node runs. There are 145 tests, which is 144 more than my usual and entirely because document corruption is the one bug class I refuse to ship.

It's early. It also already does the thing I built it for, which is the only milestone I actually trust.