Vocabulary App

In the summer of 2021, I decided to improve my vocab for a test I was preparing for. There were three sections to it - essays, verbal, and quant. For the first two, I needed to brush up on my vocab, and I needed to do it fast.

Problem

I had a list of custom words that I could NEVER remember. I have always relied on visual memory, so I tried making Anki flashcards. However, Anki required you to make each flashcard manually; searching for pictures was exhausting, so I quickly gave up on this endeavour. Then I thought to myself - what if I were to automate this process?

Idea

To build an app easily accessible by any device, which would randomly pick from a list of pre-provided words and display a flashcard associated with it.

Solution

I built a web-app to help me memorize words. Each flashcard contains the word, its definition, a bunch of synonyms, and 3 pictures associated with the word.

Architecture

archi

Each request on the fronted would make a call to the REST API define/<word>. This call would first check if the word is already available in the DB. If not, it would store it, and download the images from an image search API.

Tech Stack

  1. Flask backend (Python) for REST API
  2. Bootstrap to style HTML and CSS for frontend, make it responsive
  3. Deployed on Heroku As of 2024, Heroku is chargeable. I have moved my deployment to Render.
  4. Storage on Postgres DB, Peewee ORM for backend to DB connection
  5. DuckDuckGo API to retrieve images via API call

Loading each word took some time, as DuckDuckGo API was slow and it took time to download each image. So, I decided to use a form of memoization; I could persist the images and store their filepath in the DB, loading it quickly the next time the word was called.

  • I chose DuckDuckGo instead of Google Images because Google requires you to register your use case for an OAuth token.

archi

Flashcard for indolent - also how I feel everyday

Future Improvements

  • Memoization has posed some problems on the cloud - I am using the free tier of Heroku, which flushes any ephemeral storage every hour. The app continues to be slow, unless you exhaust the words every hour (and since I am done with the GRE, I no longer feel a need to do this).

  • Be able to enhance the word list dynamically (currently you can enter a word to check its definition)

  • Add a feature to save all the words as PDF.

  • Make an iOS/Android version of this.

Thanks for reading! If you have any suggestions, feel free to check out my repo and open an issue 😊

PROJECTS
personal python