This is an application which helps to calculate how many points a word (up to 10 chars) in scrabble would score. I am using the TDD (Test Driven Development) approach to build this application as much as possible within the allotted time, simply put writing tests before writing the implementation code and refactoring the code in the process. Read more here.
I will also be using TBD (Trunk Based Development) where I keep commits small and push directly to the main branch. Read more here.
- Enter any English word from 1-10 characters
- Get scrabble score based on word entered
- Save your score
- Reset tiles
- View top 10 scores
- Validate if your word is an English word and if it is not, score is not calculated
- If your word scores in the top ten, you will see a banner that informs you that your word has scored in the top ten and advises you to save
Please adhere to the package versions below (Prerequisites) to avoid any issues with installation.
- Node.js v19.0.0
- npm v8.19.2
- yarn 4.1.1 (with Corepack enabled, shipped default with Nodejs)
- Clone the repository:
git clone https://github.com/eLn86/spc-backend.git
- Navigate to the project directory:
cd spc-web
- Ensure corepack is enabled:
corepack enable
- Set yarn version:
yarn set version 4.1.1
- Install dependencies:
yarn install
- Start the development server:
yarn start
The application should now be running on http://localhost:3000. As API calls are made the moment you type a letter, please ensure that the backend is running first. You can get it up by following the instructions here: https://github.com/eLn86/spc-backend
I am using Jest for unit tests. You can run the tests via the following command:
yarn test
For test coverage, you can run:
yarn test --coverage
- React JS
- Axios for API calls
- Create React App for bootstrapping
- Ant Design for UI
- Free dictionary API (https://dictionaryapi.dev/)