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:

  1. A native toolkit per system. Best result, three times the work. Not realistic for a small project.
  2. A cross-platform GUI toolkit. One codebase, but large dependencies, often C libraries that make building for three systems on one machine hard.
  3. 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:

What it costs

There are real downsides, and we'd rather list them:

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.

← All posts