Code Monkey home page Code Monkey logo

office-picker's Introduction

Office location finder

The user is presented with cards representing suggested office locations. When a card is clicked, a modal opens revealing more data about the location.

About the app

Screenshot

  • Simple React App using TypeScript, scss, react-spring, and axios.
  • Google Lighthouse score of 82/100/100/100.
  • Uses modern functional React with component logic extracted into custom hooks.
  • Network layer is handled with useAxios hooks.
  • Secure: the app is deployed using now.sh and the API key for OpenWeatherMap is stored in an encrypted remote store using environment variables
  • Idiomatic and responsive styles using BEM, scss variables and mixins for media queries.
  • Automatic code formatting using prettier and a pre-commit git hook.
  • Automatic deployments via GitHub integration with Vercel.

There are two main sources of information:

  1. Travel cost (Using the skypicker API):
  • The flight cost from Amsterdam/Madrid/Budapest to 3 destinations: London, Paris & New York.
  • For simplicity, the app fetches the next 10 upcoming flights, and picks the most affordable one out of these.
  • When clicking the price, the user is redirected to the flight page.
  1. Weather
  • Static climate data
  • Current weather (using the OpenWeatherMap API)

animated gif

Running the app

  1. Add the OpenWeatherMap API key in the .env.local file.
  2. yarn install
  3. yarn start

THINGS TO IMPROVE (if I had more time ;) )

  • Type definitions for some external dependencies (rodal, useAnimation) should be improved.
  • Caching can be enabled without extra effort by enabling the service worker. I decided not to do this for this assignment.
  • More data could be added to help Jamie make his decision.
  • If the app was to grow and become more complex, a state management library like Redux or Recoil.js could be used.
  • Unit tests can be added.

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.