Homepage
The previous version of this portfolio site, with a Go backend and SvelteKit frontend. Kept public as a historical reference.



The previous version of this portfolio site, kept public as a historical reference rather than deleted once mljr-web replaced it. It already had a real Go backend (a `cmd/generate` job plus a `cmd/server` HTTP server) backing a SvelteKit frontend — not the from-scratch jump to a server-rendered architecture the current site represents, but an earlier iteration of the same "generate data, serve it" idea. It's a useful before/after marker for how the current site evolved: from a Go backend serving a separate client-rendered SvelteKit frontend to mljr-web's current architecture, where the same Go process renders HTML server-side via gomponents and Datastar handles reactivity without a client framework or build step in the request path.
Architecture
graph TD Scrapers["backend scrapers
GitHub / LinkedIn / Strava"] --> Generate["cmd/generate"] Generate --> JSON[("data/generated/*.json")] JSON -->|raw.githubusercontent.com
auto-refresh every 4h| Server["cmd/server
DataLoader"] Server -->|REST API| Frontend["SvelteKit frontend"]
Under the hood
A background goroutine kept this site's data fresh without redeploys — it polled the repo's own GitHub-hosted JSON on a timer instead of needing a CI trigger.
const (
defaultRefreshInterval = 4 * time.Hour
githubRawBaseURL = "https://raw.githubusercontent.com/MrCodeEU/homepage/refs/heads/main/backend/data/generated"
)
// StartAutoRefresh starts a background goroutine that periodically fetches
// fresh data from the GitHub repository. This keeps the data up-to-date
// without requiring container restarts or external deployment triggers.
func (d *DataLoader) StartAutoRefresh(ctx context.Context) {
if os.Getenv("DISABLE_AUTO_REFRESH") == "true" {
log.Println("Auto-refresh disabled via DISABLE_AUTO_REFRESH=true")
return
}
// ... ticker loop calling refresh() every refreshInterval ...
}