Git Product home page Git Product logo

backend-interview-task's Introduction

Moneyhub Tech Test - Investments and Holdings

At Moneyhub we use microservices to partition and separate the concerns of the codebase. In this exercise we have given you an example admin service and some accompanying services to work with. In this case the admin service backs a front end admin tool allowing non-technical staff to interact with data.

A request for a new admin feature has been received

Requirements

  • An admin is able to generate a csv formatted report showing the values of all user holdings
    • The report should be sent to the /export route of the investments service
    • The investments service expects the report to be sent as csv text
    • The csv should contain a row for each holding matching the following headers |User|First Name|Last Name|Date|Holding|Value|
    • The holding should be the name of the holding account given by the financial-companies service
    • The holding value can be calculated by investmentTotal * investmentPercentage
  • Ensure use of up to date packages and libraries (the service is known to use deprecated packages)
  • Make effective use of git

We prefer:

  • Functional code
  • Ramda.js (this is not a requirement but feel free to investigate)
  • Unit testing

Notes

All of you work should take place inside the admin microservice

For the purposes of this task we would assume there are sufficient security middleware, permissions access and PII safe protocols, you do not need to add additional security measures as part of this exercise.

You are free to use any packages that would help with this task

We're interested in how you break down the work and build your solution in a clean, reusable and testable manner rather than seeing a perfect example, try to only spend around 1-2 hours working on it

Relating to the task we'd also like you to write some answers to the following questions;

  1. How might you make this service more secure?
  2. How would you make this solution scale to millions of records?
  3. What else would you have liked to improve given more time?

Getting Started

Please clone this service and push it to your own github (or other) public repository

On completion email a link to your repository to your contact at Moneyhub and ensure it is publicly accessible.

To develop against all the services each one will need to be started in each service run

npm start
or
npm run develop

The develop command will run nodemon allowing you to make changes without restarting

The services will try to use ports 8081, 8082 and 8083

Use Postman or any API tool of you choice to trigger your endpoints (this is how we will test your new route). Please add your new routes to the readme

Existing routes

We have provided a series of routes

Investments - localhost:8081

  • /investments get all investments
  • /investments/:id get an investment record by id
  • /investments/export expects a csv formatted text input as the body

Financial Companies - localhost:8082

  • /companies get all companies details
  • /companies/:id get company by id

Admin - localhost:8083

  • /investments/:id get an investment record by id

backend-interview-task's People

Contributors

stefanspita avatar jdlennoxs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.