Add players, events and match results. Ratings and leaderboard are updated automatically.
Hobby project, made with Django + DRF, VueJS (Vuex, Vue Rouer, Vuetify).
Live demo here
App is available in two languages: English and Russian.
-
Ranker uses Postgresql as database engine. All necessary migration files are included.
-
(provided for portability) Django i18n compiled file
.mo
is included in the repo. Dont forget to recompile it with$ ./manage.py compilemessages
if updating translations.gettext
utility is needed for this (sudo apt install gettext
).
- Install Python 3.9
- Create virtual environment and install packages with
$ pip install -r requirements.txt
- Install node.js and then packages with
$ npm install
- Build assets with
$ npm run build
- Create Postgresql database, change database name and user/password in settings if needed. Default value for database, user and password is
ranker
- Migrate the database:
$ ./manage.py migrate
$ ./manage.py createsuperuser
$ ./manage.py createcachetable # caching is enabled for leaderboard
$ ./manage.py createdemo # to load demo data
- Use
$ ./manage.py runserver
or deploy with 3rd party web server - Use superuser account at
/admin
to manage the database content and to save new match results.
- Sign up for free Heroku account and install Heroku CLI
- Shell commands:
$ heroku apps:create your_app_name
$ heroku git:remote --app your_app_name
$ heroku buildpacks:add --index 1 heroku/nodejs
$ heroku buildpacks:add --index 2 heroku/python
$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku config:set DJANGO_SETTINGS_MODULE=ranker.settings.prod
$ heroku config:set RANKER_SECRET_KEY='production SECRET_KEY value'
# superuser section, set values as needed
$ heroku config:set DJANGO_SUPERUSER_USERNAME=admin
$ heroku config:set DJANGO_SUPERUSER_PASSWORD=admin
$ heroku config:set [email protected]
$ git push heroku
- Use
$ heroku open
to reach the application.
Big thanks to gtalarico/django-vue-template for settings template and perfect instructions.
If you need some fake data for demonstration or development purposes you can create it with $ ./manage.py createdemo
. Some basic parameters for fake data can be altered here
Please create an issue or email me if you have any questions.