💽 Database Model

Model relationships between quiz entities in Firestore

In order to build an app identical to the live demo, you need to populate Firestore with data.

Task: Populate your Database with Quiz Data

I recommend cloning the Quiz Questions Repo. It is a node script that allows you to populate all the quiz data in your own database with a single command.

At the very least, create the following documents from the schema images below.

  1. One document located at topics/my-topic.
  2. One document located at quizzes/my-quiz.

Database Model

You can also create your own data from scratch. Below you will find screenshots of sample quiz data for each collection.

Topics

Topics collection data model

Topics collection data model

Quizzes

Quiz collection data model

Quiz collection data model

User Report

Report collection data model

Report collection data model

Questions? Let's chat

Open Discord