Scrabble word finder is a web app that turns novice scrabble players into champions!
GET /
: Returns the content of the appGET /words/<letters>
: Takes in a string of scrabble letters as a URI param and returns a JSON file with resulting scrabble words
- Download and install Python 3.5
- Clone this repository to your machine
- Open a terminal and change into the root of the repository
- Install virtualenv
pip install virtualenv
- Create a virtual environment
virtualenv venv
- Activate the virtual environment
source venv/bin/activate
- Install dependencies
pip install -r requirements.txt
- Run
python start_server.py
- Run
py.test tests
The server is written in Python and uses Flask as a web framework.
The business logic of the application can be categorized into three main parts...
-
Anagram Finder
Takes in a string and returns its anagrams using a special hash table. The hash table maps alphagrams to words. For example
dgo
maps to['dog', 'god']
. -
Word Finder
Finds all combinations of string of lengths
2, 3, .., n
wheren
is the length of the string. Then uses the Anagram Finder to get words for those strings. -
Word Finder Route
Verifies that the input string is valid and asks the Word Finder for the corresponding words.