CodePress CMS v1.9.0: visitor statistics with SVG world map and GeoIP

- Add GeoIP class with provider chain: local DB-IP Lite, MaxMind .mmdb, external API
- Add built-in pure-PHP MMDBReader so .mmdb works without Composer
- Add cli/geoip-update.php to download DB-IP Lite and build a compact binary index
- Add cli/generate-world-map.php to generate the world map SVG from Natural Earth TopoJSON
- Add Analytics class aggregating stats in admin/storage/stats.json with LOCK_EX
- Add admin statistics page with choropleth world map, country list, top pages,
  daily chart, referrers and a period filter
- Add GeoIP and privacy settings with database update and stats reset buttons
- Add optional IP anonymization and configurable retention period
- Add country field to requests.log (parser accepts 7, 8 or 9 fields)
- Add country column to request log and KPI cards to the dashboard
- Ignore GeoIP binaries and stats.json in Git
- Update TODO.md, guides and version to 1.9.0
This commit is contained in:
2026-07-29 15:40:02 +02:00
parent a795307664
commit 5357bc8915
20 changed files with 1804 additions and 11 deletions
+1
View File
@@ -303,6 +303,7 @@ Media files (images, PDFs, video, audio) can be placed in any `content/` subdire
| `content-dir-delete` | Delete directory (empty only) |
| `config` | Configuration form (title, homepage, language, SEO, author, features) |
| `security` | Security settings (bot/AI blocking, rate limiting, IP block/allowlist) |
| `statistics` | Visitor statistics with world map, countries, pages and GeoIP settings |
| `update` | One-click system update via Git pull |
| `theme` | Theme management |
| `plugins` | Plugin overview |
+4
View File
@@ -89,6 +89,9 @@ CodePress CMS is een lichtgewicht, file-based content management systeem gebouwd
- **Handleiding** - Ingebouwde documentatie met API referentie
- **Systeem Update** - Eenvoudig de site bijwerken via `/admin/update` met één klik via Git pull
- **Git-safe Configuratie** - `config.json` en `admin/config/admin.json` worden automatisch gegenereerd als ze niet bestaan en zijn uitgesloten van Git, waardoor wachtwoorden en instellingen behouden blijven bij updates
- **Bot & AI blokkering** - Instelbare blokkering van AI-crawlers, scrapers, lege user-agents en zoekmachines via `/admin/security`, met rate limiting per IP en IP block/allowlist
- **Bezoekersstatistieken** - Wereldkaart met bezoekers per land, unieke bezoekers, meest gelezen pagina's, verwijzende sites en een dagelijkse grafiek via `/admin/statistics`
- **GeoIP** - Landbepaling via een lokale DB-IP Lite database (offline, privacy-vriendelijk), of een eigen MaxMind `.mmdb` bestand of externe API
- **Bot & AI blokkering** - Automatische 403 voor bekende bots en AI-crawlers
- Session-based authenticatie met bcrypt hashing
- CSRF-bescherming, brute-force lockout (5 pogingen, 15 min)
@@ -305,6 +308,7 @@ Media bestanden (afbeeldingen, PDFs, video, audio) kunnen in elke `content/` sub
| `content-dir-delete` | Map verwijderen (alleen leeg) |
| `config` | Configuratieformulier (titel, startpagina, taal, SEO, auteur, features) |
| `security` | Beveiligingsinstellingen (bot/AI blokkering, rate limiting, IP block/allowlist) |
| `statistics` | Bezoekersstatistieken met wereldkaart, landen, pagina's en GeoIP-instellingen |
| `theme` | Thema beheer |
| `plugins` | Plugin overzicht |
| `plugins-new` | Nieuwe plugin aanmaken |