docs(okf): replace GoatCounter proposal with own SQLite tracker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Noel SabiaandClaude Opus 5.5 committed 2026-10-11 14:43:34 +02:00
1 parent 261cf17e52
commit 8e1ea495c4
9 files changed
+67 -54

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
---
type: Decision
title: Own analytics tracker on SQLite
description: Analytics are counted by Noel's own code in the gateway and stored as daily totals in SQLite; no third-party tracker, no Postgres.
tags: [decision, analytics, sqlite, go]
status: stable
generated: { by: claude-code/claude-opus-5-5, at: 2026-10-11T12:15:30Z }
verified: { by: human:noel, at: 2026-10-11T12:15:30Z }
---
# Decision
Write the tracker as middleware in the [gateway](/architecture/gateway.md).
Store daily totals in SQLite via `modernc.org/sqlite` (pure Go, no cgo).
SQLite is approved tooling.
# Why
- The gateway already sees every page view, PDF download and fall. No
tracking script, nothing for ad blockers to block.
- About 5 MB of memory, no extra pod. GoatCounter would need ~30 MB, Umami
with Postgres ~300-400 MB, on a [4 GB shared server](/architecture/server-budget.md).
- A learning project: owning the code is the point.
# Rejected
| Option | Why not |
|---|---|
| Umami | Needs Postgres, ~300-400 MB |
| GoatCounter | Fine, but Noel wants his own |
| Postgres for the own tracker | ~40-60 MB for a table of counters |
| Cloudflare analytics only | Cannot count falls or PDF downloads |
# Revisit when
Noel wants to learn Postgres. The schema is plain SQL, so the move is small.