Skip to content

Javalenciab90/WeatherApp

Repository files navigation

Weather App with Clean Architecture & Jetpack Compose

Porpuse of this project is implement modularity clean architecture.

This is a small project built with Clean Architecture and Jetpack Compose. The project utilizes the WeatherMaps API to search for weather information by typing a city name into the search bar. It demonstrates the navigation between screens, with one screen showing the weather details and another screen showing a map (though the map is not fully implemented in this version). The app also includes a bottom sheet displaying brief weather information.

Empty Weather WeatherMap
EmptyWeather Weather WeatherMap
  • Search for Weather: Users can type a city name in the search bar to get weather details.
  • Navigation: Can search on second screen that displays a map (used for navigation demonstration purposes, not implemented).
  • Bottom Sheet: Displays minimal weather details on the map screen.
  • Clean Architecture: The app follows Clean Architecture principles, ensuring separation of concerns and scalability.

Architecture

This app is structured around Clean Architecture and includes the following modules:

- app: Holds the main activity and NavigationHost to manage screen navigation.

- common-ui: Manages common UI components like error handling views and icons used throughout the app.

- design-system: Contains abstract components and the app's theme, defining UI consistency.

- platform: Manages base classes for ViewModel, CoroutineContext, and handles UI effects. Also defines the routes used in navigation.

- domain: Manages domain models, the DataMapper interface, and API exceptions. It ensures business logic is separated from other layers.

- features: Contains the core functionality of the app, such as the weather module and weatherMap module.

- weather module: Implements view, viewModel, useCase, and repository to handle weather data, including fetching and presenting weather information.

- data module: Handles the data sources. Fetches data from the service API and maps it to the database (using Room), providing a single source of truth for the app.

- network models module: Manages the DTOs (Data Transfer Objects) used by the data and service modules, ensuring no cyclic dependencies between them.

- service module: Manages the connection to the external service API (WeatherMaps API) to fetch weather data.

Modular scheme

image

Pattern Presentation

MVI image

Principal Libraries

About

Clean architecture with Weather API and Compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages