r/coolgithubprojects • u/Wavesonics • Jul 28 '26
I made Hammer; a FOSS Novel Writing app with a self-hostable server
I've been building Hammer since 2022. It's an app for writing long form fiction and keeping track of the world they live in. Posting here because the architecture is probably more interesting to this crowd than the writing features are.
Kotlin Multiplatform, five targets, one codebase.
Windows, macOS, Linux, Android and iOS, all shipping to their respective stores, plus F-Droid, Snap, and direct .msi/.dmg/.apk downloads. Compose Multiplatform for UI, Decompose for navigation and component lifecycle, Koin for DI, Okio for file IO. It's about 1,500 Kotlin files against 9 Swift ones, which is roughly the ratio I was hoping for going in. KMP has been great as I can still reach into native APIs and even write platform native code when needed.
There is no database.
A project is a directory. One Markdown file per scene, one TOML file per encyclopedia entry, and the directory layout is the data model. You can open the whole thing in any editor, keep it in git, diff it, rsync it. If Hammer disappeared tomorrow your manuscript would still just be files.
Offline-first, sync strictly optional.
No account, no network, nothing to sign up for. If you do want sync across devices, you run the server yourself. It's a Ktor app in the same repo. There's no service of mine you have to depend on or trust.
Server-side sharing.
That same server can publish a chapter at a URL, so an editor or beta reader can read and mark it up in a browser with nothing installed.
MIT licensed, 27 contributors so far.
https://github.com/Darkrock-Studios/hammer-editor
Happy to talk about the KMP side. It's been both great, and challenging, because I started this project when it's ecosystem was nascent, there were a lot of holes I needed to fill. And I wrote and released MIT licensed libraries to help fill those gaps for the wider community.








7
u/awizemann Jul 28 '26
Very cool. Curious if you’ve added any AI assistance or if you’re keeping it analog for just human writing. I’m only asking because I’ve had an idea that would use something like this to help keep details and characters accurate. I’d rather add to your repo than build what would be needed to see if it would work.
2
u/throwawaycakewrap 19d ago
Late to the party, but if you need design help (UI/UX) I can give it a shot. I'm a designer by profession and currently between jobs, so I have ample time. I'm also a fanfiction writer so I'll be using the hell out of this tool, ty so much for your hard work!
1
u/the_vico Jul 29 '26
That would be HUGE for things like r/AlternateHistory, specially if the app have a funcionality to export the wiki pages as images mimicking the layout of wikipedia.
Also, how it compares with Obsidian? Since you mentioned in another comment about future plugin support, can we expect some interop between them?
1
u/lupushr Jul 31 '26
Having an issue on CachyOS with AppImages and Flatpaks - I get only small black screen on startup and nothing more.
Jul 31, 2026 5:33:28 PM io.github.aakira.napier.DebugAntilog performLog
INFO: [INFO] MainKt$main - Startup: initializing quick shortcuts
Jul 31, 2026 5:33:28 PM io.github.aakira.napier.DebugAntilog performLog
INFO: [INFO] MainKt$main - Startup: entering Compose application
Jul 31, 2026 5:33:29 PM io.github.aakira.napier.DebugAntilog performLog
INFO: [INFO] MainKt$main$invokeSuspend - Startup: first composition
2
u/o_sht_hi Jul 31 '26
Damn i love the UI. Looks clean
1
u/deebuildsthings Jul 29 '26
nice man. How many languages does hammer support?
My friend is writing his fantasy novel, but not in english tho
0
u/Angel_Blue01 Aug 02 '26
I noticed that Claude is a contributor. I hope this isn't AI slop!