Skip to content

Files for workshop at WSB university, after presentation

Notifications You must be signed in to change notification settings

AugustasV/weatherapp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WeatherApp

There was a beautiful idea of building an app that would show the upcoming weather. Let's call it WeatherAPP The developers wrote a nice backend and a frontend following the latest principles and - to be honest - bells and whistles. However, the developers did not remember to add any information about the infrastructure or even setup instructions in the source code.

Luckily we now have docker compose saving us from installing the tools on our computer, and making sure the app looks (and is) the same in development and in production. All we need is someone to add the few missing files!

Prerequisites

Exercises

Here are some things in different categories that you can do to make the app better. Before starting you need to get yourself an API key to make queries in the openweathermap. You can run the app locally using npm i && npm start.

Docker

Docker containers are central to any modern development initiative. By knowing how to set up your application into containers and make them interact with each other, you have learned a highly useful skill.

  • Add Dockerfile's in the frontend and the backend directories to run them virtually on any environment having docker installed. It should work by saying e.g. docker build -t weatherapp_backend . && docker run --rm -i -p 9000:9000 --name weatherapp_backend -t weatherapp_backend. If it doesn't, remember to check your api key first.

  • Add a docker-compose.yml -file connecting the frontend and the backend, enabling running the app in a connected set of containers.

  • The developers are still keen to run the app and its pipeline on their own computers. Share the development files for the container by using volumes, and make sure the containers are started with a command enabling hot reload.

Pipeline

Create Github Actions pipeline which would run the app and print output of application. Build and send images to Github Packages.

Testing

Test automation is key in developing good quality applications. Finding bugs in early stages of development is valuable in any software development project.

  • Generate tests, generate coverage report

  • Run tests through Github Action pipeline.

  • Generate tests coverage report

Cloud

The biggest trend of recent times is developing, deploying and hosting your applications in cloud. Knowing cloud-related technologies is essential for modern IT specialists.

  • Set up the weather service in a free cloud hosting service, e.g. AWS or Google Cloud.

Ansible

Automating deployment processes saves a lot of valuable time and reduces chances of costly errors. Infrastructure as Code removes manual steps and allows people to concentrate on core activities.

  • Write ansible playbooks for installing docker and the app itself.

Security

Security matters, so your app will be resilient from malicious actions. Integrate Snyk into the pipeline to scan docker images.

You will need An snyk token.

Documentation

Good documentation benefits everyone.

  • Remember to update the README

  • Use descriptive names and add comments in the code when necessary

  • Add CI/CD, coverage badges.

ProTips

  • When you are coding the application imagine that you are a freelancer developer developing an application for an important customer.
  • While working on it, make notes what are you learning, especially chalanges.
  • The app must be ready to deploy and work flawlessly.
  • Try to avoid any bugs or weirdness in the operating logic.

About

Files for workshop at WSB university, after presentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published