I found a .txt file online that was supposedly similar to a Scrabble dictionary, put each word into a hash set when the app boots up, then check each word when you try to type it!
If you know Python, all the source code is available online on my Github. Here’s the script that checks for valid words: word_manager.py