Welcome to Board Game Village, where the long-term vision is to connect players and encourage more playing of games in real life. On the user home page, users can keep track of their board game collection and wishlist by searching and adding games from the Board Game Atlas API to their virtual board game shelves, and easily create listings for games they want to sell. In the Marketplace, users can see all listings or get a personalized view of wishlist matches and recommended games. The app uses an original algorithm to analyze each user’s board game collection and wishlist for trends in game mechanics and categories to generate the recommendations.
When I first learned Python, I discovered coding was not unlike learning the rules and strategy to a game, solving escape room puzzles, and editing — all activities that I enjoy. I doubled down on my decision to switch careers by attending Hackbright Academy, a full-stack software engineering program with a mission to #changetheratio in tech. I'm thrilled to combine my skills, talent, and interests into my new path as a software engineer.
- Python
- Flask
- Jinja2
- Javascript
- jQuery
- PostgreSQL
- SQLAlchemy ORM
- HTML
- CSS
- Bootstrap
In Board Game Village, each user has a Shelf to keep track of games they own, games for sale, and games they wish to buy. Using Javascript, I added event handlers that listen for a click on the buttons. They make an AJAX call to a server route, which is set up using Flask as the web framework and written in Python. The route makes a query to my database using SQLAlchemy ORM, and returns the data in JSON. The result is the page can quickly update the parts that have changed without reloading the whole page.
To add games to the Board Game Shelf, users can search for a game by name. A call is made to a server route that makes a request to the Board Game Atlas API. It can take a few moments to get the response, so I included a loader icon. When I decide to add agame, another request is made to the server to check if the game details already exist in the database. If not, it’ll get it from the API to store. I decided to do it this way because I wanted users to be able to search all games, but I didn’t want to waste space storing data about games that no one’s doing anything.
Users can choose from a dropdown which of their owned games to list for sale. A modal will open for the user to input the game's condition and price and an optional comment. Once listed, a game listing can be edited or if the user changes their mind and wants to keep the game, they can remove the listing. If a game is sold, the user should remove the game from their collection, which will also remove the listing.
In the Marketplace, user can see all games being sold and filter to see only ones matching their wishlist or listings for recommended games. To recommend games, the app's algorithm analyzes the games the user owns or wishes to own, finds the top three mechanics and categories for a total of 6 traits, and finds matches in the marketplace that have at least one of these traits, not including any games the user already owns or wishes to own. The matched traits are shown along with the results.
To learn more about a game listing, user can click on the game name. A modal appears with the listing comment, if any, along with standard game details. If the seller has any other games listed in the Marketplace, a button will appear for the user to filter all the marketplace listings by that seller. If user is interested in contacting the seller, they can click on the button to open up a new email in their default email client, with the seller email address in the TO field and the game name in the email subject prepopulated.
The next planned feature for Board Game Village is a Tavern for creating and finding board game meet-ups.
To run Board Game Village Marketplace on your machine:
- Install PostgreSQL
Clone or fork this repo:
https://github.com/norrismei/bgvillage_marketplace
Create and activate a virtual environment inside your Board Game Village directory:
virtualenv env
source env/bin/activate
Install the dependencies:
pip install -r requirements.txt
Sign up to use the Board Game Atlas API
Set up the database:
createdb bgvillage
python3 model.py
python3 seed_database.py
Run the app:
python3 server.py
You can now navigate to 'localhost:5000/' to access Board Game Village Marketplace. Enjoy!