Starting over

This site has been a members-only research platform for exactly as long as it took me to admit I never wanted one. It had a login, a registration queue, an approval step, an admin page for deciding who got in, a workspace behind the gate, and a database to hold the users. All of it worked. None of it was the point.

The point was writing down what I build and what I find out while building it.

So the accounts are gone. So is the database. What is left is one file of Python standard library, some hand-written HTML and CSS, and a content/ directory of markdown files.

What was actually load-bearing

Deleting things is easy to do badly, so it is worth naming what I checked before removing each piece.

The contact form stays, because it is the only way to reach me that does not require publishing an address to the spam crawlers. It still sends through the same mail API, and still falls back to writing a JSON file if the mail call fails — that fallback was added after a failed send once turned a form submission into a 502.

The rate limiter stays, for the same reason it existed before: the form is the only thing on the site that writes anything.

The security headers stay. A blog has less surface than a members area, not no surface, and the headers cost nothing.

Everything else — sessions, password hashing, the approval workflow, the audit table — went. About five hundred of the old file's 943 lines were accounts.

What the deletion did and did not buy

The new server.py is 902 lines, which sounds like nothing happened at all. It is worth being honest that it nearly is: a markdown renderer, an RSS feed and the page shell between them took back almost exactly what the accounts gave up.

What actually got smaller is everything around it.

The pages did not go away, they moved: eight hand-written HTML files totalling 1,197 lines — each carrying its own copy of the header and the footer, which is how they drifted apart — became three fragments of 150 lines that the server wraps in one shell. The session script and the stylesheet rules that only existed to serve it went with them.

  • server.py: 943 → 902 lines
  • pages: 8 files, 1,197 lines → 3 fragments, 150 lines
  • CSS: 983 → 800 lines
  • JavaScript: 65 lines → none
  • account state: one SQLite database with two tables → nothing
  • total source: 3,188 lines → 1,852

The last line is the only one that matters, and it was not the obvious one. Deleting a feature shrinks the file that implemented it and grows whatever has to take its place. It shrinks the system only where the duplication was.

Why markdown files and not a database

Because the posts are the work, and the work belongs in git next to everything else. A post is a file I can diff, move, grep, and still read if every service on the machine is down. There is no admin interface to secure and no schema to migrate. Adding a post is dropping a file in a directory.

The trade is that there is no editor and no draft workflow beyond not committing the file yet. That is a trade I will take for something this size, and it is the one decision here I would revisit first if it stopped fitting.