- SRP - Single Responsability Principle
- OCP - Open Closed Principle
- LSP - Liskov Substitution Principle
- ISP - Interface Segregation Principle
- DIP - Dependency Inversion Principle
- SOC - Separation of Concerns
- DRY - Don't Repeat Yourself
- KISS - Keep It Simple, Silly
- Composition Over Inheritance
- Small Commits
- Factory
- Adapter
- Dependency Injection
- Singleton
- Using Husky with Lint-Staged to make sure that only will be commit/push code that pass in all unit and integration tests.
- TDD
- Conventional Commits
- Modular Design
- rename file .env.example to .env
- docker-compose up
- You can test the api opening swagger docs or calling each specific route
- localhost:3000/api-docs
- localhost:3000/delete-word/:word
- localhost:3000/get-three-words/:word
- localhost:3000/update-word/:word
- Coverage over all core system
Your task for this challenge is to create a small search engine comprising of two parts, a web-based user interface and a server component that exposes a REST API which provides search results retrieved from a corpus of text that will be provided to you in corpus/hemingway.txt
.
Your submission will be evaluated for conforming to the specifications outlined below as well as code quality (maintainability, scalability, performance etc.). You are permitted to use any resources and libraries you wish, however, you should be able to justify design choices in your code.
The basic search engine should be capable of the following three operations.
- Given a query consisting of a single word, display the 3 most similar words in the search corpus according to some similarity metric of your choosing.
- Given a single word
w
, update the search corpus withw
. The new wordw
should immediately be queryable. - Given a single word
w
, remove the most similar word tow
in the corpus from further search results.
The user interface should be a browser-based application developed using your JavaScript web framework of choice. It should support the three aforementioned operations. How this is done is completely up to you. Use your creativity and imagination to create a UI that will set your submission apart!
The REST API can be implemented using whatever language and frameworks of your choosing. Again, like the UI, it needs to support the three operations listed above. How you choose to accomplish this task is up to you.
To submit your challenge, fork this repository and provide the link to your forked repository. You should also update this README to include instructions on how to run your search engine. Tests are not mandatory but will be considered bonus points if you provide them.