Elektrine lite

← Feed

@dolanor@hachyderm.io

Post #2277283

2026-05-07 13:24 UTC

@braid@alpaka.garden Hi, totally shameless plug, but I tried to create something like that for a few years and succeeded to a certain level. It's https://rip.rest and it's basically a RESTful (not totally there yet, HATEOAS is missing) server. I tried to make it pluggable, so it doesn't bleed everywhere in your code base. And your business logic is basically the type you define. One of the smallest example is this: https://github.com/dolanor/rip/blob/main/examples/gormprovider/main.go And this allow you to have different representation of the resource based on content negociation. So if you want the JSON, send the "Accept: application/json" header. If you want HTML, "Accept: text/html" header will do. My default HTML templates use HTMX, to reduce JS to nothingness, while still making the webpages dynamic. And if you want to change it to create whatever HTML representation of your resource, just override it: https://github.com/dolanor/rip/blob/main/examples/html-template/main.go

Replies (1)

  • @dolanor@hachyderm.io 2026-05-07 13:33

    @braid@alpaka.garden I use it as my REST server for a client for a year now, and runs pretty great and allowed me to add automatic OpenAPI generation for the data. Another real example I run is an URL shortener + QRCode generator: https://github.com/dolanor/qure It has an admin panel generated thanks to the default template (which looks like ass, I know, but it seems you're motivated to write your own templates, so… :)) And I will be available for support and help if needed. I'd love it to be really useful to people. Awer m'r rede net Elsässisch

    Open ##2277284