- Make the system work with esp-32 clients
-
RemoveHardcode the PIN system - Capture and document the flow of Websocket stuff, and see what we specifically need to re-create
-
- ESP-32 Client Software
- When it turns on, it tries to connect to the web server
- It then creates/signs in to with a predefined name
- Every ESP32 has a predefined name
- We should put these names as labels on bags, and have people scramble at the beginning to pick the names they like the most
- When a button is pushed, submit a websocket instance with a player id.
- We need to submit an event like this from the esp32:
-
socket.on("player:selectedAnswer", (answerKey) => Player.selectedAnswer(gameState, io, socket, answerKey), )
-
- We need to emit something like this, where
answer
is a number '0-3'-
socket.emit("player:selectedAnswer", answer)
-
- When it turns on, it tries to connect to the web server
This is a fork of Rahoot, intended for use with ESP32 clients.
Rahoot is a straightforward and open-source clone of the Kahoot! platform, allowing users to host it on their own server for smaller events.
⚠️ This project is still under development, please report any bugs or suggestions in the issues
- Node.js version 20 or higher
-
git clone https://github.com/Ralex91/Rahoot.git cd ./Rahoot
-
npm install
-
Check websocket connfiguration in config.mjs
If you want the client to connect directly to the websocket server, edit the config.mjs file and change the localhost to your public IP address.
export const WEBSOCKET_PUBLIC_URL = "http://1.2.3.4:3100/" export const WEBSOCKET_SERVER_PORT = 3100 // Rest of the config ...
-
npm run all
npm run all-dev
Configuration can be found in config.mjs
const QUIZZ_CONFIG = {
password: "PASSWORD", // Manager password
subject: "Adobe", // Subject of the quiz
questions: [
{ // Example question
question: "What is good answer ?", // Question
answers: [ // Possible answers
"No",
"Yes",
"No",
"No",
],
image:
"https://images.unsplash.com/....", // Image URL (optional)
solution: 1, // Index of the correct answer (index starts at 0)
cooldown: 5, // Show question cooldown in seconds
time: 15, // Time to answer in seconds
},
...
],
}
-
Go to https://localhost:3000/manager enter manager password.
-
Share link https://localhost:3000/ and code on manager screen with your friends and get ready to play.
-
Once everyone is ready, start the game with button on the top left of the screen of manager.
-
Create a fork
-
Create work branch (Example: githubUsername/featureName).
-
Commit and push your changes in the work branch.
-
Open a pull request.
-
Your pull request would be merged and changes will be reflected in the main repository.