xtiancapil / synapse-health

Repository for Synapse Health test assessment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running the project

The project is on .NET 6 LTS release. Visual Studio 2022.

To mock the APIs, the project makes use of Fake JSON Server Data was generated using Mockaroo

# install as a global tool
$ dotnet tool install --global FakeServer

# Start the server in the same directory as 'data.json'
$ fake-server --file data.json --urls http://localhost:57602

Questions

  • What happens to the entire Order when the process fails to send an Alert for an item?
    • Even if there is an error, an Order update call is still made for alerts that were successful.
  • How do we keep track of the items we've processed?

Synapse Tech assessment

Thank you for taking the time to do the coding assessment here at Synapse Health. We look forward to your submission.

Scenario:

We have implemented a background process responsible for monitoring order status with the objective of identifying orders that have reached a 'delivered' state. Upon detection of such orders, a delivery notification is dispatched through a secondary API. After the notification is sent, we then update the order record via API. Regrettably, the developer responsible for delivering this essential functionality won the lottery and quit the next day. On their departure, they forwarded us a segment of code pertaining to this task. While we have reasonable confidence in its functionality, a preliminary review indicates deviations from established best practices. Adding to the complexity, the absence of the Product Owner (PO) due to vacation without access to cellular communication means that clarifications on the code or its requirements cannot be promptly obtained. This situation places us at a crossroads, as the business is eager to expedite the integration of this feature into the production environment. Thus, we're venturing forth to revisit and refine the provided code. Your job is to fix up the code, make sure it fits current coding best practices and make the code more supportable.

Deliverables:

  • Solution includes at least 1 Unit test.
  • Do not send back a single file answer.
    • At the very least 2 .net projects are expected (a unit test project plus whatever you need).
  • Make sure this is “Production ready” or as close as you can get.
    • Make notes via comments in places where this is not possible.
  • Please add logging where appropriate.
    • Console is not logging.
  • Make sure your solution is .Net 6+
  • Some way of mocking the API calls.
  • Please send the .net solution zipped up via email or send a link to your code.
    • If you send a link, please make sure your repo/dropbox/google drive/etc is public.

About

Repository for Synapse Health test assessment


Languages

Language:C# 100.0%