Your Personal Sustainability Companion
Track your carbon footprint, discover eco-friendly businesses, and learn to live more sustainably.
EcoBloom is a fully functional portfolio demo showcasing how a real-world sustainability app would work. Built with Jetpack Compose and following MVVM + Repository architecture, this project demonstrates modern Android development practices while simulating a complete user experience for tracking environmental impact, discovering sustainable businesses in Kenya, and learning about eco-friendly practices.
๐ Portfolio Project: This app is a working demonstration of my Android development skills. It uses local data (Room database) to simulate all features a production sustainability app would offer, including carbon tracking, business discovery, educational content, and gamification โ all running fully offline without requiring backend services.
EcoBloom directly supports the United Nations Sustainable Development Goals:
| SDG | Goal | How EcoBloom Contributes |
|---|---|---|
| ๐๏ธ SDG 11 | Sustainable Cities & Communities | Promotes local sustainable businesses and eco-friendly transportation |
| โป๏ธ SDG 12 | Responsible Consumption & Production | Tracks consumption patterns and encourages waste reduction |
| ๐ SDG 13 | Climate Action | Measures carbon footprint and incentivizes carbon-saving activities |
- Carbon Footprint Overview: Real-time visualization of your environmental impact
- Quick Actions: Log activities with one tap
- Sustainability Score Card: See your overall eco-warrior rating
- Progress Tracking: Weekly and monthly carbon savings at a glance
- Multiple Activity Types: Transport, food, energy, shopping, recycling
- Smart Calculations: Accurate carbon impact using verified emission factors
- Activity History: Complete log with filtering and search
- Streak Tracking: Maintain daily logging streaks for bonus rewards
- Sustainable Business Discovery: Find eco-friendly businesses near you
- Sustainability Scores: 1โ5 leaf rating system based on practices
- Categories: Restaurants, cafรฉs, groceries, fashion, transportation, energy & more
- Detailed Profiles: Certifications, practices, contact info, and reviews
- Kenyan Focus: Curated businesses across Nairobi, Mombasa, Kisumu, and beyond
- Curated Articles: Expert-verified content on sustainability topics
- Sustainability Tools: Calculators and interactive learning tools
- SDG Tagging: Content aligned with specific sustainability goals
- Kenyan Context: Local authors covering topics like M-KOPA solar, Lake Victoria conservation, and the Green Belt Movement
- Achievements & Badges: Unlock rewards for sustainable actions
- Experience Points (XP): Level up your eco-warrior status
- Tiered Rewards: Bronze, Silver, Gold, and Platinum badges
- Personal Statistics: Lifetime carbon savings and activity counts
- Editable Profile: Display name, bio, location, and photo
- Notification Preferences: Reminders and updates
- Theme Support: Light, dark, and system-default modes
| Technology | Purpose |
|---|---|
| Kotlin 2.0.21 | Primary programming language |
| Jetpack Compose (BOM 2024.11.00) | Modern declarative UI toolkit |
| Material 3 | Design system with dynamic theming |
| Coroutines & Flow | Asynchronous programming & reactive streams |
| Technology | Purpose |
|---|---|
| MVVM + Repository | Presentation & data layer pattern |
| Hilt 2.52 (KSP) | Dependency injection |
| Navigation Compose 2.8.5 | Screen navigation |
| Technology | Purpose |
|---|---|
| Room 2.6.1 (KSP) | Local SQLite database with Flow support |
| DataStore | User preferences storage |
| Gson | JSON serialization for Room type converters |
| Technology | Purpose |
|---|---|
| Retrofit 2.11.0 + OkHttp | HTTP client (ready for API integration) |
| Google Maps + Maps Compose | Map display and location services |
| Coil 2.7.0 | Image loading and caching |
| Technology | Purpose |
|---|---|
| WorkManager | Background task scheduling |
| Timber | Logging |
| Splash Screen API | Android 12+ splash screen |
EcoBloom follows MVVM + Repository architecture with separation between presentation and data layers:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PRESENTATION LAYER โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Screens โ โ ViewModels โ โ Components โ โ
โ โ (Compose) โ โ (StateFlow) โ โ (20+ Reusable UI) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ DOMAIN LAYER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Enums & Type Definitions โ โ
โ โ ActivityType, BusinessCategory, โ โ
โ โ AchievementType, CarbonCategory โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ DATA LAYER โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Room DB โ โ DataStore โ โ Repositories โ โ
โ โ (7 tables) โ โ (Prefs) โ โ (6 repositories) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- Unidirectional Data Flow: State flows down via
StateFlow, events flow up via callbacks - Single Source of Truth: Room database as the primary data source
- Reactive Streams: Kotlin Flow for all reactive data updates
- Immutable State: Data classes with
copy()for state updates - Pre-seeded Data:
DataSeederpopulates demo content on first launch
app/src/main/java/com/kodinova/ecobloom/
โโโ ๐ data/
โ โโโ ๐ components/ # Home screen widget composables
โ โโโ ๐ local/
โ โ โโโ ๐ converters/ # Room type converters (Gson)
โ โ โโโ ๐ dao/ # 7 Room Data Access Objects
โ โ โโโ ๐ entity/ # 7 database entities
โ โ โโโ ๐ model/ # Query result models
โ โ โโโ EcoBloomDatabase.kt
โ โโโ ๐ model/ # Data models (NewsItem, WeatherData)
โ โโโ ๐ repository/ # 6 repository implementations
โ โโโ ๐ ui/ # UI state classes & screen models
โ
โโโ ๐ di/ # Hilt DI modules
โ โโโ AppModule.kt
โ โโโ DatabaseModule.kt
โ โโโ RepositoryModule.kt
โ
โโโ ๐ domain/
โ โโโ ๐ model/ # Domain enums (ActivityType, BusinessCategory, etc.)
โ
โโโ ๐ presentation/
โ โโโ ๐ components/ # 20 reusable UI components
โ โโโ ๐ navigation/ # Route definitions
โ โโโ ๐ screens/ # 15 screen composables
โ โโโ ๐ theme/ # Material 3 theming (Color, Type, Shape, Spacing)
โ โโโ ๐ viewmodel/ # 11 ViewModels with state management
โ
โโโ ๐ util/ # Utilities
โ โโโ CarbonCalculator.kt # Emission factor calculations
โ โโโ Constants.kt # App-wide constants
โ โโโ DataSeeder.kt # Initial data population
โ โโโ DateFormatter.kt # Date formatting helpers
โ โโโ LocationUtils.kt # Location utilities
โ โโโ StringValidators.kt # Input validation
โ
โโโ EcoBloom.kt # Main NavHost & Scaffold
โโโ MainActivity.kt # Single activity entry point
- Android Studio: Ladybug (2024.2.1) or newer
- JDK: 17 or higher
- Android SDK: API 26+ (Android 8.0 Oreo)
- Kotlin: 2.0.21
-
Clone the repository
git clone https://github.com/muchaisam/ecobloom.git cd ecobloom -
Open in Android Studio
- File โ Open โ Select the project folder
- Wait for Gradle sync to complete
-
Build and Run
./gradlew assembleDebug
Or use the Run button in Android Studio
Note: The app runs fully offline โ no API keys or backend services required.
The app includes a demo user (user_demo_001) with pre-seeded data for testing:
- Sample activities and carbon tracking history
- Pre-defined achievements
- Curated sustainable businesses and educational articles
Dashboard โข Weekly Impact โข Activity Log โข Directory โข Learn Hub โข Profile
EcoBloom uses verified emission factors to calculate carbon impact:
| Activity | Emission Factor | Source |
|---|---|---|
| Car (petrol) | 0.21 kg COโ/km | EPA |
| Matatu/Bus | 0.089 kg COโ/km | IPCC |
| Boda Boda | 0.103 kg COโ/km | Kenya Transport |
| Beef meal | 6.61 kg COโ/meal | Our World in Data |
| Vegetarian meal | 1.7 kg COโ/meal | Our World in Data |
| Electricity (Kenya) | 0.35 kg COโ/kWh | Kenya Power |
| Recycling (plastic) | โ1.5 kg COโ/kg | EPA |
Carbon savings are calculated as the difference between typical consumption and sustainable alternatives.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Follow code standards
- Use existing patterns in the codebase
- Follow Kotlin coding conventions
- Write meaningful commit messages
- Submit a Pull Request
- Follow Kotlin Coding Conventions
- Use meaningful names for variables, functions, and classes
- Keep composables small and focused
This project is licensed under the MIT License โ see the LICENSE file for details.
- Wangari Maathai โ Inspiration for environmental conservation in Kenya
- M-KOPA โ Pioneering sustainable energy access in Africa
- Material Design 3 โ Design system and components
- Jetpack Compose โ Modern Android UI toolkit
- Project Link: github.com/muchaisam/ecobloom
- Issues: Report a bug
๐ Together, we can make a difference. One sustainable choice at a time. ๐ฑ
Made with ๐ in Kenya






