Glaze is a small web frontend for soft-serve, built in Odin.
It serves server-rendered HTML pages that let you browse public git repositories, inspect trees and files, view rendered README files, and access raw blobs. Glaze is intentionally simple, self-hosted, and backend-driven.
It is also built on top of a custom HTTP/1.x library written in Odin using raw sockets.
README.md files as HTMLGlaze is split into a few main layers:
Glaze app
โโ routes and page handlers
โโ templates and view models
โโ soft-serve metadata access
โโ git repository access
HTTP library
โโ raw socket HTTP/1.x server
โโ request parsing
โโ response building
โโ routing
โโ middleware
โโ static file serving
โโ connection management
Glaze includes a small reusable HTTP library written in Odin.
Current capabilities include:
Transfer-Encoding rejectionThe HTTP layer is intended to remain reusable outside Glaze.
Glaze uses route patterns for repository browsing.
Examples:
/
/r/:repo
/r/:repo/tree/:ref/*path
/r/:repo/blob/:ref/*path
/r/:repo/raw/:ref/*path
This allows repository names, refs, and paths to be extracted cleanly from URLs.
Glaze uses a small custom template system.
Supported syntax:
{{field}}
{{#block}}
...
{{/block}}
Blocks can be used for repeated data and conditional rendering. If a block has no data, it is not rendered.
Values are HTML escaped. {{&field}} writes a value as is, and is only for content that is trusted to be HTML, such as rendered Markdown.
Templates are intentionally simple. Logic stays in Odin, while templates focus on presentation.
Glaze reads soft-serve repository metadata from the soft-serve.db SQLite database.
This allows Glaze to respect repository visibility/configuration and only expose public repositories.
The database is expected to be mounted into the Glaze container.
Glaze reads repository data directly from bare git repositories using a small libgit2 wrapper.
It currently uses libgit2 to read:
Repositories are mounted into the Glaze container as a Docker volume.
Glaze is designed to run alongside soft-serve.
A typical deployment mounts:
Glaze does not currently handle TLS directly. Use a reverse proxy such as Caddy, nginx, or similar for HTTPS.
Build and run locally:
./build.sh
./glaze
Test with curl:
curl -v http://127.0.0.1:8080/
Glaze intentionally does not aim to be a full GitHub/Gitea replacement.
Currently out of scope:
Glaze is experimental but functional.
It is already capable of browsing public soft-serve repositories, rendering repository trees, displaying README content, and serving raw files.
TBD