Giter Site home page Giter Site logo

overlap-challenge's Introduction

Solution for Ankh-Morpork Unified User Systeme Challenge

General

My primary focus was to structure project appropriately - to have clean, modular, documented code with at least few tests, dockerfile and to implement most of features in the given timeframe.

Technology stack:

Considering all the requirements, I decided to use Node.js server with one endpoint ("/report") just to get the needed HTML report with the overlapping analytics. This choice is made because Node.js is light, fast, has a big ecosystem of packages that are well documented.

  • Reading files It's done dinamically by reading all files in the provided folder path, and to speed things up, it's done in parallel. I also considered a case if these files were big, that would require some different approach by running some background job that would generate this report and store it somewhere.

  • Overlapping Criteria for overlapping between networks is that users have the same email. I found lodash function "intersectionBy" to be very useful for this purpose.

  • View template I decided to use handlebars package because it's convenient for quickly and easy templating view that needs to be rendered.

  • Charts Chart.js script and css are used on client side for displaying pie charts.

  • Tests Only several tests have been written to demonstrate how this should be applied for all functionalities. "Jest" package seemed adequate because of lots of options for testing that are offered.

Usage

  • Run project with command: npm run start
  • Run tests with command: npm run test
  • Build docker image docker build -t <your username>/node-web-app .
  • Run Docker conainer docker run -p 3040:3000 -d <your username>/node-web-app

What's left

  • displaying of top 10 most frequent zip codes in the HTML report (Processing of that top10 list is done, but it's not included in the HTML report.)
  • more tests to cover all

Room for improvement

  • adding a support for more charts types
  • adding a support for getting analytics for more than 2 networks
  • adding a support for different user formats
  • polish report to look better and have more functionalities
  • configure environment variables (like server port)
  • adding a linter

overlap-challenge's People

Contributors

milicadjordjevic 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.