Weather App is a web application that allows users to track current weather conditions. This project is based on the technical specification provided in the Java Backend Roadmap by Sergey Zhukov (link here).
- Built with
- Functionality
- Description of the application pages
- How to run locally using IntelliJ IDEA
- Java
- Spring MVC
- Hibernate
- MySql database
- Flyway
- Apache Maven
- Apache Tomcat
- Lombok
- HTML/CSS
- Thymeleaf
The application enables users to:
- Sign up for an account
- Sign in using their credentials
- Search for locations by entering a query in the search bar
- Save locations to track weather conditions
- Remove locations from their saved list
- Log out of their account
The project includes 5 pages:
- Sign up page: user registration interface
- Sign in page: authentication page for existing users
- Home page: displays saved locations and weather data
- Search results page: shows locations found based on user queries
- Error page: displays error messages for invalid routes or API failures
To run the application, make sure that you have Java (JDK), GIT, Apache Maven, Apache Tomcat and MySql database installed on your computer.
- Download or clone the project
You can get the project by either downloading it as a ZIP archive or by cloning it using Git.
Option 1: Download as ZIP Archive
- Go to the project’s GitHub page
- Click the "Code" button
- Select "Download ZIP"
- Extract the ZIP file to a directory on your local machine.
Option 2: Clone the Repository using Git
Open your terminal or Git Bash and run the following command:
git clone https://github.com/anton-kulakov/TennisScoreboard.git
- In IntelliJ IDEA open the Database menu
- Click the plus button
- Choose MySql
- Enter the username and password for MySQL
-
Download missing driver files if needed
-
Click "Test Connection"
- A successful connection message should be displayed
Then click "Apply" and "OK".
- Then right click. Chose New - Schema
And create two schemas:
- Main schema with name "database"
- And schema for testing with name "test_database"
- Go to the configurations menu
- Select "Edit configurations"
- Click the plus sign
-
Select Tomcat Server -> Local
-
Select Tomcat as an Application server
- Then in VM options type required environment variables
Enter your values instead of [YOUR_API_KEY], [YOUR_DB_URL], [YOUR_DATABASE_USERNAME] and [YOUR_DATABASE_PASSWORD].
To make requests to the API, you need a key. To obtain it, you need to:
- Register at https://openweathermap.org/
- Create a free key with a limit of 60 requests per minute
- Wait for the key to be activated
- Click "Fix"
-
Select "WeatherApp:war exploded"
-
Remove "WeatherApp_war_exploded" from the "Application context" field
-
Then click "Apply" and "OK"
-
Click "Run"