Giter Club home page Giter Club logo

se-challenge-expenses's Introduction

Wave Software Development Challenge

Original Project Requirement

  1. Your app must accept (via a form) a comma separated file with the following columns: date, category, employee name, employee address, expense description, pre-tax amount, tax name, and tax amount.
  2. You can make the following assumptions:
  3. Columns will always be in that order.
  4. There will always be data in each column.
  5. There will always be a header line.

An example input file named data_example.csv is included in this repo.

  1. Your app must parse the given file, and store the information in a relational database.
  2. After upload, your application should display a table of the total expenses amount per-month represented by the uploaded file.

Apology in advance that I didn't use a relational DB as I have been doing more work in Node.js & Mongo in recent time. I have not done actual DB relationship designs since university.

Instructions on how to build/run application

  1. My application runs on Node.js (using Express) & MongoDB (using Mongoose). I didn't use Angular here as the setup is fairly straight forward (so didn't demonstrate a full 'MEAN stack' setup).
  2. To run, please have Node.js & MongoDB installed. You can download the latest version from https://nodejs.org/en/download/ & https://docs.mongodb.com/manual/installation/.
  3. Once you have both installed (you also need to specify a db folder for MongoDB), please run MongoDB on Port 27017 (can simply click on mongodb.exe, the default port should be using 27017). You can also exeucte it with a port number like this in cmd: mongod --port 27017
  4. Suggest to use a window app that provides a UI for MongoDB. I like using Robomongo (You can donwload for free here: https://robomongo.org/)
  5. Go to Robomongo or similar app, connect to your local connection at 27017.
  6. Please create a new DB called 'se-challenge-expenses'
  7. Clone this project, and cd to this folder. Please also create a blank folder name called 'uploads' in this folder
  8. Run "npm install" to include all modules required.
  9. Run "npm start" to start server.
  10. Open up any browser, and load url: http://localhost:3000/

What I like in my implementation, and why.

  1. I have been using Node.js and Express to setup small application and really liked it as I find it being quite easy and quick. In this case, I setup 1 model (which is called 'record') for the DB, and the rest of the setup is mainly done through 1 index.js (in route, with one GET and POST), 1 view using EJS and that's about it. A lot of the processing was done through using 3rd party node libraries that are available, such as parsing CSVs, so I don't have to parse the content on my own. (Note: I haven't done Python but I believe Python and Node have similar methodology so should be easy to learn.)
  2. I added some basic bootstrap styling to make the UI a little bit nicer.
  3. Allow uploading CSV in the UI so you can upload multi CSVs to combine the list and total. Delete button will remove all so you can start over again.

se-challenge-expenses's People

Contributors

michaeldibernardo avatar phoebs85 avatar rbarazi avatar

Watchers

James Cloos avatar  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.