This is a weather application built using MySQL, Spring Boot, Maven and Vaadin. The application allows users to register, login, and view weather details.
- User Registration: New users can register to the application by providing a username and password.
- User Login: Registered users can login to the application using their username and password.
- Weather Details: The application provides detailed weather information including latitude, longitude, time, weather code, maximum wind speed at 10m, maximum temperature at 2m, and rain sum.
The project is structured into several packages:
com.weatherapp.services
: Contains theUserService
interface and its implementation. TheUserService
interface defines methods for user registration and fetching user details.com.weatherapp.views
: Contains theRegisterView
class which handles user registration.com.weatherapp.detail
: Contains theDailyUnitsDetail
class which represents the detailed weather information.
To set up the project on your local machine, follow these steps:
- Clone the repository to your local machine.
- Navigate to the project directory.
- Run
mvn clean install
to build the project and install the dependencies. - Start the application by running
mvn spring-boot:run
. - For DataBase setup, create a database named
weather
in MySQL. - Update the
application.properties
file with your MySQL username and password. - Use WeatherDB.sql file to create the required tables in the database.
To use the application:
- Open your web browser and navigate to
http://localhost:8080/register
. - Register a new user by providing a username and password.
- Login to the application using the registered username and password.
- Landing page will be displayed after successful login.
- Enter the city name to view the city list.
- View the weather details.
Contributions are welcome. Please make sure to update tests as appropriate.