This repository contains a simple UI and API for selling inventory in OOH (Out of Home) Advertising.
The candidate will complete a variety of tasks to improve the system and demonstrate their knowledge.
It's not expected that all tasks are completed. It's better to do a few tasks well than a lot of tasks rushed.
The tasks cover both UI and API.
Tasks related to Campaigns are generally more UI focused, and tasks related to Faces are generally more API focused.
You may choose to do whichever ones you think demonstrate your skillset the best.
It's recommended to create some Unit Tests in the relevant projects. There are existing examples for all Face classes.
- Add a new column that shows the Dates that each Campaign is active during.
- The existing
/campaigns
endpoint already returns this data.
- The existing
- Add a new column that shows the total number of Bookings for each Campaign.
- You can use the
/campaign/id/bookings
endpoint to get the bookings of a campaign. - Alternatively, you could add a new endpoint to retrieve all bookings.
- You can use the
- Add a new column that shows the Revenue per Day for each campaign.
- You can use the
/faces
endpoint to get face information that includes the RatePerDay. - You can calculate the total Revenue per Day of a campaign by summing the RatePerDay of each booking
- You can use the
- Add a new column that shows the Total Revenue for each campaign.
- You can use the
/faces
endpoint to get face information that includes the RatePerDay. - You can calculate the Total Revenue of a campaign by summing the total of each booking.
- The total of each booking is calculated by the number of days in the campaign multiplied by the RatePerDay.
- You can use the
- Add a way for the user to select a Campaign and view all of the related Bookings.
- You can use the
/campaign/id/bookings
endpoint to get the bookings of a campaign. - Optionally, show the RatePerDay of each booking.
- Optionally, show the Total Revenue of each booking.
- You can use the
- Add a Unit Testing framework
- Add an Integration Testing framework
- Refactor parts of the UI to improve maintainability
- Re-implement the UI in React or Angular.
- Add an endpoint to create a Face
- Add an endpoint to calculate the Availability of a Face
- A Face is Available if there are no Bookings during the provided date range.
- A Face is Not Available if any bookings overlap with the provided date range.
- There is an empty endpoint at
/avails
that can be used to guide the implementation
- Move the Dates of a Campaign onto the Booking
- This would allow the user to run a campaign for a year, and change which faces are booked during that time.
- Add an Address object that can be assigned to a Face.
- Add an endpoint for retrieving Addresses
- The endpoint should be
GET /face/id/address
- The endpoint should be
- Add an endpoint for creating Addresses
- The endpoint should be
POST /face/id/address
- The endpoint should be
- Add an endpoint for retrieving Addresses
- Add an endpoint to create a Booking
- Optionally, when creating a Booking, check that the Face is Available first.
- Add an endpoint to create a Campaign
The API is built using .NET Core. It has Unit and Integration Tests.
The UI is built using basic Html, Css and JavaScript. It has Unit Tests.
It is served as static files from the root URL of the server.
- Install the required dependencies.
- Use
dotnet run
on theOohInterview.Api
project, or run from your IDE.
- .NET Core 3.1
Name | Description | Notes |
---|---|---|
UI:ContentDirectory | The Directory of the UI files | These files are served statically |
The API documentation describes the API contract. The API implementation should match this contract.
It can be found at /docs/api/ooh-interview-api-swagger.yaml
All tests are located in the /Tests
folder.
Unit tests are located in the UnitTests
subfolder.
They are written in xUnit and use Moq.
Unit tests test only a single component at a time, with all dependencies mocked.
Integration tests are located in the IntegrationTests
subfolder.
They are written in xUnit and use the .NET Core integration testing framework.
Integration tests test the whole system at once via the API, with any external dependencies mocked.
All tests are located with their corresponding implementation file.