Group (4) repository for Coders for Causes Summer Beginner Project (2023/24)
Play PerthPinPoint Now: perthpinpoint.city
- Original Repository
- Concept
- Features
- Google Maps API
- Structure
- Dependencies & Deployment
- Testing
- Demo
- LICENSE
PerthPinpoint is a remake of the popular game "GeoGuessr" within the context of Perth, Western Australia. It features several different game modes which will test your knowledge about how well you know the amazing city of Perth.
Perth PinPoint features 3 gamemodes, including:
- Classic City
- Local Landmark
- Street Sleuth
Challenge your friends by getting on the leaderboard for the Classic City game mode!
Perth PinPoint relies on Google Maps API for street view functionality. PerthPinPoint has its own associated API keys preloaded, or you can obtain your own here.
API Key Locations:
/app/frontend/main.html
(L31)/app/frontend/js/components/streetview.js
(L71)
Perth PinPoint is built with the stack such as:
Frontend - Vanilla HTML/CSS/JS
Backend - FastAPI (with Jinja2) & sqlite3
These components are stored in respective directores app/frontend
and app/backend
, with important files in /
and /app/core
- please see "Dependencies & Deployment" for further information on configuarion
Perth PinPoint requires multiple dependencies, install them as such:
pip install -r requirements.txt
*assuming you are in the directory /
Configuration:
To configure Perth PinPoint, edit app/config.py
, code comments explain options however importantly if youre not intending to develop Perth PinPoint, DEV
should be set to False
to run in "production" mode - this (should) be the case for any (updated) code on the main branch.
- The host/port on which Perth PinPoint is made accesable is modifiable to suit enviroment needs (even on prod), see the config file or this is printed out via console upon running.
Running Perth PinPoint:
`which python3` app/init.py
*assuming you are in the directory /
or the respective windows equivilent
Deploying with Docker: A Dockerfile exists, note this is configured for production deployment:
docker build -t perthpinpoint .
docker run --mount type=bind,source="$(pwd)/app/core",target=/pinpoint/app/core -dp 0.0.0.0:80:8080 --name "pinpoint" perthpinpoint
# docker stop pinpoint ; docker rm pinpoint
Some basic tests have been developed to create a more robust program.
The tests are located in app/tests/test_backend.py
.
To execute the tests run
pytest app/tests/test_backend.py
Here is a quick demo of what the game looks like:
You can visit the /tutorial
page for more information on the game
License: here
The contents of the original repository (generated via beginner-2023S
) is located here.
This is for use of learning web technologies, namely javascript etc, etc...