Skip to content

🌀️ A clean and modern weather app built with SwiftUI, featuring MVVM architecture and API integration to display real-time weather by city.

Notifications You must be signed in to change notification settings

Daztery/weather_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WeatherApp

A simple and modern weather application built with SwiftUI, consuming the OpenWeatherMap API to display the current weather of any city.

Designed as part of my portfolio to showcase best practices in iOS development: MVVM architecture, API consumption, state management, and reactive UI using SwiftUI.


πŸš€ Features

  • Search for weather by city
  • Display current temperature, weather description, and representative icon
  • Clean and responsive UI
  • MVVM architecture
  • API consumption using async/await
  • Error handling and loading states

πŸ›  Technologies

  • Swift 5
  • SwiftUI
  • MVVM
  • OpenWeatherMap API
  • Combine / async-await

🧱 Project Structure

WeatherApp/
β”œβ”€β”€ Models/
β”‚   └── WeatherResponse.swift
β”œβ”€β”€ ViewModels/
β”‚   └── WeatherViewModel.swift
β”œβ”€β”€ Views/
β”‚   └── WeatherView.swift
β”œβ”€β”€ Services/
β”‚   └── WeatherService.swift
β”œβ”€β”€ Utils/
β”‚   └── Constants.swift
β”œβ”€β”€ WeatherApp.swift

πŸ— Requirements

  1. Xcode 15 or later.
  2. An account on OpenWeatherMap to obtain a free API key.
  3. Add your API key in the Constants.swift file:
enum Constants {
    static let apiKey = "YOUR_API_KEY_HERE"
}

▢️ How to Run

  1. Clone the repository:
git clone https://github.com/Daztery/weather_app.git
  1. Open the project in Xcode:
open WeatherApp.xcodeproj
  1. Replace the API key in Constants.swift
  2. Run the app on the simulator or your device

πŸ“Œ Future Improvements

  • Save recent or favorite cities
  • Show hourly or 7-day forecast
  • Offline support with local storage
  • Location-based weather (using CoreLocation)

About

🌀️ A clean and modern weather app built with SwiftUI, featuring MVVM architecture and API integration to display real-time weather by city.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages