Skip to content

Instantly share code, notes, and snippets.

@wnz99
Created January 13, 2023 14:40
Show Gist options
  • Save wnz99/d5ffa00d8f0e0d50c93df78f5de52185 to your computer and use it in GitHub Desktop.
Save wnz99/d5ffa00d8f0e0d50c93df78f5de52185 to your computer and use it in GitHub Desktop.
Mode coding test

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 need 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 and Typescript 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
  • dot not focus of error handling, validation, etc. Unless you want to.

Any other endpoints or functionality you see fit.

Client Details

We'd like you to use React and Typescript. On top of that, use whatever front-end libraries you feel comfortable with.

Design the UI anyway you see fit. Please do not spent too much time on the design. Focus on functionality.

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 a list of all transfers for an account. It can be the most simple list possible.
  • do not focus of error handling, validation, retry, etc. Unless you want to.
  • do not worry about responsiveness, it can be a desktop only app.

Any other endpoints or functionality you see fit.

Running the project

Please add instructions on how to run the project in the README.md file.

Task requirements

Feel free to spend as much or as little time on the exercise as you like. We don't want to waste your time, but we also want to be able to see how you code. We recommend spending around 3-4 hours on it. If you do not complete the entire exercise, please send us what you have done with a short note on what you would have done with more time.

Feel free to use whatever frameworks / libraries / packages you like.

Do not include tests in your submission. We assume you will write tests as part of your normal development process.

Please avoid including artefacts from your local build (line node dependencies) in your final ZIP file.

The project should have a Dockerfile for the API at least, bonus points if it has a docker-compose with the API/UI and all dependencies.

Technical Questions

Did you have time to complete the coding test? What did you prioritise? If you didn't spend much time on the coding test then use this as an opportunity to explain what you would add.

What would you add to your solution if you had more time?

How would you optimise your solution solution?

What are the security issues you can see in your solution?

How does your solution handle concurrency in order to maintain correct ordering or transfers.

List a few of your preferred JavaScript frameworks (also let us know in which situations you would choose to use/not use them).

Submission

Please make this a single zip file named {yourname}.zip containing:

  • A single markdown file with the answers to the technical questions
  • One folder containing the technical test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment