Skip to content
CAI
Software that uses CAICheck a score

OmidHaqi/weather_app

49.2

Weak · 21 September 2026

2.8k

lines of production code

Dart

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is a Flutter-based weather application that provides current conditions and multi-day forecasts for cities. It integrates with a remote weather API to fetch data and uses a local SQLite database to persist user-bookmarked cities. The system is structured with a clean architecture featuring BLoC for state management, dependency injection, and comprehensive test coverage for its core utilities and business logic.

Features

Add Home screen for weather feature

A new HomeScreen widget has been added to the weather feature, providing the main interface for displaying current weather conditions and forecasts. The screen integrates with the HomeBloc to manage state for both current weather and forecast data, displaying city names, weather descriptions, and loading/error states.

_lib/features/feature\weather/presentation/screens · high confidence

Add domain layer for city persistence

Introduced the domain-layer foundation for managing city bookmarks, including a \CityEntity\ model, a \CityRepository\ interface for database operations, and corresponding use cases (\SaveCityUseCase\, \GetAllCityUseCase\, \GetCityUseCase\, and \DeleteCityUseCase\) to handle city data retrieval and storage.

_lib/features/feature\bookmark/domain · high confidence

Added BLoC implementation for current and forecast weather data

The weather feature now includes a complete BLoC architecture to manage UI state for both current and forecast weather data. This introduces new state classes (CwStatus, FwStatus) and corresponding event classes (LoadCwEvent, LoadFwEvent) to handle loading, success, and error scenarios. The HomeBloc coordinates these states, allowing the UI to react to changes in the current city's weather and the 7-day forecast.

_lib/features/feature\weather/presentation/bloc · high confidence

Added bookmark management UI and BLoC logic

The app now includes a new Bookmark screen that displays a list of saved cities. Users can view their saved cities, navigate to the home screen to view details for each city, and delete bookmarks. This change introduces the \BookmarkBloc\ to handle city operations (save, delete, get all, get by name) and the corresponding state and event classes, alongside the Flutter UI components that render the bookmark list and handle user interactions.

_lib/features/feature\bookmark/presentation · high confidence

Added core UI components and app shell structure

Introduced new widgets for the application's visual foundation: a dynamic background that changes based on time of day and weather conditions, a bottom navigation bar for switching between the home and bookmark screens, and a reusable loading indicator. The app shell was restructured to use a PageView for screen navigation, integrating the new bottom navigation and applying the dynamic background image to the main content area.

lib/core/widgets · high confidence

Added core utility classes for constants, date formatting, and app theming

The application now includes new utility classes in the core layer: Constants for storing the OpenWeatherMap API base URL and API key placeholder; DateConverter for formatting timestamps into readable dates, times, and hours; and AppTheme for defining a dark-mode theme using the Ubuntu font family.

lib/core/utils · high confidence

Added data models for weather feature

New data model classes have been introduced to parse and serialize weather data. This includes \CurrentCityModel\ for current conditions, \ForecastDaysModel\ for multi-day forecasts, and \SuggestCityModel\ for city search suggestions. Each model implements JSON serialization/deserialization logic to map API responses to domain entities.

_lib/features/feature\weather/data/model · high confidence

Added domain entities for weather data

Introduced new domain entities to represent weather data structures: CurrentCityEntity for current conditions, ForecastDaysEntity for multi-day forecasts, and SuggestCityEntity for city search suggestions. These entities provide the data models used by the weather feature.

_lib/features/feature\weather/domain/entities · high confidence

Added local city storage via SQLite

Introduced a new local data layer for the bookmark feature, implementing city persistence using SQLite (via the Floor library). This includes a CityDao for database operations, an AppDatabase configuration, and a CityRepositoryImpl that wraps these calls to provide save, retrieve, and delete functionality for city entities.

_lib/features/feature\bookmark/data · high confidence

Added project documentation and license

The repository now includes an Apache 2.0 LICENSE file and a comprehensive README.md for the Weather App, which details features like current weather data, 5-day forecasts, and city bookmarking, along with setup instructions for API keys and running tests. Additionally, the project's Dart/Flutter configuration has been updated: DevTools settings were added, the \.metadata\ file was cleaned up to remove unused platform revisions, and the \analysis\_options.yaml\ was changed to use \package:lints/recommended.yaml\ instead of \package:flutter\_lints/flutter.yaml\.

(repo-wide) · high confidence

Added weather domain use cases for current, forecast, and city suggestions

New domain use cases have been introduced to handle weather data retrieval: GetCurrentWeatherUseCase, GetForecastWeatherUseCase, and GetSuggestionCityUseCase. These classes encapsulate the logic for fetching current weather conditions, multi-day forecasts, and city suggestions respectively, delegating to the weather repository.

_lib/features/feature\_weather/domain/use\cases · medium confidence

Generated asset and font classes for weather icons and Ubuntu font

