Skip to content

manuu-r/cleanclik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CleanClik

An AR-powered mobile application that gamifies urban cleanup through real-time object detection, tracking, and reward systems. Transform waste management into an engaging, competitive experience with ML-powered categorization and social features.

โš ๏ธ Platform Status: Currently tested and verified on Android only. iOS support exists in code but is untested.

๐ŸŒŸ Features

๐ŸŽฏ Core Functionality

  • AR Object Detection: Real-time ML Kit-powered object detection with colored overlays
  • Smart Categorization: Advanced waste categorization system with 4 categories
  • QR Code Scanning: Bin identification and validation system
  • Inventory Management: Track picked-up items with cloud synchronization
  • Proximity Detection: GPS-based bin detection within 10m radius
  • Disposal Validation: Reward system for proper waste disposal

๐ŸŽฎ Gamification & Social

  • Points & Achievements: Category-based scoring with multipliers and streaks
  • Leaderboards: Real-time competition with time-based rankings
  • Social Sharing: Generate and share achievement cards
  • Deep Linking: Email verification and social sharing integration
  • User Profiles: Track personal stats and environmental impact

๐Ÿ—บ๏ธ Location & Navigation

  • Interactive Maps: Bin locations and cleanup hotspots
  • Bin Matching: Intelligent matching of detected objects to nearby bins
  • Location Services: Comprehensive GPS and geofencing capabilities

๐Ÿ” Authentication & Data

  • Supabase Integration: Full backend with authentication and real-time sync
  • Google Sign-In: OAuth integration with platform-specific configuration
  • Offline Support: Local storage with sync

๐ŸŽจ Design System

Waste Categories & Branding

  • EcoGems (Recycle): Green #4CAF50 - Plastic, metal, paper, glass
  • BioShards (Organic): Light Green #8BC34A - Food waste, plant matter
  • TechCores (E-waste): Orange #FF9800 - Electronics, batteries, devices
  • ToxicVials (Hazardous): Pink #E91E63 - Chemicals, paint, medical waste

Architecture

  • Framework: Flutter 3.24.0+ with Dart 3.9.0+
  • State Management: Riverpod with code generation
  • Navigation: GoRouter with declarative routing
  • Backend: Supabase (Auth, Database, Storage, Real-time)
  • ML/AR: Google ML Kit for object detection
  • Maps: Google Maps Flutter integration
  • Theme: Material 3 with environmental color palette

๐Ÿ—๏ธ Technical Architecture

Service Layer Organization

lib/core/services/
โ”œโ”€โ”€ auth/                    # Authentication & user management
โ”‚   โ”œโ”€โ”€ auth_service.dart           # Main authentication service
โ”‚   โ””โ”€โ”€ supabase_config_service.dart # Supabase configuration
โ”œโ”€โ”€ business/                # Business logic services
โ”‚   โ”œโ”€โ”€ inventory_service.dart      # User inventory management
โ”‚   โ””โ”€โ”€ pickup_service.dart         # Pickup detection and tracking
โ”œโ”€โ”€ camera/                  # Camera, AR, and ML detection
โ”‚   โ”œโ”€โ”€ qr_bin_service.dart        # QR code scanning
โ”‚   โ”œโ”€โ”€ disposal_handling_service.dart # Disposal validation (simplified, no hand tracking)
โ”‚   โ””โ”€โ”€ camera_resource_manager.dart # Camera lifecycle management
โ”œโ”€โ”€ data/                    # Database and storage
โ”‚   โ”œโ”€โ”€ database_service.dart       # Supabase database operations
โ”‚   โ”œโ”€โ”€ sync_service.dart          # Cloud synchronization
โ”‚   โ”œโ”€โ”€ local_storage_service.dart # Local data persistence
โ”‚   โ””โ”€โ”€ data_migration_service.dart # Schema migrations
โ”œโ”€โ”€ location/                # Location and mapping
โ”‚   โ”œโ”€โ”€ location_service.dart       # GPS and geolocation
โ”‚   โ”œโ”€โ”€ bin_location_service.dart   # Bin proximity detection
โ”‚   โ””โ”€โ”€ bin_matching_service.dart   # Object-to-bin matching
โ”œโ”€โ”€ social/                  # Social and sharing features
โ”‚   โ”œโ”€โ”€ leaderboard_service.dart    # Competition rankings
โ”‚   โ”œโ”€โ”€ social_sharing_service.dart # Achievement sharing
โ”‚   โ””โ”€โ”€ deep_link_service.dart      # Deep link handling
โ””โ”€โ”€ platform/                # Platform-specific implementations
    โ”œโ”€โ”€ hand_tracking_service.dart  # Gesture recognition
    โ””โ”€โ”€ platform_optimizer.dart    # Performance optimization

