💾 Archived View for mozz.us › journal › 2020-04-14.gmi captured on 2023-09-08 at 15:56:57. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2020-09-24)
-=-=-=-=-=-=-
Published 2020-04-14
🌱 • 🛰️ • 🌷 • 🐝 • 🚀 • 🌵 • 👩🚀
"A community garden over the gemini protocol."
🥕 • 🔭 • 🌺 • 👩🔬 • 🌍 • 👨🌾 • 🌧️
I've developed my first real "app" for gemini!
It's not an original idea (I'm all out of those), but rather a port of the command line game botany that I've enjoyed playing on tilde.town.
This is exciting for me because it breaks a few personal milestones for gemini development:
I started off trying to fork the botany project and refactor the existing codebase. This quickly became untenable since the code was so tightly coupled to the curses frontend and a multi-user filesystem. So I ended up re-writing 99% of the code from scratch, while keeping most of the original artwork, dialog, and game mechanics.
I wanted to make the code as lean as possible with no third-party dependencies. And then around the point where I was updating table definitions using raw SQL queries, I got annoyed and switched to using an ORM, as I always do..
I ended up with a kind of mini-MVC framework built on top of jetforce, using:
Overall I'm really happy with how it turned out. I'm considering pulling some of this work back into the jetforce and establishing some recommended patterns for application development. We'll see how motivated I get..
https://github.com/michael-lazar/astrobotany
Displaying the ASCII art would not have been possible without the ``` preformat blocks. I am once again very pleased that those were added to the specification.
/\ %/\ | % /\ _ | || / % / \ \||/ /\ % |\ \\v/ % /\ v ||/\ % \\v// % . , _ . .,\V/ _ ., _ . ^ ' ` '
Shoutout to the other server admins who added emojis to their gemini pages. I liked the aesthetic and borrowed it here. I think it's great to embrace unicode and the next generation of plaintext protocols.
Setting up user registration was admittedly a bit weird. Doing client certificates "properly" involves the user generating a private key and sending the server a Certificate Signing Request (CSR). I didn't want to use email because I felt like the barrier of entry was too high. And since you can't upload files over gemini, I went with an HTTP endpoint instead.
You make a curl request an HTTP POST endpoint with your CSR, and you get back a signed certificate. I guess it's not the end of the world. The backend for the registration was my first time writing a plain-old CGI script, using Apache and mod_cgi. It's crazy how simple things used to be.
Solderpunk was gracious enough to accept my PR to add support for TLS client certificates to AV98.
https://tildegit.org/solderpunk/AV-98/pulls/5
I hope that more gemini clients will eventually add support for client certificates (either transient or permanent). My concern is that it's kind of a difficult thing to implement properly, including maintaining keychains and handling all of the 6X error codes. Even my PR was pretty hacky and not the ideal solution. We may end up in a chicken-and-egg situation here where nobody wants to build gemini servers using client certificates because no gemini clients support them.
I want to add ANSI color to the ASCII art plants. I don't know why, I just really have a strong urge to do it. I have a plan that involves using an open source GUI that I found called playscii. If all goes well, I could even backport the changes and offer them to the upstream botany project. I think that would be nice.