Giter Club home page Giter Club logo

spending-exercise's Introduction

Polygence Coding Challenge

Welcome to the coding challenge portion of the Polygence Engineering interview! Thank you for taking the time to go through this exercise and show us what you can contribute to the team.

Project overview

We want you to create a simple application to track spendings.

A spending has the followings properties:

  • when it happened
  • how much did we spend
  • in what currency
  • for what/description

This simple web app allows the users to:

  • Create a new spending
  • List all the spendings
  • List all the spendings ordered by amount, date
  • List all the spendings filtered by currency

A spending JSON object looks something like this:

{
  "description": "Mango",
  "amount": 1200,
  "spent_at": "2022-02-23T14:47:20.381Z",
  "currency": "USD"
}

Technical requirements

  • Use Git and share the project on GitHub
  • The backend solution can be written in any programming language
    • We have created a scaffolded Python/Flask and a Node.js/Express version
    • But you can start from scratch in any language
  • No need for any SQL database to store data, you can store the data in memory

Acceptance criteria

Given there are no existing spendings
When I fill the description, currency and amount
And I click the "Save" button
Then I see my spending in the list
And the spending is persisted on the server
And the form is emptied

Given that I have not filled the description or the amount
When I click the "Save" button
Then I see an error indicating the missing field

Given there are existing spendings in the list
When I change the selected ordering
Then the list is reorder by the selection

Given there are existing spendings in the list
When I click on a currency filter button (HUF, USD, All)
Then the list is filtered by that selection
And shows only the matching spendings

What We Look For

This is an opportunity for you to show us what your best code looks like. While we expect the code to work, we are also looking for:

  • Clean, modular code
  • Clear naming and conventions
  • Unit tests
  • Error handling

If there are any pre-existing patterns in the code that you don't like, feel free to change them!

Not required, but nice to have

  • Use a web framework (eg. Django)
  • Persist data in an SQL based database

Getting Started

Option #1: Run the Python/Flask API

This project is best run using Python 3.7.9.

Install python dependencies:

cd python && pip install -r requirements.txt

Run the python tests:

cd python && pytest tests.py

Run the API (http://localhost:5000):

cd python && FLASK_APP=app python -m flask run

Option #2: Run the Node/Express API

This project is best run using Node 14.17.x.

cd node && npm i

Run the node tests:

cd node && npm test

Run the API (http://localhost:5000):

cd node && npm start

Both: Run the JS/React Web Client

This project is best run using Node 14.17.x.

Install client dependencies:

cd web && npm i

Run the client tests:

cd web && npm test

Run the client (http://localhost:3000):

cd web && npm start

spending-exercise's People

Contributors

szamoca avatar adamgyulavari avatar nemethricsi 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.