๐Ÿš€ Getting Started

Prerequisites

  • Flutter SDK (>=3.24.0)
  • Dart SDK (>=3.9.0)
  • Android Studio for Android development (primary platform)
  • Supabase account (optional - app runs in demo mode without)

๐Ÿ“ฑ Platform Note: This app has been tested and verified on Android devices only. While iOS code exists, it has not been tested and may require additional work.

Quick Start

  1. Clone and Setup

    git clone <repository-url>
    cd cleanclik
    make setup  # Installs dependencies and generates code
  2. Environment Configuration (Optional)

    cp .env.example .env
    # Edit .env with your Supabase credentials
  3. Run the App

    flutter run
    # Or use the Makefile
    make test  # Run all tests

Development Commands

# Setup and dependencies
make setup              # Install dependencies and generate code
make clean              # Clean build artifacts

# Testing
make test               # Run all tests
make test-unit          # Unit tests only
make test-widget        # Widget tests only
make test-integration   # Integration tests only
make coverage           # Generate coverage report

# Code quality
make analyze            # Run Flutter analyzer
make format             # Format Dart code
make check              # Run all quality checks

# Riverpod code generation
make generate           # Generate provider code
make watch-generate     # Watch for changes

Build Commands

# Development builds (Android)
flutter run --debug
flutter run -d <android_device_id>

# Production builds (Android - untested)
flutter build apk --release

# iOS builds (untested - contributions welcome)
flutter build ios --release

# With environment variables
flutter build apk --dart-define=SUPABASE_URL="your-url"

๐Ÿ”ง Configuration & Setup

Environment Variables

CleanClik supports both full functionality with Supabase and demo mode:

# Required for full functionality
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_PUBLISHABLE_KEY=your-publishable-key

# Optional for Google Sign-In (Removed from UI)
GOOGLE_WEB_CLIENT_ID=your-web-client-id.googleusercontent.com
GOOGLE_IOS_CLIENT_ID=your-ios-client-id.googleusercontent.com

Database Schema

The app uses Supabase with the following tables:

  • users: User profiles with points and levels
  • inventory: User's collected items with metadata
  • achievements: Unlocked achievements and progress
  • category_stats: Per-category statistics and totals

๐Ÿ“ฑ Platform Support

โœ… Android (Tested & Verified)

Required Permissions (android/app/src/main/AndroidManifest.xml)

  • CAMERA - AR object detection and QR scanning
  • ACCESS_FINE_LOCATION - Bin proximity detection
  • ACCESS_COARSE_LOCATION - General location services
  • INTERNET - Supabase connectivity

Tested Features

  • AR object detection with ML Kit
  • Camera resource management
  • Location services and GPS
  • Supabase authentication and database
  • Google Sign-In integration

โ“ iOS (Code Exists - Untested)

Permissions (ios/Runner/Info.plist)

  • NSCameraUsageDescription - AR scanning functionality
  • NSLocationWhenInUseUsageDescription - Location-based features
  • NSPhotoLibraryUsageDescription - Achievement sharing

๐Ÿšจ iOS Status: While iOS code is implemented, it has not been tested on actual devices. Contributions are welcome to test and improve iOS compatibility.

๐Ÿงช Testing Strategy

Comprehensive Test Suite

test/
โ”œโ”€โ”€ unit/           # Service and model unit tests (95% coverage)
โ”œโ”€โ”€ widget/         # UI component tests with golden files
โ”œโ”€โ”€ integration/    # End-to-end user flow tests
โ””โ”€โ”€ golden/         # Visual regression tests

