Skip to content

M0bileDev/WeatherAppProject

Repository files navigation

🌤️ Weather App

An Android weather app built with Kotlin and Jetpack Compose.
Get real-time weather conditions and hourly forecasts based on your current location, powered by the Open-Meteo API.


📋 Table of Contents


📸 Screenshots

Add your screenshots here


✨ Features

  • 📍 Current weather by location — Automatically fetches real-time weather data based on your device's GPS location
  • 🕐 Hourly forecast — View a detailed hour-by-hour weather breakdown for the day ahead

🛠️ Tech Stack

Technology Description
Kotlin Primary language
Jetpack Compose Modern declarative UI toolkit
Retrofit HTTP client for Open-Meteo API calls
Hilt Dependency injection
Location / GPS Services Device location retrieval via Android Location API
Kotlin Coroutines & Flow Async operations and reactive state management
Gradle (Kotlin DSL) Build system

🏗️ Architecture

The app follows MVVM + Clean Architecture, organised into three layers:

UI Layer (Compose screens & ViewModels)
        ↕
Domain Layer (Use cases & repository interfaces)
        ↕
Data Layer (Retrofit API + Location services + repository implementations)
  • UI — Compose screens observe state from ViewModels via StateFlow
  • Domain — Use cases encapsulate business logic and coordinate between UI and data
  • Data — Repository implementations retrieve the device's GPS location and fetch weather data from the Open-Meteo API

🚀 Getting Started

Prerequisites

  • Android Studio (Hedgehog or newer recommended)
  • JDK 17+
  • A physical or virtual device with location services enabled

✅ No API key required — Open-Meteo is free and open source with no authentication needed.

Clone the Repository

git clone https://github.com/M0bileDev/WeatherAppProject.git
cd WeatherAppProject

Run the Application

Open the project in Android Studio, select a device or emulator, and hit Run.

Or from the terminal:

# macOS / Linux
./gradlew :app:assembleDebug

# Windows
.\gradlew.bat :app:assembleDebug

Install on a connected device:

./gradlew :app:installDebug

Permissions

The app requires the following permissions at runtime:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

These will be requested automatically on first launch.

Run Tests

./gradlew test

📁 Project Structure

app/
└── src/
    └── main/
        └── kotlin/
            └── com/m0biledev/weatherapp/
                ├── data/
                │   ├── remote/         # Retrofit API service & DTOs
                │   ├── location/       # GPS location provider
                │   └── repository/     # Repository implementations
                ├── domain/
                │   ├── model/          # Domain models
                │   ├── repository/     # Repository interfaces
                │   └── usecase/        # Business logic use cases
                └── presentation/
                    ├── weather/        # Weather screen & ViewModel
                    └── ui/theme/       # Compose theme

📄 License

This project is licensed under the Apache 2.0 License.

About

An Android weather app built with Kotlin and Jetpack Compose. Get real-time weather conditions and hourly forecasts based on your current location, powered by the Open-Meteo API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages