Skip to content

This is a well-structured JavaFX weather application with good architecture and user experience. The main concerns are security (hardcoded API keys) and incomplete features (caching). With the recommended improvements, this could be a production-ready application. The project demonstrates good Java programming practices and modern UI design. The co

License

Notifications You must be signed in to change notification settings

ozgucdlg/WeatherWiseApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WeatherWise Application

A modern and user-friendly weather application built with JavaFX that provides real-time weather information for cities worldwide. Now with secure user authentication system!

πŸ” NEW: Authentication System

WeatherWiseApp now features a complete authentication system that allows users to create accounts, sign in securely, and manage their sessions. This transforms the app from a simple weather tool into a personalized weather experience.

Authentication Features:

  • βœ… User Registration: Create new accounts with username, email, and secure password
  • βœ… Secure Login: Sign in with username/email and password
  • βœ… Session Management: Automatic timeout after 30 minutes of inactivity
  • βœ… Secure Logout: Properly end sessions and clear user data
  • βœ… Password Security: BCrypt hashing for secure password storage
  • βœ… Input Validation: Comprehensive validation for all user inputs
  • βœ… PostgreSQL Database: Robust database for user data persistence with connection pooling

Features

  • πŸ” User Authentication: Secure login and signup system with session management
  • πŸ‘€ User Accounts: Create and manage personal accounts with secure password storage
  • πŸ” City Search: Easily search for any city worldwide
  • 🌑️ Temperature Data: View current temperature and "feels like" temperature in Celsius
  • πŸ’§ Humidity Information: Check current humidity levels
  • πŸŒͺ️ Wind Speed: Monitor wind conditions in meters per second
  • ⏲️ Atmospheric Pressure: View pressure in hectopascals (hPa)
  • πŸ‘οΈ Visibility: Check visibility conditions in kilometers
  • β˜€οΈ Sun Timings: Track sunrise and sunset times
  • πŸ“± Modern UI: Clean and intuitive user interface with emoji indicators
  • ⚑ Fast Response: Quick weather data retrieval with caching system
  • πŸ”„ Auto-Refresh: Weather data is cached for 5 minutes for optimal performance
  • πŸ”’ Session Management: Automatic session timeout and secure logout functionality

Installation

Prerequisites

  1. Java 11 or later installed
  2. PostgreSQL database server installed and running
  3. Maven for building the project

Setup Steps

  1. Install PostgreSQL (if not already installed):

  2. Set up the database:

    # Run the PostgreSQL setup script
    psql -U postgres -f postgresql_setup.sql

    For detailed setup instructions, see POSTGRESQL_SETUP.md

  3. Clone the repository:

    git clone https://github.com/ozgucdlg/WeatherWiseApp.git
  4. Navigate to the project directory:

    cd WeatherWiseApp
  5. Build the project:

    mvn clean install
  6. Run the application:

    mvn javafx:run

Note: For detailed PostgreSQL setup instructions, see POSTGRESQL_SETUP.md

πŸš€ Getting Started

First Time Setup:

  1. Launch the application
  2. Click "Create Account" to register
  3. Fill in your details:
    • Username (3-20 characters, letters, numbers, underscores)
    • Email address
    • Password (8+ characters, must contain letters and numbers)
    • Confirm password
  4. Click "Create Account" to complete registration
  5. You'll be redirected to the login screen

Returning Users:

  1. Launch the application
  2. Enter your username or email
  3. Enter your password
  4. Click "Sign In" to access your account

Using the Weather App:

  1. After successful login, you'll see the main weather interface
  2. Enter a city name in the search field
  3. Click "Show Weather" or press Enter
  4. View detailed weather information including:
    • Current temperature
    • Feels like temperature
    • Humidity percentage
    • Wind speed
    • Atmospheric pressure
    • Visibility
    • Sunrise and sunset times
    • Current weather conditions
  5. Use the "Logout" button to securely end your session

Account Management Features:

  • πŸ” Secure Registration: Create accounts with validation
  • πŸ”‘ Flexible Login: Use username or email to sign in
  • ⏰ Session Timeout: Automatic logout after 30 minutes of inactivity
  • πŸšͺ Secure Logout: Properly end sessions and clear data
  • πŸ›‘οΈ Password Security: Industry-standard BCrypt hashing
  • βœ… Input Validation: Real-time validation with helpful feedback

πŸ› οΈ Technology Stack

Core Technologies:

  • Java 11 - Main programming language
  • JavaFX - Modern GUI framework
  • PostgreSQL - Robust database with connection pooling
  • HikariCP - High-performance connection pool
  • Maven - Dependency management and build tool

Weather API:

  • OpenWeatherMap API - Real-time weather data

Authentication & Security:

  • PostgreSQL - Robust database for user management and sessions
  • BCrypt - Secure password hashing
  • Input Validation - Comprehensive data validation
  • Session Management - Secure user sessions

Data Processing:

  • JSON - API response parsing
  • SQL - Database operations

πŸ”’ Security Features

Authentication Security:

  • Password Hashing: BCrypt algorithm for secure password storage
  • Input Sanitization: Protection against injection attacks
  • Session Management: Secure session handling with timeout
  • Data Validation: Comprehensive input validation
  • SQL Injection Protection: Prepared statements for database operations

User Data Protection:

  • PostgreSQL Database: User data stored securely with connection pooling
  • Connection Pooling: HikariCP for optimal database performance
  • Session Expiration: Automatic logout for security
  • Secure Logout: Complete session cleanup

πŸ“‘ API Reference

The application uses the OpenWeatherMap API to fetch weather data. The following endpoints are used:

  • Current Weather Data: api.openweathermap.org/data/2.5/weather

Parameters:

  • q: City name
  • units: Metric
  • lang: en (English)
  • appid: Your API key

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Weather data provided by OpenWeatherMap
  • Icons and emojis for weather representation
  • JavaFX community for GUI components

πŸ“Έ Screenshots

Authentication Screens:

Coming soon - Login and Signup interface screenshots

Main Application Interface:

WeatherWise Application

Key Features Showcase:

  • πŸ” Secure Login Screen - Professional authentication interface
  • πŸ“ User Registration - Comprehensive signup form with validation
  • 🌀️ Weather Dashboard - Clean, modern weather display
  • πŸ‘€ User Session - Personalized experience with logout functionality

Contact

Γ–zgΓΌΓ§ DalgiΓ§ - @ozgucdlg

Project Link: https://github.com/ozgucdlg/WeatherWiseApp

About

This is a well-structured JavaFX weather application with good architecture and user experience. The main concerns are security (hardcoded API keys) and incomplete features (caching). With the recommended improvements, this could be a production-ready application. The project demonstrates good Java programming practices and modern UI design. The co

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published