Skip to content

Instantly share code, notes, and snippets.

@wnz99
Last active May 31, 2024 10:43
Show Gist options
  • Save wnz99/9a534c65871d5a2d389a264651cc1bd9 to your computer and use it in GitHub Desktop.
Save wnz99/9a534c65871d5a2d389a264651cc1bd9 to your computer and use it in GitHub Desktop.

Take home test (CRUD)

Thanks for taking the time to do our full-stack coding test. The challenge has two parts:

  • A task to create a basic service and ui to allow users to track their spending.
  • Some follow-up questions

Task

We needs to create a service that allows users to create an 'Account' in GBP and keep track of balance in that account. The service allows for transfers to be made against an account. Those transfers can be credit, which increase available balance and debit, which decrease available balance. If at any point the available funds reach 0 or bellow the API should return an error and stop accepting debits, but keep accepting credits. The user should be able to see all their transfers sorted by date.

Service Details

Use Node.js for the backend with whatever libraries you feel comfortable with. Data should be persisted in some sort of data store (of your choice). The service should have endpoints to support the following:

  • Create an account
  • Get account
  • Create a transfer (debit and credit)
  • Stop Debits if balance is <=0 List transfers Any other endpoints or functionality you see fit.

Client Details

We'd like you to use React. On top of that, use whatever front-end libraries you feel comfortable with. Design the UI anyway you see fit. The UI should have and allow

  • the user to create an account.
  • the user to create transfers (with any value) against an account.
  • show a warning when balance reached 0
  • show up to date balance information. Any other endpoints or functionality you see fit.

Running the project

To startup the frontend client run the following command.

npm start - This will start the application for development
npm run build - Will create a production optimised build
npm test - Will run the front end tests

Task requirements

  • Spend as much or as little time as you like on the exercise.
  • Ensure the following requirements are met:
    • Complete the user story provided below.
    • Your code should compile and run in one step.
    • Use any frameworks, libraries, or packages you prefer.
    • Include tests in your submission.
    • The project must have a Dockerfile for the API. Bonus points for including a docker-compose file that integrates the API, UI, and all dependencies.

Technical Questions

  1. Did you have time to complete the coding test?
  2. What would you add to your solution if you had more time?
  3. How would you optimise your solution?
  4. What are the security issues you can see in your solution?
  5. How does your solution handle concurrency in order to maintain correct ordering of transfers?
  6. List a few of your preferred JavaScript frameworks and specify in which situations you would choose to use or not use them.

Submission

Please create a repo and share with us.

A single markdown file with the answers to the technical questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment