Codable for seamless API integration.
Air Quality Models
AirQuality
The primary model for air quality data from the Open-Meteo API.US Air Quality Index (0-500 scale)
Fine particulate matter ≤2.5 micrometers in µg/m³
Coarse particulate matter ≤10 micrometers in µg/m³
Carbon monoxide concentration in µg/m³
Nitrogen dioxide concentration in µg/m³
Sulfur dioxide concentration in µg/m³
Ground-level ozone concentration in µg/m³
BreezeApp/Models/AirQuality.swift
AQIStatus
Provides human-readable status information based on AQI value.Status label: “Excellent”, “Good”, “Moderate”, “Unhealthy”, etc.
Visual emoji representation (✨, 😊, 😷, 🚨, ☠️)
Friendly description of air quality conditions
Color theme identifier (e.g., “aqiGood”, “aqiUnhealthy”)
Array of health tips and recommendations
BreezeApp/Models/AirQuality.swift
Pollutant Models
PollutantType
Enum representing individual air pollutants with their properties and thresholds.BreezeApp/Models/Pollutant.swift
Fine Particulate Matter (PM2.5) - particles ≤2.5 micrometers
- Good limit: 12 µg/m³
- Moderate limit: 35.4 µg/m³
- Icon:
wind
Coarse Particulate Matter (PM10) - particles ≤10 micrometers
- Good limit: 54 µg/m³
- Moderate limit: 154 µg/m³
- Icon:
cloud
Nitrogen Dioxide - from vehicle emissions
- Good limit: 53 µg/m³
- Moderate limit: 100 µg/m³
- Icon:
car.fill
Sulfur Dioxide - from fossil fuel combustion
- Good limit: 35 µg/m³
- Moderate limit: 75 µg/m³
- Icon:
building.2.fill
Ground-level Ozone - formed by sunlight and pollutants
- Good limit: 54 µg/m³
- Moderate limit: 70 µg/m³
- Icon:
sun.max.fill
Carbon Monoxide - from incomplete combustion
- Good limit: 4400 µg/m³
- Moderate limit: 9400 µg/m³
- Icon:
flame.fill
PollutantReading
Represents a single pollutant measurement with status calculation.BreezeApp/Models/Pollutant.swift
Pollen Models
PollenItem
Unified model for displaying pollen types and plant-specific data.Unique identifier (plant code or pollen type code)
Display name (e.g., “Grass”, “Tree”, “Oak”, “Birch”)
Pollen index value (0-5 scale)
Category description from API (e.g., “Low”, “Moderate”, “High”)
Whether this is a specific plant (true) or general pollen type (false)
URL to plant image (only for plant-specific items)
Botanical family name
Pollination season description
Visual characteristics of the plant
Health tips and recommendations
BreezeApp/Models/PollenData.swift
PollenLevel
Enum for pollen severity levels with color mapping.BreezeApp/Models/PollenData.swift
Climate Models
ClimateDataPoint
Historical temperature data for climate trend visualization.Auto-generated unique identifier
Year of measurement (e.g., 1980, 1990, 2000, 2010, 2020)
Maximum temperature in Celsius
BreezeApp/Models/ClimateData.swift
Location Models
City
Model for city search results and location data.Unique city identifier from geocoding API
City name
Country name
Administrative region (state, province, etc.)
Latitude coordinate
Longitude coordinate
BreezeApp/Models/City.swift
TopCity
Predefined cities for the ticker display on the landing page.BreezeApp/Models/City.swift
User Preference Models
AppearanceMode
Enum for theme selection (light, dark, system).Follow system appearance settings (default)
Always use light mode
Always use dark mode
BreezeApp/Models/AppearanceMode.swift
API Response Wrappers
AirQualityResponse
GeocodingResponse
PollenResponse
ClimateArchiveResponse
Theme Colors
Breeze defines custom color extensions for consistent theming across the app.Background Colors
Primary app background color (adaptive to light/dark mode)
Card and surface backgrounds with improved contrast
- Dark mode:
UIColor(white: 0.15, alpha: 1.0) - Light mode:
UIColor(white: 0.91, alpha: 1.0)
Search bar background color
- Dark mode:
UIColor(white: 0.2, alpha: 1.0) - Light mode:
UIColor(white: 0.92, alpha: 1.0)
AQI Status Colors
Green color for Good air quality (#34c759)
Orange color for Moderate air quality (#ff9500)
Orange-red for Unhealthy for Sensitive Groups (#ff6b00)
Red color for Unhealthy air quality (#ff3b30)
Purple color for Very Unhealthy (#af52de)
Dark red for Hazardous air quality (#8e0000)
Pollen Level Colors
Green for no pollen (#34c759)
Green for low pollen levels (#34c759)
Orange for moderate pollen levels (#ff9500)
Red for high pollen levels (#ff3b30)
Dark red for extreme pollen levels (#8e0000)
Climate Trend Colors
Gray for neutral temperature change
Green for cooling trends (#34c759)
Orange for warming trends (#ff9500)
Red for significant warming (#ff3b30)
BreezeApp/Extensions/Color+Theme.swift:3-40