FreshCycle is a Flutter mobile application that helps reduce food waste by enabling users to track their pantry items, generate recipes from available ingredients, and buy, sell, or request surplus food from their local community.
- Add and track food items with expiry dates
- Categories: Produce, Dairy, Bakery, Meat & Fish, Meals & Leftovers, Snacks, Beverages
- Visual urgency indicators (safe, soon, critical)
- Automatic expiry notifications
- Barcode scanning support
- OCR scanning to extract expiry dates from photos (Google ML Kit)
- Track item costs
- Generate recipe suggestions from pantry items using Google Gemini AI
- Considers available ingredients and suggests missing basics via Marketplace requests
- Recipes include prep time, cook time, servings, ingredients, and step-by-step instructions
- Selling: Post surplus food items for sale at discounted prices, with photo uploads
- Requesting: Request food items that users need
- Location-based filtering (barangay-level)
- Seller profiles with ratings and verification
- Save favorite listings
- Direct messaging between buyers and sellers
- Real-time conversations between users
- Context-aware messaging (linked to specific listings)
- Unread message notifications
- Expiry warnings for pantry items
- New messages
- Listing saves by other users
- Offer updates (received, accepted, rejected)
- Authentication (email/password via Supabase Auth)
- Edit profile information
- Sprouts rewards system (earn points from listings and completed transactions, with confetti celebration)
- Location settings (barangay-level via geocoding)
- My listings management
| Component | Technology |
|---|---|
| Framework | Flutter |
| Language | Dart 3.9.2+ |
| State Management | Provider |
| Backend | Supabase (PostgreSQL + Auth) |
| AI | Google Gemini 2.5 Flash |
| Maps | Flutter Map + OpenStreetMap |
| Notifications | flutter_local_notifications |
| OCR | Google ML Kit (Text Recognition) |
| Storage | SharedPreferences |
lib/
├── main.dart # App entry point & navigation shell
├── data/
│ ├── db.dart # Supabase database operations
│ ├── sample_data.dart # Mock data for development
│ └── sample_recipes.dart # Sample recipes
├── models/
│ ├── listing.dart # Marketplace listing model
│ ├── messages.dart # Chat message model
│ ├── notification.dart # Notification model
│ ├── pantry_item.dart # Pantry item model
│ ├── recipe.dart # Recipe model
│ └── user.dart # User profile model
├── providers/
│ ├── auth_provider.dart # Authentication state
│ ├── listing_provider.dart # Marketplace listings state
│ ├── messages_provider.dart # Chat/messages state
│ ├── navigation_provider.dart # Bottom nav state
│ └── notifications_provider.dart # Notifications state
├── screens/
│ ├── edit_profile_screen.dart
│ ├── listing_detail_screen.dart
│ ├── marketplace_screen.dart
│ ├── messages_screen.dart
│ ├── my_listings_screen.dart
│ ├── notifications_screen.dart
│ ├── pantry_screen.dart
│ ├── post_listing_screen.dart
│ ├── post_request_screen.dart
│ ├── profile_screen.dart
│ ├── recipe_detail_screen.dart
│ ├── recipes_screen.dart
│ ├── request_detail_screen.dart
│ ├── rewards_screen.dart
│ ├── saved_items_screen.dart
│ └── settings_screen.dart
├── services/
│ ├── ai_recipe_service.dart # Gemini AI integration
│ ├── local_notification_service.dart
│ └── pantry_notification_service.dart
├── theme/
│ └── app_theme.dart # Material 3 theme configuration
└── widgets/ # Reusable UI components
- Flutter SDK (latest stable)
- Dart SDK 3.9.2+
- Supabase project (for backend)
- Google Gemini API key (for AI recipes)
-
Clone the repository
git clone <repository-url> cd FreshCycle
-
Install dependencies
flutter pub get
-
Configure environment variables
Copy
.env.exampleto.envand fill in your credentials:cp .env.example .env
-
Run the app
flutter run
profiles- User profiles with points systemlistings- Marketplace items (selling/requesting)conversations- Chat threads between usersmessages- Individual messagesnotifications- User notificationslocation_settings- User location preferencespantry_items- User pantry inventory
| Purpose | Color | Hex |
|---|---|---|
| Primary | Green | #1D9E75 |
| Primary Light | Light Green | #E1F5EE |
| Critical Urgency | Red | #E24B4A |
| Soon Urgency | Orange | #BA7517 |
| Safe Urgency | Green | #639922 |
| Request Badge | Purple | #534AB7 |
- Pantry - Track food items and expiry
- Recipes - AI-generated recipe suggestions
- Market - Buy/sell/request food items
- Notifications - Alerts and updates
- Profile - User settings and listings
This project is for educational/prototype purposes.