Demo Video Link: Video
.Net Core 7.0 Web API, C#
Install dotnet 7.0 mac - brew install dotnet (should install the latest version
Direct Download Link - Download
- Download / UnCompress the Zip
- On your Terminal, Navigate to AutoCompleteAPI/AutoCompleteAPI (you should see AutoCOmpleteAPI.csproj)
- Run command
dotnet dev-certs https --trust
- Run command
dotnet build
- Run command
dotnet run
- You should see the service listening on port 5000
- Find index.html inside /AutoCompleteAPI/AutoCompleteAPI/index.html
- Open it and start typing
- I am using Trie DS for this purpose. I didn't get much time to prepare a larger dataset.
- Available Words:
- aim / aid
- apple / app / append / appear / appeal /ape / apex / apartment
- pat / pie / piece / pine / pint / pineapple / pierce / ping / pinch / piper / piano
- Trie DataStructure (Idea is to potentially use a MongoDB Repository
- REST Routes /Suggestions/GetSuggestions?prefix=ap /Suggestions/IncreaseFrequency?word=apple
- In Memory Caching (Idea is to use Redis or Distributed Cache in future)
- Auto expires in few seconds