Statistics generation service for StreetComplete. It is powering profile view in the app where various statistics are displayed.
Works with PHP 7.3+ and MariaDB 10.2.4+.
- Copy this repository to a webserver
- Perform appropriate file protection measures if included
.htaccessfile is not used - Create
config.phpfromconfig.sample.phptemplate and fill with production settings - Create the respective database
delete_data_of_deleted_users.phpshould be scheduled to run daily,update_incomplete_statistics.phpshould be scheduled to run in regular intervals, for example every minute or so,generate_ranks.phpshould be scheduled to run in regular intervals, hourly is good, but can be in shorter intervals as well
- Open project in devcontainer
- Create
config.phpfromconfig.sample.phptemplate and fill with development settings - For debugging set a breakpoint and run the
Listen for Xdebuglaunch config before running any scripts - Run scripts with
php <SCRIPT> - Run webserver with
php -S localhost:8080and go tohttp://localhost:8080/get_statistics.php?user_id=<USER_ID>