Skip to content

ssss1131/weather_tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weather tracker

Overview

Overview

Web application for viewing the current weather. The user can register and add one or more locations (cities, villages, other points) to the collection, after which the main page of the application starts displaying the list of locations with their current weather.. The idea is taken from here

Technologies / tools used:

Backend

java-logo Spring MVC hibernate-logo postgresql maven-logo liquibase-logo opeanweatherapi

Testing

junit-logo mockito docker-testcontainers-logo

Frontend

thymeleaf html-logo css-logo Bootstrap

Deploy

dockerfile docker-compose

Application interface

Home page

Home-page

Url -'/home'

  • Links to the main page where you can see all liked locations and delete them.Delete mapping to "locations/delete/{id}" where id is your location id.
  • Navbar:
  • Sign Out: Sends a POST request to /logout to sign out the user.Delete cookie and invalidate your session
  • Search: Sends a GET request to /search?query=query, where query is the user-provided search term.

Search page

Search-page

  • result of your search term. Geocoding API call for finding longitude and latitude and then by coordinates get temperature from openweather.
  • if you press "heart" than it will save it like your liked location with post mapping to "locations/add".

Login page

Login page

  • login page. Post mapping to "/login" when you press login. Creates cookie and send to your browser, update your session.

Register page

Register page

-register page. Post mapping to "/register". Creates session and cookie for you and save your login and encrypted password.

Error pages

404-500

  • occur when something went wrong in back or get mapper doesnt exists to your url

Database diagram

diagram

Requirements

  • Java 11+
  • Apache Maven
  • Tomcat 10
  • Intellij IDEA
  • Docker
  • OpenWeather Api Key

Project launch

  • Clone the repository:

    git clone https://github.com/ssss1131/weather_tracker.git
    
  • Open your cloned repository folder in Intellij IDEA

  • Open the console(Alt + F12) and type docker-compose -f docker-compose-dev.yaml up -d

    Screen-cmd

  • Open the application.properties file and insert your OpenWeatherAPI key there to weather.api.key

    image

  • In Intellij IDEA, select Run -> Edit Configuration. In the pop-up window, click "+" and add Tomcat :

    Add tomcat

  • Then click "Fix" :

    Fix

  • In the window that pops up, select :

    War

  • In the Application context leave the following :

    Application context

  • Click Apply and start Tomcat

About

Web application for viewing the current weather.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published