GithubHelp home page GithubHelp logo

riccardogiorato / ecologi-trees Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 58 KB

Home Page: https://ecologi-trees.vercel.app/

License: MIT License

JavaScript 3.09% TypeScript 96.91%
ecologi hiring interview-project interview-test ecologi-challenge

ecologi-trees's Introduction

Ecologi Trees

Local Setup

To run the project locally make sure to have installed Node.js and Yarn then launch in the terminal:

yarn install && yarn dev

This will open up the local development of Next.js on localhost:3000

Live Online Demo

You can find an online version of this project here: https://ecologi-trees.vercel.app

My Approach to the Solution

  1. First I cleaned up the API response on the server side, optimizing it once for all users. I grouped the items by day and ordered all the dates in chronological order;
  2. Then I switch to the Frontend, looking for the right library to showcase the Graph quickly, I choose "recharts" being one of the most used with React and also being currently supported;
  3. Finally I decided to revalidate the data from the API every 10 seconds with Next.js revalidate option.

Libraries used

  1. "next", "react", "react-dom" to use React with Next.js;
  2. "recharts" used as the library to display the number of trees daily;
  3. "styled-components" used to style the UI elements like on ecologi main site.

Optimizations to the API?

In a production version of the API I would:

  1. Group by Days the items;
  2. Order results from API by dates to make it chronological;
  3. Add filters to make it possible to query specific timeframes.

ecologi-trees's People

Contributors

riccardogiorato avatar

Watchers

 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.