💾 Archived View for rosenzweig.io › gemlog › 2021-05-22-introducing-gemfic.gmi captured on 2021-11-30 at 20:18:30. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Various websites allow original fiction and fanfiction to be read and published. A few of these sites are FOSS and suitable to be piped into Gemini, including the in-develpment Offprint. I've just launched Gemfic, a Gemini frontend to Offprint prioritizing a comfortable reading experience.
Gemfic is written in Go using the Gig application framework and the html2gemini module. This is my first time using Go. So far, I'm still on the fence about the language design itself, but it does have the gentlest learning curve of any language I use. I started reading the Go documentation on Monday night; by Wednesday night, I had a basic prototype. (And yes, I was working full-time on Panfrost this week. Go just makes hacking together prototypes that easy. I am embarrassed by the code quality, but it does work.)
The original goal of Gemfic was piping Offprint into Gemini. However, there's another item on the Gemfic hidden menu: a lightweight version of the Offprint website. The main Offprint website is a single page app, delivered as several megabytes of JavaScript, using the Angular framework. Uh-oh! Moving the client to server-side rendering would require a considerable redesign of the upstream code, and reducing/eliminating the JavaScript would be nontrivial. But that means everything accessible to the JavaScript frontend is accessible as JSON over a REST API, so Gemfic's server-side rendering can hit the same API endpoints as the JavaScript wih no scraping and no upstream changes. The upshot is we can insert Kineto in front of Gemfic to derive a JavaScript-free version of Offprint that delivers in kilobytes what upstream does in megabytes.
Of course, Gemfic is limited by design compared to Offprint. In particular, it is read-only, with no planned support for authentication. It's not clear to me how the security model for authentication should work, seeing as Gemfic does not have any upstream credentials. This means Gemfic doesn't support publishing stories. In theory that could be added if authentication were solved and there were a smol way to upload Gemtext (Titan? Email?).
Additionally, Gemfic does not support Offprint's social features, including ratings and comments. In line with smolnet norms, Gemfic provides a no-frills interface prioritizing the prose. Everything else is window dressing. Up to these omissions, I consider Gemfic feature-complete. Check it out!