The codebase now includes generated Dart classes for static assets and fonts. The new \lib/gen/assets.gen.dart\ file provides an \Assets\ class with an \images\ accessor that exposes typed getters for weather-related images (e.g., \afternoon\, \clouds\, \rain\, \sunrise\, \windy\, etc.), each returning an \AssetGenImage\ helper that simplifies creating \Image\ widgets or \ImageProvider\s. Additionally, \lib/gen/fonts.gen.dart\ introduces a \FontFamily\ class exposing the \Ubuntu\ font family as a constant string, enabling consistent font usage across the app.

lib/gen · high confidence

Implemented weather data repository with API integration

Added the concrete implementation of the weather repository, providing methods to fetch current weather data, 5-day forecast data, and city suggestions by interacting with the remote API provider and mapping responses to domain entities.

_lib/features/feature\weather/data/repository · high confidence

Initial Android project scaffolding and configuration

The Android module has been initialized with the standard Flutter project structure, including the AndroidManifest files for debug, profile, and main builds, the MainActivity entry point, and the default launch splash screen and theme styles. Additionally, the Gradle wrapper has been configured to use Gradle version 7.6.3.

android · high confidence

Initial architecture setup with dependency injection and API integration

The application now initializes a dependency injection container (GetIt) to manage repositories, use cases, and BLoC states, replacing the previous direct widget-based entry point. This includes registering an ApiProvider for weather data, a local database source via Floor, and specific use cases for weather and bookmark features. The main entry point now ensures the Flutter binding is initialized and the DI container is set up before running the app.

lib · medium confidence

Introduces a generic UseCase base class

A new generic UseCase interface is added to the core library, defining a standard contract for use cases with a call method that accepts a parameter and returns a Future. A NoParams class is also introduced to serve as a placeholder for use cases that do not require input parameters.

_lib/core/use\case · high confidence

New weather forecast and bookmarking UI components

The weather feature now includes three new presentation widgets: a city search input with autocomplete suggestions, a daily weather forecast card displaying temperature and conditions, and a bookmark icon that allows users to save cities to their favorites list with associated loading and error states.

_lib/features/feature\weather/presentation/widgets · high confidence

Behavioural changes

Added weather repository interface

A new abstract interface IWeatherRepository was added to the domain layer, defining contracts for fetching current weather data, forecast data, and city suggestions. This establishes the repository pattern for weather-related domain logic.

_lib/features/feature\weather/domain/repository · high confidence

Introduce DataState base class for handling data states

A new abstract class DataState\<T\> has been added to the core resources, providing a structured way to represent data states. This class includes fields for data and error, with two concrete implementations: DataSuccess for successful data retrieval and DataFailed for error conditions. This change supports more robust state management in the application's core.

lib/core/resources · medium confidence

Test coverage

Add unit tests for the HomeBloc; Added unit and widget tests for core utilities and navigation.

Dependencies

Added Flutter/Dart dependencies and Android build configuration

The project now includes a comprehensive set of Dart packages for the Flutter application, including state management (bloc, flutter\_bloc), dependency injection (get\_it), networking (dio), local storage (floor, sqflite), and testing (bloc\_test, mockito). Additionally, the Android build configuration has been added, establishing the Gradle setup for the Android module.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 47 → 49 (+2.1)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 96 (-4.2)
  • Architecture 100 → 90 (-10.3)
  • Maturity 61 → 65 (+4.0)
  • Readiness 24 → 26 (+1.4)
  • Security 97 → 98 (+0.8)
  • Domain Modelling 52 → 59 (+6.4)

Resolved (7)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • No exposed public API
  • Test reliability not included
  • complexity unreadable for .dart, .kt — churn × complexity hotspots could not be measured
  • early-stage repository — too little history to judge knowledge freshness
  • single-maintainer — knowledge-concentration (bus factor) risk

New (20)

  • AppBackground.getBackGroundImage (cyclomatic 18) (lib/core/widgets/app_background.dart)
  • BookMarkIcon.build (cognitive 19) (lib/features/feature_weather/presentation/widgets/bookmark_icon.dart)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (11–12 lines × 2) (lib/features/feature_weather/presentation/widgets/bookmark_icon.dart)
  • Duplicated block (13 lines × 2) (lib/features/feature_weather/presentation/widgets/city_search.dart)
  • Duplicated block (17–18 lines × 4) (lib/features/feature_weather/presentation/screens/home_screen.dart)
  • Duplicated block (20 lines × 2) (lib/features/feature_bookmark/presentation/bloc/get_city_status.dart)
  • Duplicated block (35 lines × 2) (lib/features/feature_weather/presentation/screens/home_screen.dart)
  • Duplicated block (5 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (5 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (5 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (6 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (7 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (7 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Duplicated block (8 lines × 2) (lib/features/feature_weather/data/model/current_city_model.dart)
  • Hotspot: lib/core/widgets/app_background.dart (lib/core/widgets/app_background.dart)
  • MethodTooLong: _HomeScreenState.build (lib/features/feature_weather/presentation/screens/home_screen.dart)
  • No ADRs found

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

OmidHaqi/weather_app was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 21 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 2b90555540e858eff98ff743f9402a731b1e7e34 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-fa71c66cabd8.