Skip to content

damogallagher/backend-coding-challenge

 
 

Repository files navigation

Goal

Produce a simple web-app backend to complement the supplied front-end code.

The task

Imagine that you come back from 2 weeks of holidays on a Monday. On the team Kanban board, assigned to you, two tasks await :

User story 1:

As a user, I want to be able to enter my expenses and have them saved for later.

As a user, in the application UI, I can navigate to an expenses page. On this page, I can add an expense, setting:

  1. The date of the expense
  2. The value of the expense
  3. The reason of the expense

When I click "Save Expense", the expense is then saved in the database. The new expense can then be seen in the list of submitted expenses.

User story 2:

As a user, I want to be able to see a list of my submitted expenses.

As a user, in the application UI, I can navigate to an expenses page. On this page, I can see all the expenses I have already submitted in a tabulated list. On this list, I can see:

  1. The date of the expense
  2. The VAT (Value added tax) associated to this expense. VAT is the UK’s sales tax. It is 20% of the value of the expense, and is included in the amount entered by the user.
  3. The reason for the expense

By email, the front end developer of the team let you know that she already worked on the stories, built a UI and also went on holidays to France!

"Hi backEndDeveloper,

Hope you had a nice holiday. I created a UI and prepared resource calls for those 2 user stories. You should only have to create the right endpoints in your service for the frontend application to call them, and everything should then work fine!... Unless I forgot something of course, in which case you may be able to reach me on the beach

P.S. You can start the frontend by running gulp this will compile the code and launch a webserver on localhost:8080. You are free to host the files in your backend of course, then you will only need to build the source by running gulp dev. If you want to have a look at the code that is calling the endpoints then you can find this in src/js/apps/codingtest/expenses/expenses-controller.js

P.P.S. In case you are stuck, you need to prep the project with npm install -g gulp && npm install. I'll leave it to you how to get Node on your system ;-)

A bientôt !

Your Favourite FE Dev "

Mandatory Work

Fork this repository. Starting with the provided HTML, CSS, and JS, create a Java-based REST API that:

  1. Provides your solution to user story 1 and user story 2
  2. Create a README containing instructions on how to build and run your app.
  3. Place your solution in the subdirectory provided

Give our account engagetech access to your fork, and send us an email when you’re done. Feel free to ask questions if anything is unclear, confusing, or just plain missing.

Extra Credit

All the following work is optional. The described tasks do not need to be fully completed, nor do they need to be done in order. You could chose to do the front-end part of a story, or the backend one, or only an endpoint of the backend one, as an example. You could pick one to do completely or bits and pieces of all three, it is up to you, as long as you explain to us what you did (or didn't) choose to do.

You finished way in advance and can't wait to show your work at Wednesday's demo session. But you decide to impress the sales team a bit more and go back to the team Kanban board. There you find some extra unassigned user stories:

User story 3:

As a user, I want to be able to save expenses in euros

As a user, in the UI, when I write an expense, I can add the chars EUR after it (example : 12,00 EUR). When this happens, the application automatically converts the entered value into pounds and saves this new value in the database. The conversion needs to be accurate. It was decided that our application would call a public API to either realise the conversion or determine the right conversion rate, and then use it.

User story 4:

As a user, I want to see the VAT calculation update in real time as I enter my expenses

After conversation with the dev team, we decided that the VAT should be calculated client-side as the user enters a new expense, before they save the expense to the database. Robee being on holidays, Can I assign that to you backEndDeveloper?

Questions

What frameworks can I use?

That’s entirely up to you, as long as they’re Open Source Software (OSS). We’ll ask you to explain the choices you’ve made. Please pick something you're familiar with, as you'll need to be able to discuss it.

What application servers can I use?

Anyone you like, as long as it’s available OSS. You’ll have to justify your decision. We use dropwizard and Tomcat internally. Please pick something you're familiar with, as you'll need to be able to discuss it.

What database should I use?

MySQL or PostgreSQL. We use MySQL in-house.

What will you be grading me on?

Elegance, robustness, understanding of the technologies you use, tests, security.

Will I have a chance to explain my choices?

Feel free to comment your code, or put explanations in a pull request within the repo. If we proceed to a phone interview, we’ll be asking questions about why you made the choices you made.

Why doesn’t the test include X?

Good question. Feel free to tell us how to make the test better. Or, you know, fork it and improve it!

About

A fairly simple coding challenge, aimed at backend-focused engineers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.3%
  • CSS 13.4%
  • Java 9.5%
  • Other 0.8%