Add localhost-only stats endpoint with visit analytics
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## 0.5.0 - 2026-03-26
|
||||
- Added anonymous backend visit logging in SQLite:
|
||||
- New `visit_logs` table records timestamp, hashed visitor id, and country metadata.
|
||||
- New `ip_country_cache` table caches IP-to-country lookups to reduce external geo requests.
|
||||
- Added simple geolocation for public IPs (best-effort) with localhost/private IP fallback labeling.
|
||||
- Added localhost-only stats endpoint: `GET /stats`.
|
||||
- `/stats` response now includes:
|
||||
- `countries`: visit and unique visitor counts grouped by country (last 5 days window).
|
||||
- `lastHour`: total visits and unique visitors in the last 60 minutes.
|
||||
- `last5Days`: daily visits and unique visitors for the last 5 UTC calendar days.
|
||||
- Wired visit recording to `GET /api/catalog` so app opens contribute to stats.
|
||||
|
||||
## 0.1.0 - 2026-03-25
|
||||
- Created initial frontend-only React + TypeScript project scaffold with Vite.
|
||||
- Added typed Marathon API client for fetching/searching items from `/api/items/all`.
|
||||
|
||||
Reference in New Issue
Block a user