Eeritvan / TSOHA-pelikauppa

0 stars 0 forks source link

Gamestore

This repository is for a project made for a University of Helsinki course. The application is supposed to act like a digital gamestore. Users can browse, purchase and rate games. Each user also has their own profile, which they are free to edit.

Edit 12.5

I added a deployment pipeline to fly.io that triggers when a commit is pushed to this repository. This update didn't change anything in the main project and was only made for a DevOps with Docker course assignment.

Features

Progress

Loppupalautus (5.5)

Välipalautus 3 (21.4)

Välipalautus 2 (7.4)

Testing app on fly.io

The application can be tested at https://tsoha-pelikauppa.fly.dev/. The fly.io version of the application includes some AI generated games, reviews and users instead of being completely empty.

Running locally

Prerequisites:

  1. Clone this repository
  2. Start your PSQL database. If you downloaded PSQL with the script provided in the material you can start it with command: $ start-pg.sh. Make sure to keep the database running in the background.
  3. Navigate to the TSOHA-pelikauppa directory and create a .env file:
    DATABASE_URL = <YOUR URL>
    SECRET_KEY = <YOUR SECRET KEY>
  4. Inside the directory create virtual environment with following commands:
    • $ python3 -m venv venv
    • $ source venv/bin/activate
  5. Install all dependencies by running:
    • (venv) $ pip install -r requirements.txt
  6. Create the database by running:
    • (venv) $ psql < schema.sql
    • (venv) $ psql < inserts.sql
  7. Finally, run the application with the command flask run and navigate to the url http://127.0.0.1:5000/

Additional notes