About this project
Wstats (WebStats) is a privately deployable website statistics and analytics system designed to fully retain every byte of user data. The backend is built with native PHP, MySQL, and Redis, while the frontend is based on React and Semi Design, along with a zero-dependency JS tracking SDK.
Core features include multi-site and multi-user management (with registration/login and file verification) and bilingual support for Chinese and English. The current version provides an overview dashboard (PV/UV/IP/bounce rate/average duration/active trends/today's real-time hourly breakdown), source analysis (channel composition/trends/external links/UTM/ad platforms), session lists, and complete behavior logs for individual sessions. The system has reserved fields at the collection layer and database tables for deep modules including visitors, journeys, advertising, performance, replay, heatmaps, funnels, geography, and large-screen displays, to be iterated in phases.
In terms of architecture design, several optimizations have been implemented for high-traffic scenarios: the collection layer writes only to Redis, with a resident worker batch-writing to the database; the events table is partitioned by month and automatically maintained by scheduled tasks; overview reports read from pre-aggregated summary tables; UV/IP is precisely deduplicated through event detail records. The system includes a pure PHP RESP protocol client, requiring no additional Redis extensions, and can automatically degrade to direct MySQL writes when Redis fails.
For deployment, it supports web wizard, command line, and Docker Compose one-click deployment. Configuration files and core code are placed outside the web root directory for security. The system provides a site verification mechanism—only verified sites can report data—and supports manual configuration of real IP sources to adapt to reverse proxy environments. The project is licensed under the MIT License, allowing free commercial use.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.