Code Monkey home page Code Monkey logo

aqi-app's Introduction

aqi-app

For Assignment reviewers

Have built this SPA using Vue3 and Vue-Cli. The demo project has been hosted on Github Pages https://shauryadhadwal.github.io/aqi-app/

Features

  • Home Page with updates of most recent AQI levels per city.
  • Live Chart Page with history of up to 20 records per city (configurable); Max, Min AQI levels since the time Live Chart Page was opened; Pause/Resume functionality to analyse chart.
  • Comparison Page with feature to compare date of up to 5(configurable) cities simultaneously.
  • Animations on route transitions and value updates.

Since Github Pages doesn't support SPA, refreshing the browser on any other path than the one mentioned above will result in a 404 error.

All decisions have been made considering that data of no more than 12 Cities' can be received, and no more than 1 websocket event per second. To enhance the application for high load, other decisions would have to me made.

Application is responsive but designed using Desktop-First approach. Would recommend to use latest version of Chrome Browser for best experience.

Breakup of total time spent

Area Effort in man hours
project setup 15min
deployment config 15min
websockets setup 1 hour
live graph 4 hours
dashboard 2 hours
comparison view 3 hours
animations 2 hours
Total 12.5 hours

Wasted time on websockets and graphing library.

Project setup

Clone the repo and run the following command:

npm install

Check the .env_example file and set up the websocket connection

Websocket messages are expected to be of the following form for the application to work correctly:

[{city: "Mumbai", aqi: "150.23145"}, {city: "Delhi", aqi: "308.67312"}]

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Deploy to github pages

Add your username to command in deploy.sh

git push -f [email protected]:<git-hub-username>/aqi-app.git

Make sure to add your ssh key in github's ssh settings page

npm run deploy

aqi-app's People

Contributors

shauryadhadwal avatar

Watchers

 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.