Writing

← Writing

Just-for-me authentication

May 10, 2020

It's enjoyable to iterate on this site, in the spirit of building incrementally correct personal websites. Last week, when I wanted an easier way to update the metadata for my bookmarks page, I added authentication so that a page knows when I'm looking at it.

Once that worked, gears started turning. If every page on my site knows when I am looking at it, everything becomes mutable. Having a CMS is great, but when I want to fix a typo it can be a drag to spin up another tool, or navigate to another website, log in, make the change, save, redeploy, and onwards. If I spot the typo, I just want to...click it, fix it, and move on.

I can also start to progressively disclose little secret bits of UI. For example, it wouldn't be that hard to build a private subsection of /bookmarks just for myself.

To explore these ideas, I spent yesterday building an AMA page. It exposes a form where anyone can ask a question, but I'm the only one who can view them. I don't have to use a separate CMS or database to answer or edit questions. No, I just dynamically render the list of pending questions whenever I visit the page with lightweight tools for answering, editing, and deleting.

The system is extensible, too. For example, I added a small hook in the backend to send myself an email notification whenever someone asks a new AMA question (what kind of psychopath would check their personal website every day?). I could just as easily make this send me a text message, or maybe even a push notification in the future. It would be cool to be able to reply directly to that notification to answer it in real time.

Ultimately it's this control that frees me from the website itself. It's a playground.

What's next? Well, anything CRUD is a snap to build. It might be fun to work on a personal Instagram feed at /photos, or a personal Twitter at /notes. It might be fun to build a browser extensions to bring some of the notification and editing functionality out of the website itself. Because this site exposes an API to the internet, all of this functionality can move out of the browser into a SwiftUI app, or maybe a macOS menu bar app.

It's fun to have a personal sandbox.

A small favor

Was anything I wrote confusing, outdated, or incorrect? Please let me know! Just write a few words below and I’ll be sure to amend this post with your suggestions.

The email newsletter

Get updates about new posts, new projects, or other meaningful updates to this site delivered to your inbox. Alternatively, you can follow me on Twitter.