Chelas Open VIDeogame Application (COVIDA) is a web application that allows users to search and browse videogames with the possibility of inserting and managing them into groups.
The groups are made by the user and are restricted to its owner. These can be customized with a name, description and a selection of games. The Web Application provides an authentication functionality for users to create and log into their accounts.
The application was developed in Node.js and uses the express module to handle HTTP requests. All the data is stored through the use of Elasticsearch. The information about videogames is gathered through the IGDB API.
COVIDA exposes the following functionalities:
- Functional and responsive Web Application to manage user created videogame groups
- Accessible HTTP API in paths preceded with
/api/covida
- Authentication feature
- Possibility to create accounts
- Sign into your account
- Delete your account
- List the top videogames
- Number of results shown can be customizable
- Possibility to add videogames to groups
- Search for videogames by name
- Manage your groups
- Create, Edit and Delete
- Manage videogames (Add/Delete/List)
Authentication-Preview.mp4
Games-Preview.mp4
Groups-Preview.mp4
Before running the application, the following steps are necessary:
The application requires to store information about the users and its respective videogame groups. In order to store this data, the NoSQL database Elasticsearch was chosen.
Before running the application, do the following steps:
- Download and unzip Elasticsearch from here
- Run
bin/elasticsearch
(orbin\elasticsearch.bat
on Windows)
Make sure the Elasticsearch window is always open while running the Web Application
A more detailed guide is available here.
Twitch provides a free API which shares data about videogames. This data includes information such as videogames, their rating, number of followers, and much more.
In order to use the IGDB API there needs to be a registration of a Twitch Developer Application. With an application, a Client ID and Client Secret is provided. These two are necessary in order to obtain an access token that will be used to perform requests to the API.
COVIDA utilizes environment variables to store the IGDB application Client's ID and its respective access token. In order to obtain these, the following steps are required:
- Sign Up to Twitch Developer Console here
- Ensure your twitch account has Two Factor Authentication enabled
- Register your application
- Manage your newly created application
- Generate a Client Secret by pressing [New Secret]
- Take note of the Client ID and Client Secret
To obtain an Access Token make a POST
request to https://id.twitch.tv/oauth2/token
with the following query string parameters, substituting your Client ID and Client Secret accordingly.
client_id=Your_Client_ID
client_secret=Your_Client_Secret
grant_type=client_credentials
A more detailed guide is available here.
After retrieving the application Client's ID and a valid access token, setup the following environment variables:
COVIDA_CLIENT_ID=YOUR_CLIENT_ID
COVIDA_AUTHORIZATION=YOUR_ACCESS_TOKEN
After setting up all the requirements, the application can be run. Make sure Node.js is installed on your machine!
Firstly, the application dependencies need to be installed.
To do this, execute the following command in the /app
directory:
npm install
To assure the application functions correctly there were developed unit tests and integration tests.
Although not necessary, if you desire to run the tests, execute the following command:
npm run test
The Web Application provides two optional parameters to run the App:
- The port where the HTTP Server communicates (
8000
if omitted) - The Elasticsearch index used to store data (
'covida-groups'
if omitted)
There are two ways to change the default port. You can either define the environment variable COVIDA_PORT
or put it as a first argument while running the application.
The Elasticsearch index used can be changed through the second argument.
To run the web application, execute the following command:
npm start [PORT] [ELASTICSEARCH_INDEX]
This application was developed for the Internet Programming class (5th semester) at ISEL.
Developed by: