questlist


Logo

Questlist

A fun platform for gamers

Table of Contents

About

Questlist is a web based platform for… things…

Development Guide

⚠️ WARNING: There is an .env file required for development. While this file will NEVER contain production credentials, it is still highly important that it does not get uploaded to this repository in order to mitigate security issues. The necessary precautions are already in place to prevent the file from being uploaded so you do not have to worry about it.

Prerequisites

In order to run the development environment locally, you will need to have installed the following:

Setup

In order to setup your environment, please complete the following steps under the section for your operating system.

Windows

  1. In a Powershell terminal, use the following command to clone the repository to your machine. This will create a directory called “questlist” and put the entire repository in it.
     git clone https://github.com/questlist-development/questlist.git
    
  2. Securely retrieve a copy of the .env files needed from another team memeber. Place them in the “questlist” directory.
  3. Make sure Docker Desktop (or just Docker) is running. For Docker Desktop, check the system tray in the bottom right corner.
  4. In a Powershell terminal, change directories to the “questlist” directory and run the following:
     .\scripts\powershell\Setup.ps1
    
  5. In the same Powershell terminal and the same “questlist” directory, start up the containers in a detached state using the following command:
     docker compose -f 'docker-compose.yml' up -d 
    

The basic containers should gradually start and the app should be accessible at http://localhost. If you need to start the tools as well, see instructions for running the tools profile.

Mac or Linux

  1. In the terminal, use the following command to clone the repository to your machine. This will create a directory called “questlist” and put the entire repository in it.
     git clone https://github.com/questlist-development/questlist.git
    
  2. Securely retrieve a copy of the .env files needed from another team memeber. Place them in the “questlist” directory.
  3. Make sure Docker Desktop (or just Docker) is running. For Docker Desktop, check the system tray in the bottom right corner.
  4. In a terminal, change directories to the “questlist” directory and run the following:
     ./scripts/bash/setup.sh
    
  5. In the same terminal and the same “questlist” directory, start up the containers in a detached state using the following command:
     docker compose -f 'docker-compose.yml' up -d 
    

The basic containers should gradually start and the app should be accessible at http://localhost. If you need to start the tools as well, see instructions for running the tools profile.

Hot Reloading

When working in the front end, you are going to want to see the changes your code has made. The easiest way to accomplish this is to run the “app” container with watch enabled. To do so, run the following command in the “questlist” directory:

docker compose up --watch --build app

It will take a minute or two to start, but you will be able to see the server output in your terminal and anytime you save a file in the “queslist/src/Questlist.App” directory, its changes will be published and the app will hot reload.

API Documentation

All .NET Web APIs in Questlist have an Open API definition file and produce a documentation page at the /swagger endpoint. You can access these pages when the application is running in docker through your local host. Addresses for each service can be found in the table below.

API Name Documentation Address
Identity https://identity.localhost/swagger
Games https://games.localhost/swagger
Collections https://collections.localhost/swagger

Tools Profile

In order to keep the development environment resource usage to a minimum, tools like Prometheus, Grafana, Adminer and Kibana are not spun up by default. They can be activated with the following command ran from the “questlist” directory:

docker compose -f 'docker-compose.yml' --profile tools up -d 

Database Access

Queslist uses Adminer in order to provide a visual management solution for the database. This allows you to easily query and manipulate data as needed while developing. You can access Adminer, when the application is running in docker with the tools profile on, at http://localhost:8080.

On the Adminer page, set the System dropdown to PostgresSQL. Set the Server field to database. The username and password are located in the .env file retrieved earlier under the values POSTGRES_USER and POSTGRES_PASSWORD. The Database field can be left blank. Clicking Login should permit you access.