Skip to content

christopher-dabrowski/incredevo-recruitment-weather-graphs

Repository files navigation

IncreDevo recruitment task - Weather Data Application

Deploy Azure infrastructure

Deploy ASP App

Deploy Funcion App

This is my attempt at solving the second recruitment task for the IncreDevo company

Table of Contents

Task description

Must use:

  • ASP.NET CORE MVC (6)
  • C#
  • JavaScript

Achieve:

Using any public weather API receive data (country, city, temperature, clouds, wind speed) from at least 10 cities in 5 countries
with periodical update 1/min, store this data in the database
and show the 2 graphs:

  • min temperature (Country\City\Temperature\Last update time)
  • highest wind speed (Country\City\Wind Speed\Last update time)
  • temperature & wind speed trend for last 2 hours on click for both previous graphs

Solution

Description of my solution to the presented problem.

Architecture

Architecture diagram

IoC

I've used Bicep to define IoC. The IoC approach allows me to have documented and consistent infrastructure. I've chosen Bicep technology as it's easy to run from any environment that has access to Azure.

The Bicep code can be found in the infrastructure directory.

The Bicep resource and module dependencies diagram looks as follows:

Bicep resources

Time tracking

For time tracking I'm using Clockify and I'm tracking time for each task using GitHub issues.

Total time spent on the project: 08:38:13

Time breakdown per task in completion order:
format: #{gh-issue} {name} - {time spent}

  • #1 Repo setup - 00:11:22
  • #2 Describe tasks - 00:06:13
  • #8 Explore API - 00:36:17
  • #4 IoC - 00:20:16
  • #5 CI/CD for IoC - 00:27:21
  • #6 Scaffold ASP project - 00:05:00
  • #13 CI/CD for Azure Function - 00:33:47
  • #10 Setup data fetching - 02:21:32
  • #12 Display weather trends graphs - 03:15:30
  • #15 Describe the solution - 00:40:55

CI/CD

To implement an automated deployment process I've used GitHub Actions.
Specific actions are triggered when changes are pushed to a specific repository path or can be triggered manually.
Actions definitions can be found in the .github/workflows directory.

Solution showcase

The app can be viewed on Azure https://kd-dev-incre-weather-app.azurewebsites.net/.

Application in action

Application demo

Current wind and temperature graphs

Current wind and temperature graphs

Temperature in the last hour diagram

A temperature in the last hour diagram

Wind in the last hour diagram

Wind in the last hour diagram

Azure resources

Resource Group

Storage account content

Storage account content

GitHub Action runs

The runs can be viewed in the Actions repo tab

deploy infrastructure action runs

deploy Azure Function runs

deploy App Service runs

Notes

Noteworthy decisions and aspects of the implementation and project configuration or work methodology.

  • I've decided to use Azure Table Storage for the database, as I don't need to model relations between entities and Table Storage is significantly cheaper than a SQL database