realroyxu / CITS3403-MurderMystery

A repo for UWA CITS3403's group project
GNU General Public License v3.0
1 stars 0 forks source link

Murder Mystery Game / Forum

Make sure you are either in WSL (Windows) or Linux/MacOS

Purpose

The purpose of this web application is to provide a platform for users to solve murder mystery puzzles, participate in leaderboards, and interact through comments. The application is designed with a user-friendly interface and includes features such as user authentication, puzzle solving, commenting, and leaderboard tracking.

Design and Use

Group Members

UWA ID Name GitHub Username
23455873 Aifert Yet Aifert
23476285 Ryan Allagapen Teylan
23993019 Hongkang "Roy" Xu RealRoyXu
23344707 Jack Langoulant jacklangoulant

Launching the Application

To launch the application, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/realroyxu/CITS3403-MurderMystery.git
    cd into the repository
  2. Set Up the Virtual Environment:

    python3 -m venv venv
    source venv/bin/activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Set Up Environment Variables: Create a .env file in the root directory of the project and add the following variables:

    SECRET_KEY=your_secret_key
    UPLOAD_FOLDER=app/static/uploads/
    SQLALCHEMY_DATABASE_URI=sqlite:///db/ormtest.db
    DEV_DATABASE_URL=sqlite:///dev.db
    TEST_DATABASE_URL=sqlite:///test.db
    OPENAI_API_KEY=your_openai_api_key
  5. Initialize the Database:

    flask db upgrade
  6. Run the Application:

    flask run --port 8000

    The application will be available at http://127.0.0.1:8000.

Running the Tests

To run the tests for the application, follow these steps:

  1. Ensure the Virtual Environment is Activated:

    source venv/bin/activate
  2. Set Up the Testing Environment Variables: Make sure your .env file includes the TEST_DATABASE_URL variable.

  3. Run the Tests:

    python -m unittest discover tests

    This command will discover and run all the tests located in the tests directory.

    Please note some tests may fail if your test.db include / does not include certain data, please adjust your db accordingly.