Codex fixes
Some checks failed
Deploy Website / build-and-deploy (push) Has been cancelled

This commit is contained in:
2026-05-25 09:49:40 -04:00
parent 78ec3d58e3
commit 014b1836c0
101 changed files with 1048 additions and 7327 deletions

View File

@@ -38,7 +38,7 @@ docker run -d \
```sql
CREATE TABLE visits (
id INTEGER PRIMARY KEY AUTOINCREMENT,
ip_address TEXT NOT NULL, -- e.g. "2600:6c65:6740:..." or "18.199.106.183"
visitor_id TEXT NOT NULL, -- daily HMAC; raw IP addresses are not stored
path TEXT NOT NULL, -- e.g. "/", "/blog", "/resume"
visited_at TEXT NOT NULL -- UTC datetime, e.g. "2026-02-09 05:19:53"
);
@@ -66,7 +66,7 @@ visits = conn.execute('SELECT * FROM visits ORDER BY visited_at DESC LIMIT 100')
```sql
-- Unique visitors today
SELECT COUNT(DISTINCT ip_address) FROM visits
SELECT COUNT(DISTINCT visitor_id) FROM visits
WHERE visited_at >= date('now');
-- Page view counts
@@ -79,6 +79,16 @@ FROM visits WHERE visited_at >= datetime('now', '-1 day')
GROUP BY hour ORDER BY hour;
```
## 3. Optional Event Relay
Set `ADMIN_DASH_URL` to receive same-origin website events as JSON:
```json
{ "path": "/blog", "visitorId": "daily-hmac-id", "timestamp": 1770000000000 }
```
If `ADMIN_DASH_KEY` is set, the website sends it as a bearer token. The relay is disabled when `ADMIN_DASH_URL` is empty.
## Docker Compose Example
```yaml