Skip to content

and3rn3t/weather-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

121 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Weather App 🌀️

A beautiful, feature-rich weather application built with SwiftUI for iOS 17+. Features real-time weather data, interactive charts, location services, favorites management, and widgets.

iOS Swift SwiftUI License


✨ Features

Feature Description
🌍 Real-time Weather Current conditions, hourly & 14-day forecasts via Open-Meteo API
πŸ“ Location Services GPS detection and global city search
⭐ Favorites Save unlimited locations with SwiftData persistence
πŸ“Š Interactive Charts Temperature & precipitation graphs with touch interaction
πŸ”” Notifications Severe weather alerts, daily forecasts, rain warnings
πŸ“± Widgets Home screen (S/M/L) and lock screen widgets
🎨 Glass UI Modern glass morphism design with weather animations

πŸš€ Quick Start

Requirements

  • macOS: Ventura 14.0+
  • Xcode: 15.0+
  • iOS: 17.0+
  • Swift: 5.9+

Installation

# Clone the repository
git clone https://github.com/and3rn3t/weather-app.git
cd weather-app

# Open in Xcode
open weather.xcodeproj
  1. Select your target device/simulator
  2. Press Cmd+R to build and run
  3. Grant location permission when prompted

πŸ“ Project Structure

weather/
β”œβ”€β”€ Sources/
β”‚   β”œβ”€β”€ App/                    # App entry point
β”‚   β”œβ”€β”€ Views/                  # SwiftUI views
β”‚   β”œβ”€β”€ Models/                 # Data models (Codable)
β”‚   β”œβ”€β”€ Services/               # API integration
β”‚   β”œβ”€β”€ Managers/               # State managers (@Observable)
β”‚   └── Utilities/              # Visual effects & helpers
β”œβ”€β”€ Assets.xcassets/            # App icons & colors
β”œβ”€β”€ Documentation/              # Feature documentation
β”œβ”€β”€ Info.plist                  # App configuration
└── weather.entitlements        # App capabilities

πŸ€– AI Development Assistance

This project includes custom instructions for AI coding assistants:

Assistant Instructions File Purpose
GitHub Copilot .github/copilot-instructions.md Code generation, patterns, standards
Claude .claude/CLAUDE.md Architecture, troubleshooting, context

These files help AI assistants understand the project's architecture, coding patterns, and conventions for more accurate suggestions.


πŸ“š Documentation

Core Guides

Document Description
QUICK_START.md Getting started, build commands
FEATURES.md Complete feature documentation
BUILD_CONFIGURATION.md Xcode settings, schemes, diagnostics
CONTRIBUTING.md Contribution guidelines

Reference

Document Description
CHANGELOG.md Version history
AI_DEVELOPMENT_GUIDE.md AI assistant instructions
APP_STORE_GUIDE.md App Store metadata

πŸ—οΈ Architecture

Tech Stack

  • SwiftUI - Declarative UI framework
  • SwiftData - Persistent storage
  • Swift Charts - Data visualization
  • WidgetKit - Home & lock screen widgets
  • CoreLocation - GPS and location services
  • MapKit - Location search

Design Patterns

  • MVVM - Model-View-ViewModel architecture
  • @Observable - Modern reactive state management
  • async/await - Swift concurrency
  • Environment injection - Dependency management

πŸ”§ Configuration

Required Info.plist Keys

<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location to show weather for your area</string>

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We need your location to show weather and send alerts</string>

πŸ§ͺ Testing

Run tests in Xcode with Cmd+U or use the Makefile:

# Run all tests
make test

# Run tests with code coverage
make test-coverage

# Run with test plan (parallel, sanitizers)
make test-plan

# Run performance tests only
make test-performance
  • Unit tests: weatherTests/
  • UI tests: weatherUITests/
  • Test plan: weather.xcodeproj/xcshareddata/TestPlans/WeatherTestPlan.xctestplan

πŸ—οΈ Build & Development

Makefile Commands

The project includes a Makefile for common development tasks:

# Build
make build              # Debug build
make build-release      # Release build
make clean              # Clean DerivedData

# Testing
make test               # Run all tests
make test-coverage      # Tests with coverage
make test-plan          # Use test plan
make test-performance   # Performance tests only

# Code Quality
make lint               # Run SwiftLint
make format             # Format with swift-format
make analyze            # Static analysis

# Release
make archive            # Create archive
make export-ipa         # Export for App Store

# Analysis
make analyze-build-times  # Find slow compilation
make analyze-size         # App bundle size analysis
make profile              # Build for Instruments

# Setup
make setup-tools        # Install build tools
make install-hooks      # Install git hooks

Performance Optimizations

The app includes several performance optimizations:

  • Cached URLSession: Network requests use a shared session with 10MB memory / 50MB disk cache
  • Static Formatters: Number and date formatters are cached to avoid repeated allocations
  • Request Debouncing: API calls are debounced to prevent excessive requests
  • Deferred Initialization: Non-critical init (Siri shortcuts) is deferred after first frame

See BUILD_CONFIGURATION.md for details.


πŸ“š Documentation

All documentation is consolidated in the docs directory at the repository root:

User Documentation:

Developer Documentation:

AI Configuration:

For complete architecture documentation, see ARCHITECTURE.md.


🀝 Contributing

We welcome contributions! Please read our Contributing Guide for:

  • Development environment setup
  • Code style guidelines
  • Pull request process
  • Testing requirements

πŸ“„ License

MIT License - See LICENSE for details


πŸ™ Acknowledgments

  • Weather data provided by Open-Meteo (free, no API key required)
  • Icons from SF Symbols

About

iOS26 Weather App

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors