/mwl-dark-sky

Wether Weather is an application that allows the user to view the observed (in the past 30 days) or forecasted (in the future) daily weather conditions for a given location using the Dark Sky API.

Primary LanguagePHP

Wether Weather

Wether Weather is an application that allows the user to view the observed (in the past 30 days) or forecasted (in the future) daily weather conditions for a given location using the Dark Sky API.

Demo

Check the demo here madewithlove-exam.devcaffeinated.com

Views

  • home page: This is where to input the location
  • forecast page: This is where the current week forecast is displayed in °F
  • historical forecast page: This is where you can see the past 30 days forecast for that location in a line chart graph.

Frameworks used

  • Laravel Lumen 5.8 (Backend)
  • Vuejs (Frontend)

Plugins installed

APIs used

Architecture

  • Backend Backend is running on a serverless application using the bref library that runs on top of the nodejs serverless library. I opted on choosing this because I am using RESTful api's for my frontend to consume. Thus a need for CORS handling to reject any requests not whitelisted on the allowed origins this allows us to use Web applications within browsers when domains aren't the same. I used the Dark sky Laravel wrapper to use its API and the Guzzle library to send concurrenct requests to time machine endpoint of the Dark sky api.

  • Frontend It is built with Vuejs with a css template I got from w3schools. This end is consuming these endpoints. Postman Collection link to be imported is here.

Method Endpoint Description
GET /forecasts Show weather forecasts for the week
GET /time-machine/forecasts Show 30 Day weather forecast back track

Environment configurations

  • gogleMapsApiKey, on main.js of UI Vuejs
  • DARKSKY_API_KEY, on .env of Lumen