Giter Site home page Giter Site logo

report-dashboard's Introduction

Report dashboard

Demo react application using Netlify functions

Live demo deployed here: https://report-dashboard.netlify.app/

Libraries used

Frontend:

  • Project bootstrapped with Create React App
  • React version 17 with typescript
  • React google chart, for rendering a line chart
  • React Material UI + lab, for some basic UI component: Box, Typography, Button, Loader, Alert, and Datepicker
  • jest-fetch-mock for mocking the native javascript fetch api. Unit test are using jest.

Backend:

  • Netlify stateless functions with typescript.
    Currently there is 2 functions:

    • ./netlify/functions/dashboard-data-api/dashboard-data-api.ts is the simple GET API, called at every launch and when we click on "Filter"
    • ./netlify/functions/populate-data-api/populate-data-api.ts erasing and re-generating a new set of random datas, called once and can be called one again by clicking "Generate new datas" in the bottom right corner of the footer
  • MongoDB free tier cluster for storing the set of datas.

  • For playing with dates I used date-fns which is more lightweight and functionnal than momentjs (it returns a Date clone object everytime)

Running the project

This project have been created with node LTS v16.14.0 and npm 8.3.1

With these pre-requish, here are the steps:

  1. netlify cli need to be installed globally npm install netlify-cli -g
  2. Unzip or clone the project, and run into the project folder npm i
  3. A .env file need to be added manually at the root of the repository, with this content: MONGO_DB_PASSWORD=<your mongo db password>
  4. And now for running both client and server the command is: netlify dev

The server should now be available at http://localhost:8888

Running the tests

The units test can be run with

npm test

The tests are also running on every push with github action:
./.github/workflows/on-push-master.yml

report-dashboard's People

Contributors

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