Blog ·
Why a local server and not a window of its own
When you start Blocknotik, no window of its own appears. A console window prints an address, and the notes open in a browser tab. That's a deliberate choice, and it's worth explaining, because it looks odd at first.
What a desktop app usually needs
A notes program has to draw text, buttons and lists on three operating systems. The usual ways to do that:
- A native toolkit per system. Best result, three times the work. Not realistic for a small project.
- A cross-platform GUI toolkit. One codebase, but large dependencies, often C libraries that make building for three systems on one machine hard.
- A bundled browser engine. Every app ships its own copy of a browser: 100–200 MB, and its own security updates to keep up with.
All three mean a big download and a lot of build machinery.
The fourth way
You already have a browser, it's up to date and it's very good at showing text. So Blocknotik is a small web server written in Go, with the interface (one HTML page, one script, one stylesheet) built into the executable. It listens on 127.0.0.1 — the address that exists only inside your computer — and asks the operating system to open the page.
What we get:
- One file of 7–8 MB per system, no installer, no dependencies. Go builds all five variants (Windows, two macOS, two Linux) on one Linux machine in a couple of minutes, without any extra toolchains.
- The standard library only. No third-party packages at all, which keeps the code readable and the list of things to trust short.
- Native text editing for free: spell checking, input methods for any language, undo, accessibility — the browser does all of it.
What it costs
There are real downsides, and we'd rather list them:
- The console window. On Windows and macOS a terminal stays open while the program runs. It's honest (you see that something is running and how to stop it), but it doesn't look like a normal app.
- Browser shortcuts win. A web page can't take over Ctrl+N or Ctrl+T. That's why a new note is Alt+N.
- A local server must be protected. Any website you visit could try to talk to
127.0.0.1. Blocknotik defends against that with a session key, Host and Origin checks and a strict content policy — a separate post explains how. - Two tabs, two editors. Open the address in two tabs and you have two editors on the same files. Blocknotik notices when a note was changed elsewhere and won't silently overwrite it, but it's still better to use one tab.
Is that the final answer?
For now, yes. A program that's small enough to read, builds with one command and doesn't depend on anyone's GUI library suits Blocknotik's size. If the console window turns out to bother people more than we think, a tray icon is the likely next step — still without bundling a browser.