This repo is intended to be forked and uploaded to your own Github account in order to form the submission for the challenge. Once cloned, it will give you a basic server with a React app, so you don't have to spend time writing boilerplate code. Feel free to make any changes you wish - the existing code is purely intended to get you going faster.
- Install
python3
via brew - Clone the repo
- cd into repo
- Install
virtualenv
usingpip3
(think yarn)
sudo pip3 install virtualenv
- Create a virtualenv for the project
virtualenv -p python3 venv
If you're having trouble completing this step, try upgrading virtualenv first pip3 install --upgrade virtualenv
- Activate the virtualenv
source venv/bin/activate
- Install dependencies in the new virtualenv
pip3 install -r requirements.txt
python3 manage.py runserver
- Server should be running at http://localhost:8000
-
cd into
client
and runyarn install
-
Run
yarn start
.
The webapp should now be running at http://localhost:5173 🚀
Create a web-app that shows how much you can expect to make from your savings over time.
The app must satisfy the following Acceptance Criteria (ACs):
- It should allow the user to vary the initial savings amount, monthly deposit and interest rate through the UI
- It should display how much the user's initial savings amount will be worth over the next 50 years. This should assume that the monthly amount is paid in each month, and the value rises with the interest rate supplied. There are resources online about calculating compound interest totals - e.g. Wikipedia
- All calculations must take place server-side, and all monthly projection data should be returned via an endpoint
- The calculations must be triggered onChange of any input, to give live feedback on the input data. The performance (try the slider) should be reasonable.
The challenge should not take any more than 2-3 hours. You do not need to complete the challenge in one go.
These are some qualities we value:
- Well-modularised, robust and clearly-written code
- Maintainability. Another team member should be able to easily work with your code after you've finished.
- Single Responsibility Principle
- A well-organised codebase
- Simple, elegant but fun UX
An outline UI has been provided, as well as some simple setup logic on the server. How you connect these and structure logic is up to you! Feel free to make changes to any of the code provided (including the UI) if you wish.
We have chosen to include a basic design system on the client, to give you an idea of how we like to build UIs. For this challenge we have used Chakra JS. If you're not familiar with such systems, hopefully this won't be too steep a learning curve. The docs will give you details of all the components/props you can use, but as a head-start, you can pass in styling props to the components including margins/padding etc like this:
// This produces a Box (styled div) with a top margin of 2, padding of 3 and a black background colour.
// Colours and spacing properties are defined in `themes/index.tsx`
<Box mt={2} p={3} bg='black'>
Although the API might be relatively straightforward, please try and write the API code as if you were building something more complex. We would like to gain an idea of how you would go about structuring API code.
Once complete, drop us a brief note (either an email, or in the readme somewhere) explaining:
- How you approached the challenge
- What bits of your solution you like
- What bits of your solution you’d like to improve upon or would develop next
Please also attach an image/gif of the finished product.
We believe a modern developer workflow should make use of the best tools available, so we would encourage you to use AI tools for this challenge - hopefully it saves you some time!
At the time of writing we are using CursorAI. It has a free trial so you're welcome to give it a go if you haven't already tried it.
Bear in mind that when using AI, you are still responsibility for the quality of the output. The same principles mentioned above still apply. And we will still expect to be able to discuss the end solution, so please ensure you're familiar with what's been committed.
The frontend contains some tooling you might be familiar with
If you like to use Typescript in your workflow, you should get any warnings/errors appear in your terminal after running yarn start
.
We believe strong TS typing will make your code much more robust.
We believe Prettier makes your life easier! There is an example .prettierrc included in the frontend
directory - feel free to tweak the settings if you'd prefer.
You might need to give your IDE a nudge to pick the settings up - here's an example of how to do that with VS Code