Read Dr. Dolittle is a web app designed to teach students in middle or high school to read using an interactive learning app that reads aloud, quizzes students on, and provides vocab definitions in the literary classic Dr. Dolittle.
Illiteracy in children is a major issue - students that cannot read early on often fail to reach their full potential in life. Oftentimes, teachers are unable to separatly tutor individual stuggling students when the parents are unable or unwilling to help. This web-based app is designed to help these struggling students become proficient readers.
Development is finished and codebase is currently ready for handoff to client.
To clone and run this application, you will need Git installed on your computer. To run any of the python files in the backend folder, you will need Python installed on your computer (this is not required to run the actual application).
Open a terminal or command prompt.
# Clone this repository
$ git clone https://github.com/neilhpatel/CodeATale.git
Alternatively, you can download ZIP of the repository by clicking on code, and clicking on download ZIP. If you want to simply run the application and do not wish to run any individual files or write to the database, skip to step 4 (Run the application).
# Go into the repository
$ cd CodeATale
Add ServiceAccountKey.json to the CodeATale/root/backend/src folder. This will allow developers to write words and all corresponding attributes (definition, is_sight_word, is_child_word, parent_word, derivative_words, and block_from_quiz) to the database. The files DefParser.py, DefParser2.py, DefParser3.py, and DefParser4.py require ServiceAccountKey.json to execute.
# Install dependencies
python -V #Check python version
pip install -r requirements.txt #if you have Python 2.x.x
pip3 install -r requirements.txt #if you have Python 3.x.x
No build is necessary for this application.
Option 1 (recommended): Run index.html using an integrated development environment (IDE). IntelliJ, PyCharm, and VSCode can be used.
Option 2: Run index.html using a Google Chrome extension.
No module named docx2txt
, No module named pydub
, or No module named firebase_admin
error when running a python file.
No such file or directory …/ServiceAccountKey.json
.
frontend
.Project Name: Junior Design
Project ID: junior-design-178a
Plan: Spark Plan - This plan requires $0 a month. It has usage quotas for Database, Firestore, Storage, Functions, Phone Auth, Hosting, & Test Lab. We recommend upgrading to the Blaze plan for optimal use to eliminate any bugs caused from reaching such quotas; however the Blaze plan will have a pay as you go pricing model. For more information, check out the Firebase pricing plans.
1) Firestore Database:
This database largely contains information pertaining to users and individual words from the story. The database organizes information by collections, which contain documents, which store specific information.
*Structure of Data:*
One collection is called `Users`. All of the documents within this collection are distinct usernames (ex: “mtl10”, “neil”). Information is included as follows, on a document by document basis:
* bookMarkList - Keeps track of the chapter and page number of all bookmarks in chronological order of when they were added (The string is parsed to find the chapter and page number. ex: chptNum-pageNum chptNum-pageNum)
* chapterProgress - An array of numbers for each chapter (index 0 is ignored) that increments until the chapter is fully read by the user. It is used to display a proper percentage bar to the user in the chapter select screen after going through some basic calculations in the code. Each cell number in the array correlates to the chapter number of the book.
* pagesViewed - Formatted mostly like the bookMarkList but in an array like the chapterProgress array (again index 0 is ignored). Keeps track of every single page and chapter viewed in this format: chptNum-pageNum chptNum-pageNum. Each cell number in the array correlates to the chapter number of the book.
* queue - An array of words in the order that the user added words to the queue. However, the user has the option to quiz the word immediately in which case the queue array is modified locally in the code first before the modified queue array is updated to the database (basically the queue gets updated first in the code and then the updated queue is sent to the database. The code doesn’t directly modify the queue in the database until it modifies the queue in the code first.)
There are 26 other collections, each labeled with one lowercase letter in the alphabet (“a”, “b”, “c”, …. “z”). Each of these collections includes numerous documents labeled with distinct words that begin with the collection letter. For example, “aback” and “abandon” are documents within the “a” collection. Information is included as follows, on a document by document basis:
* block_from_quiz (str) - contains all the words that should be excluded as quiz answer options for the quiz of the word (see document label)
* definition (str) - definition of the word (see document label)
* derivative_words (list) - list of derivative words (str) of the word (see document label)
* is_child_word (bool) - describes if the word (see document label)
* is_sight_word (bool) - describes if the word (see document label) is a sight word
* parent_word (bool) - describes if the word (see document label) is a parent word
Note that all information across these collections, documents, and specific information is lower-case. Child words refer to words that are derivatives of another word. Parent words refer to words that have derivative words. Sight words refer to words that are simple enough such that the user requires no highlight/quiz feature in the application.
Consult [the Firestore documentation](https://firebase.google.com/docs/firestore?hl=en&authuser=1) for instructions on how to properly read and write from this database.
2) Storage:
This database stores audio files on a page by page basis, organized by chapter.
*Structure of Data:*
* Folders listed in “Chapter {Number}/” format where {Number} gets replaced by the target chapter number
* Within the folder, audio files are listed in “Chapter{Number}_Page{Number}.mp3” format where the first {Number} is the target chapter number and the second {Number} is the target page number
*Note that all pages do not have audio yet.*
Consult [the Cloud Storage documentation](https://firebase.google.com/docs/storage/web/start?hl=en&authuser=1) for instructions on how to properly read and write from this database.
Chapter selection page
Bookmark widget - all bookmarks are stored in a database and saved between sessions
Gallery Screen
Reading page
Quiz page
Review page