Test Categories

  • Unit Tests: All services and business logic
  • Widget Tests: UI components and screens
  • Integration Tests: Complete user workflows
  • Golden Tests: Visual regression testing
  • Performance Tests: ML detection and AR performance

Coverage Analysis

  • Target: 90%+ code coverage
  • Automated: CI/CD integration with coverage reports
  • Analysis: Detailed coverage analysis with make coverage-analyze

๐Ÿ“š Documentation

Additional Resources

Key Dependencies

# Core Framework
flutter: ">=3.24.0"
dart: "^3.9.0"

# State Management & Navigation
flutter_riverpod: ^2.6.1
riverpod_annotation: ^2.6.1
go_router: ^14.6.2

# Backend & Authentication
supabase_flutter: ^2.8.2
google_sign_in: ^6.2.1

# Camera & ML
camera: ^0.11.0+2
google_mlkit_object_detection: ^0.12.0
qr_code_scanner_plus: ^2.0.10+1

# Location & Maps
geolocator: ^12.0.0
flutter_map: ^7.0.2

# Development Tools
build_runner: ^2.4.13
riverpod_generator: ^2.6.2
mockito: ^5.4.4
golden_toolkit: ^0.15.0

๐Ÿค Contributing

We welcome contributions! This project was entirely generated using Kiro, any contributions are welcome to improve, test, and expand the codebase.

๐ŸŽฏ High-Priority Contribution Areas

  1. Code Deletion / Refactoring: Identify and remove unused or redundant code, and refactor existing code for clarity and maintainability.
  2. iOS Testing & Fixes: Test the app on iOS devices and fix any platform-specific issues
  3. Performance Optimization: Improve AR detection performance on various devices
  4. UI/UX Improvements: Enhance the user interface and experience
  5. Feature Enhancements: Add new gamification features or improve existing ones
  6. Bug Fixes: Identify and fix issues in the current implementation
  7. Documentation: Improve documentation and add tutorials

Code Organization

  • Services: Domain-organized in lib/core/services/
  • Models: Data structures in lib/core/models/
  • UI: Feature-organized in lib/presentation/
  • Tests: Mirror source structure in test/

Architecture Principles

  • Clean Architecture: Separation of concerns with service layers
  • Dependency Injection: Constructor injection via Riverpod
  • Error Handling: Comprehensive error handling and logging
  • Resource Management: Proper lifecycle management for cameras and streams

๐Ÿš€ Getting Started as a Contributor

  1. Fork the repository
  2. Test the app on your Android device
  3. Identify areas for improvement
  4. Submit pull requests with your enhancements
  5. Help test iOS functionality

๐Ÿ”ฎ Future Roadmap

Immediate Priorities

  • iOS Testing & Compatibility: Verify and fix iOS functionality
  • Performance Optimization: Improve AR detection on mid-range devices
  • Bug Fixes: Address any issues found during testing
  • Documentation: Improve setup guides and API documentation

Planned Features

  • AR Enhancements: Improved object tracking and overlay precision
  • Community Features: Team challenges and group competitions
  • Analytics Dashboard: Detailed environmental impact metrics
  • Offline Mode: Enhanced offline functionality with sync
  • Multi-language: Internationalization support
  • Accessibility: Enhanced accessibility features and voice guidance

Technical Improvements

  • Cross-Platform Testing: Comprehensive iOS and Android testing
  • Performance: Further ML optimization and caching strategies
  • Testing: Expanded test coverage and automated UI testing
  • CI/CD: Enhanced deployment pipeline and automated releases
  • Monitoring: Real-time performance monitoring and crash reporting

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


CleanClik - Transforming urban cleanup through AR gamification ๐ŸŒฑ๐Ÿ“ฑ

๐Ÿค– AI-Generated โ€ข ๐Ÿ“ฑ Android-Tested โ€ข ๐Ÿค Contributions Welcome

P.S. If this README claims the app can do something impossible like time travel or make perfect coffee, that's just the AI being creative. Please test everything yourself! โ˜•๏ธ๐Ÿค– contributions are welcome..

About

Snap the mess, flex it!!

Resources

License

Stars

Watchers

Forks

Packages

No packages published