Different general knowledge quizzes to exercise your brain. This simple desktop app is done using Electron, VueJS and Firebase realtime database
# Clone the git repository to your folder
git clone https://github.com/giddyeffects/trivia <your-folder>
cd <your-folder>
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
Create a new firebase database if you've not done so already.
# create a file in src folder called config.js
touch src/config.js
/**
* Copy paste this content into the created config.js file
* replace relevant firebase db details
* and save the file
*/
let config = {
apiKey: "<YOUR-APIKEY>",
authDomain: "<PROJECT_ID>.firebaseapp.com",
databaseURL: "https://<PROJECT_ID>.firebaseio.com",
projectId: "<PROJECT_ID>",
storageBucket: "<PROJECT_ID>.appspot.com",
messagingSenderId: "<MESSAGING_SENDER_ID>"
};
export default config
Upload the samples.json file into your firebase database. You can then add/modify the questions and the updates appear on the client in realtime. For now this trivia app supports multiple choice and single text based questions. I plan to add multiple checkboxes and a rating system for the total score. Use the same JSON file to update the DB with your questions, editing as necessary.
Please check the official firebase docs for help on using firebase.
# in the root folder execute the command below to run the app
electron .
You can modify the app for:
- General knowledge questions
- Aptitude tests
- Job interview screening questions
- Quiz games with levels etc