This application is designed to retrieve search engine results and determine the rank of a specific URL within those search results. If the rank is identified, it will be saved in the MSSQL server for historical records.
Note: The records will be stored only if the Ranks are found.
The API is built using .Net 7.0, EF Core, LINQ operations, and Repositories for robust functionality.
- Fetch the User Agent and store it in the 'Agent' variable in the 'SearchRepoImplement.cs'file under Repositories.
- Set your local server name as the value for 'Server=' in the 'ConnectionStrings' section of the 'appsettings.json' file.
- Install the below:
- Microsoft.EntityFrameworkCore
- Microsoft.EntityFrameworkCore.SqlServer
- Microsoft.EntityFrameworkCore.Tools
- This utilizes Microsoft SQL Server. Run "update-database" to create the database, which also creates 2 items in the "SearchEngine" table.
- Run the application and test on Swagger.
The front end of the same is built using Angular, TypeScript, RxJS, and Bootstrap. Validations are not handled in the front-end as of now as it is handled in the API.
- Run 'npm install' to install the project dependencies.
- Run 'ng serve' to run the application.
- URLs:
- /search: To search for an item.
- /history: To view the search history of previous queries.
- Make sure the API is running at 'localhost:7056'. If not, update the URL in the 'rank.service.ts' file under the 'app' folder under the 'src' of the Angular application.
- If the Angular application is not running at 'localhost:4200', make the required changes in the 'Program.cs' file of the API.