MTWord stands for Memorize the Word and is a Quizlet clone but for Bible verses (using the ESV [English Standard Version])
After a conversation with one of my friends, we realized how difficult it is to memorize Bible verses. I wanted to try to build something to aid making Bible verse sets and memorizing different verses. When making specific Quizlet sets for many verses, it can be tedious to individually make cards for a passage. This application seeks to address that struggle with allowing user to easily create many cards from one long passage reference.
Backend:
- Flask
- Elasticsearch
- Elasticsearch was used to index the sets by their name and description in order to easily search for different sets
- PostgreSQL
Frontend:
- jQuery
- Lodash
- Used to debounce API call necessary to get the verse from
- Axios
- Used to make AJAX requests
In order to measure the amount of time between searching through the database to find our sets, the Python Profiler package was used in addition to Faker package in order to generate large amounts of set data.
Here below are the results of making different amount of queries (500, 750, 1000, 2000, 3000) across different number of sets (150, 300, 600, 900, 1200) in the database. The results can be averaged out in order to give a representation of the improvements made through implementing Elasticsearch. View the results here.
# of Sets | Percentage of time saved (avg) |
---|---|
150 | -30.6 |
300 | 8.09 |
600 | 22.03 |
900 | 36.94 |
1200 | 45.6 |
We can observe a logarithmic behavior that the improvements have when compared with the number of sets that were searched through. When searching through a smaller amount of sets in our database, query time is worse using the Elasticsearch; however, there is a significant decrease in the query time for larger searches. This accords with the fact that querying through Elasticsearch scales better compared to the standard database search methods which yields our decreases in the amount of time needed per query.
In order to host the project locally, follow these steps
git clone https://github.com/d-lee84/MTWord.git
cd MTWord
python3 -m venv venv
pip3 install -r requirements.txt
createdb mtword
python3 seed.py
flask run
Some features may not work locally because of API keys that are not available. Make sure to have PostgreSQL and Elasticsearch installed on your device.
- Tests: Want to make sure that all of my code is tested. Currently there is a problem running the tests because of an application context problem.
- Helpful memorization features: Text matching, quizzes
- Incorporating OAuth using Flask-Dance
- Ordering the sets by different factors such as name, created date, number of cards, etc...
- Reset password feature using JWTs Flask-JWT-extended
- Add a feature for someone to demo without loggin in