The project is structured in two parts, one is reserved for the frontend and the other is for the backend.
Consists of a React application that fetches T9 word prediction data from a web api. It includes Storybook for you to see each one of the components in an isolated environment.
- Light / Dark theme based on the user's color schema.
- Nice numeric keyboard.
- T9 mode switch.
- Suggestions dictionary to avoid repeated service requests.
Consists of a Node/Express application that provides a T9 word prediction data web API. The suggestion algorithm was implemented using Tries.
- Word database taken from English word dictionary of 10000 entries.
- Suggestions are sorted by its frequency rank.
Both applications are configured to use eslint (with airbnb style guide), prettier and husky. There are git hooks that trigger linting and tests scripts before comitting and pushing, respectively.
- Move to the root folder of the project.
- Run
npm run install
to install the tools. - Run
npm run both:install
to install the frontend and backend dependencies. - Run
npm run start
to start both applications. By default, the frontend will run in the port3000
and the backend in the port3001
- Move to the root folder of the project.
- Run
npm run both:test
to install the tools.
There is a .env file located in the frontend folder that has the environment variable that controls that value. 0. Move to the frontend folder.
- Open the .env file.
- Change the value of the REACT_APP_T9_API_URL variable.