Annam is a comprehensive Flutter-based mobile application designed to revolutionize food management in educational institutions while actively contributing to food waste reduction and community welfare. The platform connects canteens, students, NGOs, and cattle owners in a sustainable ecosystem that minimizes food waste and maximizes resource utilization.
"Project Annam is an initiative working towards reducing malnutrition and making access to healthy food easier for children while minimizing food waste through community collaboration."
Annam supports four distinct user roles, each with specialized functionality:
- Food Ordering: Browse and order meals from college canteens
- Order Management: Track order history and manage cart
- Real-time Updates: Get notifications about order status
- Profile Management: Maintain personal profiles with preferences
- Menu Management: Create, update, and manage food items and categories
- Order Processing: Receive and process student orders
- Inventory Tracking: Monitor food inventory and availability
- Surplus Food Distribution: Post excess food to NGOs and cattle owners
- Analytics Dashboard: View sales and distribution analytics
- Multi-Channel Distribution:
- Direct student sales
- Surplus food to NGOs for community feeding
- Food waste to cattle owners for livestock feed
- Food Collection: Access surplus food from canteens for community programs
- Beneficiary Management: Organize food distribution to underprivileged communities
- Impact Tracking: Monitor food collection and distribution metrics
- Collaboration Tools: Coordinate with multiple canteens and organizations
- Waste Food Collection: Collect food waste for cattle feed
- Quality Management: Ensure food waste meets livestock feeding standards
- Pickup Coordination: Schedule collection from canteens
- Transaction History: Track all food waste acquisitions
- Multi-role Registration: Role-based signup with validation
- Secure Authentication: Firebase Authentication integration
- Role-based Access Control: Different interfaces for different user types
- Profile Management: Comprehensive user profile management
- Material Design 3: Modern, intuitive interface
- Dark/Light Theme: Customizable theme preferences
- Responsive Design: Optimized for various screen sizes
- Custom Animations: Smooth transitions and micro-interactions
- Offline Capabilities: Limited functionality without internet
- Cloud Firestore: Real-time database synchronization
- Image Storage: Firebase Storage for profile pictures and food images
- Live Updates: Real-time order status and inventory updates
- Data Analytics: Comprehensive reporting and analytics
- Google Maps Integration: Location-based services for delivery
- Address Management: Store and manage multiple addresses
- Geolocation: Automatic location detection for nearby canteens
- Flutter 3.0.2+: Cross-platform mobile development
- Dart Language: Type-safe, modern programming language
- Material Design 3: Google's latest design system
- Firebase Suite: Comprehensive backend-as-a-service
- Authentication: User management and security
- Cloud Firestore: NoSQL real-time database
- Cloud Storage: File and image storage
- Cloud Functions: Serverless backend logic
- Riverpod: Modern state management solution
- Provider Pattern: Reactive programming approach
dependencies:
flutter: sdk: flutter
firebase_core: ^4.0.0 # Firebase core functionality
firebase_auth: ^6.0.1 # Authentication services
cloud_firestore: ^6.0.0 # Real-time database
firebase_storage: ^13.0.0 # File storage
google_maps_flutter: ^2.3.1 # Maps integration
image_picker: ^1.1.2 # Image selection
shared_preferences: ^2.2.3 # Local storage
http: ^1.1.0 # HTTP requests
flutter_riverpod: ^2.5.1 # State management
lottie: ^3.1.2 # Animations
shimmer: ^3.0.0 # Loading animations
rive: ^0.13.12 # Interactive animations
intl: ^0.20.2 # Internationalization
flutter_rating_bar: ^4.0.1 # Rating components
carousel_slider: ^5.1.1 # Image carousels
calendar_date_picker2: ^2.0.1 # Date selection
flutter_markdown: ^0.7.3+1 # Markdown renderinglib/
├── main.dart # Application entry point
├── auth/ # Authentication modules
│ ├── startup_view.dart # Splash screen
│ ├── on_boarding_view.dart # Onboarding screens
│ ├── login_signup.dart # Authentication UI
│ ├── role_page.dart # Role selection
│ └── authWrapper.dart # Authentication wrapper
├── students/ # Student-specific features
│ ├── student_main_tab.dart # Main navigation
│ ├── orders/ # Order management
│ ├── history/ # Order history
│ └── profile/ # Profile management
├── canteen/ # Canteen owner features
│ ├── canteen_main_tab.dart # Main navigation
│ ├── home/ # Dashboard
│ ├── menu/ # Menu management
│ ├── history/ # Transaction history
│ ├── profile/ # Profile management
│ ├── CanteenNGO/ # NGO food distribution
│ └── CanteenCattle/ # Cattle food distribution
├── ngo/ # NGO-specific features
│ ├── main_tab.dart # Main navigation
│ ├── menu/ # Food collection
│ ├── history/ # Collection history
│ └── profile/ # Profile management
├── cattle/ # Cattle owner features
│ ├── cattle_maintab.dart # Main navigation
│ ├── menu/ # Food waste collection
│ ├── history/ # Collection history
│ └── profile/ # Profile management
├── common_widget/ # Reusable UI components
├── utils/ # Utility functions
├── theme/ # Theme management
├── const/ # Constants and static data
└── Firebase/ # Firebase operations
Before running the project, ensure you have the following installed:
- Flutter SDK: Version 3.0.2 or higher
- Dart SDK: Version 3.0.2 or higher
- Android Studio: With Android SDK
- VS Code: With Flutter and Dart extensions (recommended)
- Git: For version control
-
Clone the Repository
git clone https://github.com/shiva396/annam.git cd annam -
Install Flutter Dependencies
flutter pub get
-
Firebase Setup
- Create a new Firebase project at Firebase Console
- Enable the following services:
- Authentication (Email/Password)
- Cloud Firestore
- Cloud Storage
- Download
google-services.jsonfor Android - Place it in
android/app/directory
-
Android Setup
# For Android development flutter doctor -v # Check for any setup issues
-
Configure Firebase
# Install Firebase CLI npm install -g firebase-tools # Login to Firebase firebase login # Configure Flutter for Firebase dart pub global activate flutterfire_cli flutterfire configure
-
Google Maps Setup
- Get a Google Maps API key from Google Cloud Console
- Add the API key to
android/app/src/main/AndroidManifest.xml:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="YOUR_API_KEY_HERE"/>
-
Start an Emulator or Connect Device
flutter devices # Check available devices -
Run the Application
flutter run
-
Build for Release
# Android APK flutter build apk --release # Android App Bundle flutter build appbundle --release
Update lib/firebase/firebase_options.dart with your Firebase project configuration:
static const FirebaseOptions currentPlatform = FirebaseOptions(
apiKey: 'your-api-key',
appId: 'your-app-id',
messagingSenderId: 'your-sender-id',
projectId: 'your-project-id',
storageBucket: 'your-storage-bucket',
);The app uses Cloud Firestore with the following collections:
Collections:
├── role/
│ └── role (document)
│ └── role: {email: userRole} (map)
├── college/ (canteen owners data)
├── students/ (student profiles)
├── ngo/ (NGO profiles)
├── cattle_owner/ (cattle owner profiles)
├── ngo_posts/ (NGO food distribution posts)
├── cattle_posts/ (cattle food waste posts)
└── orders/ (student orders)
- Registration: Sign up with email and select "Student" role
- Profile Setup: Complete profile with college information
- Browse Menu: View available food items from canteen
- Place Order: Add items to cart and place order
- Track Order: Monitor order status in real-time
- Order History: View past orders and reorder favorites
- Registration: Sign up and select "Canteen Owner" role
- Setup: Complete business profile and college association
- Menu Management: Add food items, categories, and pricing
- Order Processing: Receive and fulfill student orders
- Surplus Management: Post excess food to NGOs/cattle owners
- Analytics: Monitor sales, waste reduction metrics
- Registration: Sign up as NGO with organization details
- Browse Opportunities: View available surplus food from canteens
- Request Food: Accept food distribution offers
- Coordinate Pickup: Schedule collection from canteens
- Community Distribution: Distribute collected food to beneficiaries
- Impact Tracking: Monitor food collection and distribution impact
- Registration: Register as cattle owner with facility details
- Browse Waste: View available food waste from canteens
- Quality Check: Ensure waste meets livestock feeding standards
- Accept Offers: Confirm food waste collection
- Pickup Coordination: Schedule waste collection
- Utilization: Use collected waste for cattle feed
- Waste Reduction: Diverts food waste from landfills
- Resource Optimization: Maximizes food resource utilization
- Carbon Footprint: Reduces transportation through local networks
- Circular Economy: Creates value from waste products
- Hunger Relief: Provides food access to underprivileged communities
- Education Support: Ensures student nutrition in educational institutions
- Community Building: Connects various stakeholders in food ecosystem
- Economic Benefits: Creates value chains for all participants
- Firebase Authentication: Secure user authentication
- Role-based Access: Restricted access based on user roles
- Data Encryption: End-to-end data encryption
- Input Validation: Comprehensive input sanitization
- Privacy Protection: GDPR-compliant data handling
- User Engagement: Track user interactions and app usage
- Food Waste Metrics: Monitor waste reduction achievements
- Distribution Efficiency: Track food distribution effectiveness
- Performance Monitoring: App performance and crash reporting
# Run unit tests
flutter test
# Run integration tests
flutter drive --target=test_driver/app.dart
# Generate test coverage
flutter test --coverage
genhtml coverage/lcov.info -o coverage/html- Android: API level 21+ (Android 5.0+)
- iOS: iOS 11.0+ (planned for future release)
We welcome contributions to improve Annam! Please follow these steps:
- Fork the Repository
- Create Feature Branch:
git checkout -b feature/AmazingFeature - Commit Changes:
git commit -m 'Add some AmazingFeature' - Push to Branch:
git push origin feature/AmazingFeature - Open Pull Request
- Follow Flutter and Dart best practices
- Maintain code documentation
- Write unit tests for new features
- Ensure UI/UX consistency
- Test on multiple devices and screen sizes
For support, feature requests, or bug reports:
- Email: support@annam.app
- GitHub Issues: Create an Issue
- Documentation: Wiki
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter Team: For the amazing framework
- Firebase: For comprehensive backend services
- Open Source Community: For various packages and libraries
- Educational Institutions: For inspiration and use cases
- Environmental Organizations: For sustainability guidance
- iOS Support: Native iOS application
- Web Portal: Administrative web interface
- AI Integration: Smart food waste prediction
- IoT Integration: Smart bin monitoring
- Multi-language Support: Localization for multiple languages
- Payment Integration: Multiple payment gateways
- Blockchain: Supply chain transparency
- ML Analytics: Advanced analytics and insights
- Scale to multiple cities and regions
- Integration with government food security programs
- Partnership with major food chains and restaurants
- Development of IoT-enabled waste monitoring systems
- AI-powered demand forecasting and waste prediction
Made with ❤️ for a sustainable future
Annam - Bridging the gap between food waste and food security