A modern, cross-platform weather application built with Kotlin Multiplatform and Compose Multiplatform, providing real-time weather information for Android and iOS platforms.
- Real-time Weather Data: Current weather conditions with temperature, humidity, wind speed, and precipitation
- 7-Day Forecast: Extended weather forecast with daily temperature and precipitation data
- Detailed Weather View: Comprehensive weather details with hourly forecasts and temperature charts
- Location-based Weather: Automatic location detection with permission handling
- Reverse Geocoding: Display location names based on coordinates
- Time-based Greetings: Dynamic greetings based on current time (Good Morning, Good Afternoon, etc.)
- Weather Icons: Emoji-based weather condition indicators
- Sunrise/Sunset Information: Daily sunrise and sunset times with visual cards
- Native Splash Screen: Android native splash screen with data preloading
- Onboarding Flow: First-time user introduction screen with smooth animations
- Permission Management: Seamless location permission requests with user-friendly screens
- Loading States: Shimmer effects during data loading
- Error Handling: Comprehensive error states and user feedback
- Responsive UI: Adaptive design for different screen sizes
- Navigation Drawer: Side menu with weather information and app navigation
- Feedback System: User feedback collection screen
- Smooth Animations: Crossfade transitions and animated UI elements
The project follows Clean Architecture principles with clear separation of concerns:
βββ Domain Layer
β βββ Models (WeatherData, LocationData, PermissionState)
β βββ Repositories (Interfaces)
β βββ Use Cases (Business Logic)
βββ Data Layer
β βββ Remote (API Services)
β βββ Local (DataStore Preferences)
β βββ Repositories (Implementations)
β βββ Mappers (Data Transformation)
βββ Presentation Layer
βββ ViewModels (State Management)
βββ Screens (UI Components)
βββ Navigation
- Kotlin Multiplatform: Shared business logic across platforms
- Compose Multiplatform: Declarative UI framework
- Koin: Dependency injection framework
- Ktor: HTTP client for API communication
- DataStore: Local data persistence
- Kotlinx Serialization: JSON serialization/deserialization
- Navigation Compose: Type-safe screen navigation
- Kotlinx DateTime: Date and time handling
- Kotlinx Coroutines: Asynchronous programming
- Android:
- Google Play Services Location
- Activity Result API
- Core Splash Screen API
- Material Design 3
- iOS: Core Location framework
- Open-Meteo API: Free weather API providing:
- Current weather conditions
- 7-day forecast
- Hourly forecasts
- Multiple weather parameters (temperature, humidity, wind, precipitation)
- Weather codes for condition mapping
- Sunrise/sunset times
- Nominatim API (OpenStreetMap): Reverse geocoding service for:
- Converting coordinates to human-readable addresses
- City, town, and village name resolution
- Minimum SDK: 24 (Android 7.0)
- Target SDK: Latest
- Permissions:
ACCESS_FINE_LOCATIONACCESS_COARSE_LOCATION
- Minimum Version: iOS 14.0+
- Permissions: Location When In Use
- Info.plist:
NSLocationWhenInUseUsageDescription
- Android Studio with Kotlin Multiplatform plugin
- Xcode (for iOS development)
- JDK 11 or higher
- Clone the repository
- Open the project in Android Studio
- Sync Gradle dependencies
- Run on Android or iOS simulator/device
Weatherly/
βββ composeApp/
β βββ src/
β β βββ commonMain/kotlin/ # Shared code
β β βββ androidMain/kotlin/ # Android-specific code
β β βββ iosMain/kotlin/ # iOS-specific code
β βββ build.gradle.kts
βββ iosApp/ # iOS application wrapper
βββ settings.gradle.kts
The app uses Koin for dependency injection with modular organization:
- LocalModule: DataStore and local data sources
- NetworkModule: HTTP client and API services
- RepositoryModule: Repository implementations
- UseCaseModule: Business logic use cases
- ViewModelModule: Presentation layer ViewModels
- PlatformModule: Platform-specific dependencies
- Material Design 3: Modern UI components
- Gradient Backgrounds: Visually appealing weather displays
- Weather Icons: Intuitive emoji-based weather representation
- Shimmer Loading: Smooth loading animations
- Responsive Layout: Adaptive to different screen sizes
The app maps weather codes to conditions and icons:
- Clear sky βοΈ
- Partly cloudy β
- Foggy π«οΈ
- Rain π§οΈ
- Snow βοΈ
- Thunderstorm βοΈ
- And more...
ViewModels manage UI state using:
- StateFlow: Reactive state management
- Coroutines: Asynchronous operations
- Result: Error handling wrapper
- Location data is only used for weather information
- No personal data is stored or transmitted
- Users can deny location access (app will show permission screen)
- Transparent permission handling with user-friendly messages
- Weather alerts and notifications
- Multiple location support
- Weather maps integration
- Historical weather data
- Customizable units (Celsius/Fahrenheit)
- Dark/Light theme toggle
- Weather widgets
This project is open source and available under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with β€οΈ using Kotlin Multiplatform