Prognoz - a project of tournaments for football forecasters. Created, working, and complementing since 2016. The project is non-profitable - all work of developers and administrators is volunteered. The main diversity of the project is the ability to change a forecast on the match until a specific minute, depending on various tournament conditions. There are different types of tournaments - individual and team. A simplified principle of work can be described as follows:
- administrators add matches to forecast
- players add and change their forecasts
- administrators add results of the matches
- system calculates points and ratings, compares points, withdraw players, etc.
The project Prognoz uses a client-server architecture. Respectively, this GitHub repository contains a web application that is a client. The web application is built on the popular frontend framework Angular. The following libraries used as well:
- bootstrap / ng-bootstrap / bootswatch
- ng-select
- angular2-notifications
- chart.js / ng2-charts
- fingerprintjs2
- moment
- lodash
- quill / ngx-quill
- pusher-js
A server-side part of the code is placed in a separate repository.
The web application could be run locally or in the Docker. In both options, the web application uses the next environment variables:
| Environment variable | Required | Description | Example |
|---|---|---|---|
| API_BASE_URL | + | Base URL of server-side API | http://localhost:8000/api |
| IMAGE_BASE_URL | + | Base URL of images | http://localhost:8000/img |
| PUSHER_API_KEY | - | The kee for users-online list | |
| RECAPTCHA_SITE_KEY | - | The kee for captcha |
- Install node and npm
Installnodeof version 14.7 according to your platform. During the installation ofnode,npmwill be installed automatically. - Make sure that
nodeandnpmare installed
Both console commandsnode -vnpm -vshould output versions. For examplev14.17.4and6.14.14. - Install Angular-CLI
Runnpm install -g @angular/cli@10.2.1command. - Make sure that
Angular-CLIis installed
Runng versioncommand. It should print meaningful information. - Install dependencies
Runnpm cicommand from the project root. The foldernode_modulesshould appear afterward. - Launch web application
Runng servecommand with previously set environment variables. The web application will be automatically rebuilt with each code change. - Open web application
Go to http://localhost:4200/ in your browser.
Other useful command:
ng test- run tests.ng generate component|directive|pipe|service|class|guard|interface|enum|module element-name- generate a new element.ng build- build the project.
- Install dependencies
Rundocker run --rm --interactive --tty --volume $PWD:/app --workdir /app node:14.17.4-alpine npm cicommand. - Launch web application
Rundocker-compose -f docker-compose.dev.yml up web_app_devcommand. The web application will be automatically rebuilt with each code change. - Open web application
Go to http://localhost:4200/ in your browser.