This repository contains a solution for the coding excercise from https://github.com/WatchGuard/coding-exercises, below is quick summary of the solution included in this repo.
The solution for this coding exercise is implemented as asp.net web application. The ability to download photos from mars rover is exposed on a simple web interface. And the download images are also displayed on this web application. This is a multi tier/layer application conceptually but all the layers are housed in the same project for simplicity purposes. Below are the layers used to orchestirate the application processing from the UI to the back end API supporting it.
This space primary contains code related to rendering HTML web pages using rasor and http endpoints to support AJAX calls to the server for hydrating the UI or performing long running tasks.
This layer is the primary component that will be used to bridge the UI needs to what is available in the backend. This is where all the business logic/validations and such go.
This layer contains the contract and implementation to the source of the data and low level data processing needed by this application. for this coding excercise, it contains implementations that interact directly with Nasa Api endpoints, and the implementation that accesses the file system.
This space contain general infrastructure code, like typed appsetting config. And it also contains a utility that reports logs to the client browser using SignarlR.
This is a rough implemenation of the UI for a browser. This side of the application is light and contains minimal script and markup to enable client side rendering of data using databinding.
In order to run the application,
- you can do that via visual studio (it is built using visual studio 2019).
- Command line
dotnet run
- In docker container - use
docker-compose.yml
to build and run.
The local directories for both the list of dates as well as, where the downloaded images are stored is configured via an appsetting entry. To change the location anywhere other than the default value open the appsetting.json file and update these two keys
- DownloadDestinationDirectory
- DatesFilesDirectory
- Visual Studio 2019 IDE
- .Net 5
- Angularjs
- SignalR
- Refit
- xUnit
- Serilog
Unit test coverage for happy path is also include and uses xUnit
This project is build to fulfill the acceptance criteria and show case some level of application architecture as well as ability to put together a functioning application. Some area of extending this project include:
- Additional unit test coverage
- Directly upload list of dates
- Ability to partially display photos as they are getting downloaded
- Better Ability to view individual photos Enlarged
- client side unit test coverage
This list can keep on going :)