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.
- User Authentication: Users can register and log in to the application to access personalized features.
- Murder Mystery Puzzle Solving: Users can attempt various Murder Mystery puzzles. The application verifies solutions and tracks puzzle-solving times.
- Comments: Users can comment on puzzles and interact with other users.
- Leaderboards: The application maintains site-wide and post-specific leaderboards to track user performance based on post count and solve count.
UWA ID | Name | GitHub Username |
---|---|---|
23455873 | Aifert Yet | Aifert |
23476285 | Ryan Allagapen | Teylan |
23993019 | Hongkang "Roy" Xu | RealRoyXu |
23344707 | Jack Langoulant | jacklangoulant |
To launch the application, follow these steps:
-
Clone the Repository:
git clone https://github.com/realroyxu/CITS3403-MurderMystery.git cd into the repository
-
Set Up the Virtual Environment:
python3 -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install -r requirements.txt
-
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
-
Initialize the Database:
flask db upgrade
-
Run the Application:
flask run --port 8000
The application will be available at
http://127.0.0.1:8000
.
To run the tests for the application, follow these steps:
-
Ensure the Virtual Environment is Activated:
source venv/bin/activate
-
Set Up the Testing Environment Variables: Make sure your
.env
file includes theTEST_DATABASE_URL
variable. -
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.