Skip to content

About

Mobile application for real time weather reports

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌀️ MobileWeatherReportApp

A modern, mobile-first weather application providing real-time weather information and forecasts.

Weather App Preview Version License

πŸ“‹ Description

MobileWeatherReportApp is a single-page application (SPA) that displays comprehensive weather information including:

  • Current weather conditions for your location
  • Hourly forecast for the next 24 hours
  • Daily forecast for the next 7 days
  • Automatic geolocation with fallback to default location
  • Night mode weather icons (moon displayed between 10 PM - 6 AM)

Fully functional demo => (https://gzifoto-spec.github.io/MobileWeatherReportApp/)

Screenshot From 2026-01-28 15-36-51 Mobile view

Desktop view Screenshot From 2026-01-28 15-35-18

πŸš€ Technologies Used

Frontend

  • HTML5 - Semantic markup structure
  • CSS3 - Custom styling with modern features
  • Bootstrap 5 - Responsive grid system
  • JavaScript (ES6+) - Modern vanilla JavaScript

API

  • Open-Meteo API - Free weather data API
    • No API key required
    • Real-time weather data
    • Hourly and daily forecasts
    • CORS enabled for browser requests

Development Tools

  • Git & GitHub - Version control
  • VS Code - Code editor
  • Live Server - Development server

🎨 Design

Color Palette:

  • Primary Dark: #1B3C53
  • Primary Medium: #234C6A
  • Primary Light: #456882
  • Neutral Light: #E3E3E3

Design Philosophy:

  • Mobile-first responsive design
  • Clean and modern interface
  • Intuitive user experience
  • Accessibility-focused

πŸ“¦ Installation

Prerequisites

  • Modern web browser (Chrome, Firefox, Safari, Edge)
  • Internet connection
  • Code editor (VS Code recommended)

Setup Instructions

  1. Clone the repository:
git clone https://github.com/your-username/MobileWeatherReportApp.git
  1. Navigate to the project directory:
cd MobileWeatherReportApp
  1. Open with VS Code:
code .
  1. Install Live Server extension (if not already installed):

    • Open VS Code Extensions (Ctrl+Shift+X)
    • Search for "Live Server"
    • Install the extension by Ritwick Dey
  2. Launch the application:

    • Right-click on index.html
    • Select "Open with Live Server"
    • The app will open in your default browser at http://127.0.0.1:5500

Alternative Setup (No Live Server)

Simply open index.html in your web browser. Note: Geolocation may not work with the file:// protocol.

🎯 Features

Current Weather

βœ… Real-time temperature display
βœ… Weather condition description with emoji icons
βœ… Humidity percentage
βœ… Wind speed in km/h
βœ… Automatic location detection

Hourly Forecast

βœ… Next 24 hours forecast
βœ… Temperature per hour
βœ… Weather conditions with icons
βœ… Horizontal scrollable layout

Daily Forecast

βœ… 7-day weather forecast
βœ… Maximum and minimum temperatures
βœ… Weather condition icons
βœ… Date display in local format

Smart Features

βœ… Night mode icons (moon icon for clear skies at night)
βœ… Fallback location (A CoruΓ±a, Spain) if geolocation fails
βœ… Responsive design for all screen sizes
βœ… Loading states and error handling

πŸ“‚ Project Structure

MobileWeatherReportApp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   β”œβ”€β”€ styles.css           # Main stylesheet
β”‚   β”‚   └── responsive.css       # Responsive design rules
β”‚   β”œβ”€β”€ js/
β”‚   β”‚   β”œβ”€β”€ main.js             # Application entry point
β”‚   β”‚   β”œβ”€β”€ api.js              # API communication layer
β”‚   β”‚   β”œβ”€β”€ ui.js               # UI rendering functions
β”‚   β”‚   └── utils.js            # Utility functions
β”‚   └── assets/
β”‚       β”œβ”€β”€ images/             # Image resources
β”‚       └── icons/              # Icon resources
β”œβ”€β”€ index.html                   # Main HTML file
β”œβ”€β”€ README.md                    # Documentation (this file)
└── .gitignore                  # Git ignore rules

File Responsibilities

index.html

  • Semantic HTML5 structure
  • Header, main content, and footer sections
  • Script loading order (utils β†’ api β†’ ui β†’ main)

main.js

  • Application initialization
  • Event handlers
  • Orchestrates data flow between modules

api.js

  • Open-Meteo API integration
  • HTTP requests using Fetch API
  • Error handling for network requests

ui.js

  • DOM manipulation
  • Weather data rendering
  • Dynamic content creation

utils.js

  • Geolocation wrapper
  • Date and time formatting
  • Weather code to description mapping
  • Weather icon logic (including night mode)

πŸ”§ Usage

First Launch

  1. When you open the app, it will request permission to access your location
  2. Allow location access for accurate weather data
  3. If denied, the app defaults to A CoruΓ±a, Spain

Refresh Weather Data

  • Click the "Cambiar ubicaciΓ³n" button in the header
  • The app will request your location again and update all data

Navigate Forecasts

  • Horizontal scroll on mobile devices to view all hourly forecasts
  • Hover effects on desktop for better interactivity

🌐 Browser Compatibility

  • βœ… Chrome 90+
  • βœ… Firefox 88+
  • βœ… Safari 14+
  • βœ… Edge 90+

πŸ› Troubleshooting

Location Not Working

Problem: Geolocation fails with error code 2

Solutions:

  1. Check if location services are enabled in your OS
  2. Verify browser has location permission
  3. Ensure WiFi is enabled (browsers use WiFi for location)
  4. Disable VPN if active

Fallback: The app automatically uses A CoruΓ±a coordinates if geolocation fails

Data Not Loading

Problem: Weather data doesn't appear

Solutions:

  1. Check internet connection
  2. Open browser console (F12) to see error messages
  3. Verify Open-Meteo API is accessible
  4. Hard refresh the page (Ctrl+Shift+R)

Styling Issues

Problem: CSS not loading properly

Solutions:

  1. Clear browser cache
  2. Check file paths in index.html
  3. Ensure src/css/ folder exists with both CSS files

🚧 Future Enhancements

Potential features for future versions:

  • Save favorite locations
  • Dark/Light theme toggle
  • Temperature graphs and charts
  • Weather alerts and notifications
  • Multiple language support
  • Weather radar integration
  • Offline functionality with Service Workers

πŸ“Š API Reference

Open-Meteo Endpoints Used

Current Weather:

GET https://api.open-meteo.com/v1/forecast
Parameters:
- latitude: float
- longitude: float
- current: temperature_2m,relative_humidity_2m,weather_code,wind_speed_10m
- timezone: auto

Hourly Forecast:

GET https://api.open-meteo.com/v1/forecast
Parameters:
- latitude: float
- longitude: float
- hourly: temperature_2m,weather_code,relative_humidity_2m
- timezone: auto
- forecast_days: 2

Daily Forecast:

GET https://api.open-meteo.com/v1/forecast
Parameters:
- latitude: float
- longitude: float
- daily: temperature_2m_max,temperature_2m_min,weather_code
- timezone: auto
- forecast_days: 7

Weather Codes (WMO)

Code Description
0 Clear sky
1 Mainly clear
2 Partly cloudy
3 Overcast
45, 48 Fog
51-55 Drizzle
61-65 Rain
71-77 Snow
80-82 Rain showers
85-86 Snow showers
95-99 Thunderstorm

πŸ‘¨β€πŸ’» Development

Git Workflow

This project follows a feature branch workflow:

main (production)
  └── dev (development)
       β”œβ”€β”€ feature/html-structure
       β”œβ”€β”€ feature/css-styling
       β”œβ”€β”€ feature/javascript-utils
       β”œβ”€β”€ feature/api-integration
       β”œβ”€β”€ feature/ui-components
       β”œβ”€β”€ feature/main-app-logic
       └── feature/city-search

Commit Convention

  • feat: New feature
  • fix: Bug fix
  • style: Code style changes (formatting)
  • test: Adding tests

Code Style

  • JavaScript: ES6+ features, async/await for asynchronous code
  • CSS: BEM-inspired naming, mobile-first approach
  • HTML: Semantic elements, accessibility attributes

πŸ“„ License

This project is open source and available for educational purposes.

πŸ™ Acknowledgments

  • Coding asistance by Claude
  • Weather data provided by Open-Meteo
  • Color palette from Color Hunt
  • Icons: Native emoji support
  • Bootstrap 5 for responsive grid system

πŸ“§ Contact

For questions, suggestions, or issues, please open an issue on GitHub.


Made with β˜€οΈ by Xavier (Ghato)
Academic Project - 2026

About

Mobile application for real time weather reports

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages