🎉 This repository contains a basic implementation for an interactive classroom-game using Googles Word2Vec implementation. 🎮
This project aims to create a dynamic and engaging learning experience for participants by challenging their word vector manipulation skills. Contestants compete in rounds where they're given a target word and a set of forbidden words. The goal is to construct formulas using words (represented as vectors) and mathematical operations, aiming to get as close to the target word as possible without using any of the banned words. The contestant with the formula closest to the target word emerges victorious in each round.
- Hosts (teachers, presenter) can register and create quizzes with multiple rounds, each featuring a unique target word and specific constraints on word usage
- Participants (students, attendees) can register for quizzes via a QR-code, join games, and submit their formulas during each round under a time limit
- Hosts have the ability to start quizzes, broadcast rounds, and receive live answers from players in real-time
- The server allows blazing fast verification of words to always make sure the used words exist in the vector database
- PostgreSQL database for storing hosts, players, quizzes, rounds, and results
- Googles Word2Vec binary files for very fast vector calculations using in-memory caching
- RESTful APIs for not time critical communication between the client and the server
- Websockets for real-time communication between the clients and to push updates to the clients
- ASP.NET Core framework for server configuration
- Docker for containerization for local development and stable deployment to Dokku
- Microsoft Entity Framework for leveraged object oriented programming with a database mapper
Before getting started, make sure you have the following prerequisites:
Follow these steps to set up the project:
-
Install prequisites
-
Clone this repository to your local machine:
git clone https://gitlab.uzh.ch/ltwa-hs23/sandrinraphael.hunkeler/webappcl-server.git
-
Change into the cloned repository directory:
cd webappcl-server
-
Add .NET User Secrets and replace all secrets with your own values:
{ "DB_NAME": "", "DB_PASSWORD": "", "DB_USER": "", "DB_HOST": "", "DB_PORT": "", "JWT_SETTINGS_ISSUER": "", "JWT_SETTINGS_AUDIENCE": "", "JWT_SETTINGS_KEY": "", "VECTOR_BIN": "./GoogleNews-vectors-negative300.bin" }
-
Build & start the web server:
dotnet run --launch-profile http --environment Development --project ToX
-
Open your favorite browser and have a look at Swagger! 🎉
http://localhost:5072/swagger/index.html
Verify build with Docker to simulate Dokku deployment
-
Make sure Docker Desktop is running
-
Open Powershell in repository directory
-
Build the docker image
docker build -t webappcl-server:latest .
- Deploy the docker image
docker run -d -p 5000:5000 --name webappcl-server webappcl-server:latest
- Open browser to check the deployment
http://localhost:5000/