Skip to content

MsYoda/WeatherApp

Repository files navigation

Weather App

A Flutter application for displaying the current weather in a selected city.
The project uses the OpenWeather API and GeoNames for geocoding and autocomplete, and is built following Clean Architecture (Layer-first) principles, with the presentation layer divided into feature-based modules.

🚀 Features

  • View current weather for a selected city
  • Geocoding (convert city name to coordinates) using GeoNames
  • City name autocomplete using GeoNames
  • Display:
    • temperature
    • weather conditions
    • humidity
    • wind speed
  • Loading and error state handling
  • Easily extensible for multi-day weather forecasts

🧱 Architecture

The project is implemented using Clean Architecture (Layer-first):

Key Principles

  • Layer-first: code is organized by layers, not by features
  • Feature-based presentation: each feature is isolated within the presentation layer
  • Dependency Rule:
    • presentation -> domain <- data
  • The domain layer is independent of Flutter and external libraries
  • Communication between layers is done through abstractions (interfaces)

🌐 APIs

The application integrates with the following external services:

⚙️ Configuration

To run the project, API keys are required.

They are provided via dart-define.

Example dart_define.json file:

{
  "OPENWEATHER_KEY": "your_api_key_here",
  "GEONAMES_USERNAME": "username"
}

Also you need to run this commands before start app:

flutter pub global activate dart_define
flutter pub get
flutter pub run easy_localization:generate --source-dir lib/core/localization --output-dir lib/core/localization/generated
flutter pub run easy_localization:generate  --source-dir lib/core/localization --output-dir lib/core/localization/generated -f keys -o locale_keys.g.dart
dart run build_runner build
flutter run --dart-define-from-file=dart_define.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published