ReuseHub is a comprehensive Flutter-based mobile application that connects donors with seekers to facilitate the donation and reuse of items. The platform promotes sustainability by enabling users to give away items they no longer need to those who can benefit from them.
- Features
- Architecture
- Tech Stack
- Project Structure
- Installation
- Configuration
- Usage
- Security
- Testing
- Contributing
- Email/Password Authentication via Firebase Auth
- Role-based System: Users can be Donors, Seekers, or both
- Admin Approval System: New users require admin approval before full access
- Profile Management: Users can edit profiles with photos, bio, and contact info
- Public Profiles: View donor/seeker profiles with ratings and reviews
- Post Items: Donors can list items with images, descriptions, categories, and pickup addresses
- Browse Items: Public feed of all available items
- Item Details: View comprehensive item information with owner details
- Edit/Delete Items: Donors can manage their posted items
- Category & Condition Filters: Organize items by type and condition (New/Good/Used)
- Search Functionality: Find items by title, description, or category
- Send Requests: Seekers can request items from donors
- Request Management: Donors can approve/reject requests
- Status Tracking: Monitor request status (Pending/Approved/Rejected)
- Notifications: Real-time updates on request status
- In-app Chat: Private messaging between donors and seekers
- Real-time Communication: Powered by Firebase Firestore
- Chat History: Persistent conversation history
- Rate Donors: Seekers can leave reviews and ratings (1-5 stars)
- Public Reviews: Display on donor profiles
- Rating Summary: Average rating calculation with review count
- Immutable Reviews: Reviews cannot be edited or deleted (prevents abuse)
- ReuseHub Assistant: Draggable chatbot with 100+ intelligent responses
- Context-aware Help: Answers questions about app features
- Quick Actions: Pre-defined buttons for common queries
- Always Available: Accessible from all main screens
- Material Design 3: Modern, clean UI following Material guidelines
- Custom Fonts: Poppins and Google Fonts integration
- Responsive Design: Optimized for various screen sizes
- Bottom Navigation: Easy access to Home, Search, Profile
- Splash Screen: Branded startup experience
ReuseHub follows a clean architecture pattern with clear separation of concerns:
lib/
├── src/
│ ├── config/ # App configuration (routes, constants)
│ ├── models/ # Data models (User, Item, Message, Request)
│ ├── services/ # Business logic & Firebase/Supabase interactions
│ ├── providers/ # State management (Provider pattern)
│ ├── ui/ # User interface components
│ │ ├── screens/ # Full-page screens
│ │ └── widgets/ # Reusable UI components
│ └── utils/ # Helper functions & utilities
├── firebase_options.dart
└── main.dart # App entry point
- Provider Pattern: State management across the app
- Service Layer: Abstraction of backend operations
- Repository Pattern: Data access through services
- Singleton Pattern: Firebase/Supabase instances
- Flutter 3.8.1+ - Cross-platform mobile framework
- Dart SDK - Programming language
- Firebase
- Firebase Auth (Authentication)
- Cloud Firestore (Database)
- Firebase Storage (Legacy image storage)
- Supabase
- Supabase Storage (Primary image storage)
- Real-time subscriptions
name: software
description: "A new Flutter project."
version: 1.0.0+1
environment:
sdk: ^3.8.1
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.8
firebase_core: ^4.0.0 # Upgraded from 2.31.0
firebase_auth: ^6.0.0 # Upgraded from 4.17.6
cloud_firestore: ^6.0.0
firebase_storage: ^13.0.0
provider: ^6.1.2
uuid: ^4.3.3
cached_network_image: ^3.3.1
google_fonts: ^6.2.0
intl: ^0.20.2
flutter_svg: ^2.2.0
http: ^1.4.0
fluttertoast: ^8.2.12 # Keep latest
pin_code_fields: ^8.0.1
shared_preferences: ^2.5.3
supabase_flutter: ^2.10.1
image_picker: ^1.2.0
path: ^1.9.0
mime: ^2.0.0
url_launcher: ^6.1.7
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^6.0.0
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/data/
fonts:
- family: poppins
fonts:
- asset: fonts/Poppins-Regular.ttf
software/
├── android/ # Android native code
├── ios/ # iOS native code
├── lib/
│ ├── src/
│ │ ├── config/
│ │ │ └── routes.dart # Route definitions
│ │ ├── models/
│ │ │ ├── item.dart # Item model
│ │ │ ├── message.dart # Message model
│ │ │ ├── request.dart # Request model
│ │ │ └── user.dart # User model
│ │ ├── services/
│ │ │ ├── auth_service.dart # Authentication logic
│ │ │ ├── item_service.dart # Item CRUD operations
│ │ │ ├── messaging_service.dart # Chat functionality
│ │ │ ├── request_service.dart # Request handling
│ │ │ ├── review_service.dart # Review system
│ │ │ ├── storage_service.dart # Firebase Storage
│ │ │ └── supabase_image_service.dart # Supabase Storage
│ │ └── ui/
│ │ ├── screens/
│ │ │ ├── auth/ # Login/Signup screens
│ │ │ ├── role/ # Donor/Seeker dashboards
│ │ │ ├── profile/ # Profile screens
│ │ │ ├── admin/ # Admin approval
│ │ │ ├── home_screen.dart # Main feed
│ │ │ ├── search_screen.dart # Search interface
│ │ │ ├── item_detail_screen.dart # Item details
│ │ │ ├── create_item_screen.dart # Post new item
│ │ │ └── messaging_screen.dart # Chat interface
│ │ └── widgets/
│ │ ├── app_bottom_nav.dart # Bottom navigation
│ │ └── chatbot/ # AI assistant widget
│ ├── firebase_options.dart # Firebase config
│ └── main.dart # App entry point
├── assets/
│ └── images/ # Image assets
├── fonts/ # Custom fonts
├── scripts/ # Utility scripts
│ ├── create_public_profiles.js # Profile migration
│ └── migrate_public_profiles.js # Data migration
├── test/ # Unit tests
├── firestore.rules # Security rules
├── pubspec.yaml # Dependencies
└── README.md # This file
- Flutter SDK (3.8.1 or higher) - Install Flutter
- Dart SDK (3.8.1+)
- Android Studio / Xcode (for mobile development)
- Firebase Account - Create Firebase Project
- Supabase Account - Create Supabase Project
git clone https://github.com/pronad1/Flutter.git
cd Flutter/softwareflutter pub get- Create a Firebase project at Firebase Console
- Add Android/iOS apps to your Firebase project
- Download
google-services.json(Android) andGoogleService-Info.plist(iOS) - Place configuration files in appropriate directories:
android/app/google-services.jsonios/Runner/GoogleService-Info.plist
- Run Firebase CLI to generate
firebase_options.dart:
flutterfire configure- Create a Supabase project at Supabase Dashboard
- Create storage buckets:
profile-photos(Public)item-images(Public)
- Update Supabase credentials in
lib/main.dart:
await Supabase.initialize(
url: 'YOUR_SUPABASE_URL',
anonKey: 'YOUR_SUPABASE_ANON_KEY',
);firebase deploy --only firestore:rulesflutter runThe app uses Firebase for authentication and database. Configuration is stored in:
firebase_options.dart(auto-generated)firebase.json(deployment config)firestore.rules(security rules)
For production, consider using environment variables for sensitive data:
- Create
.envfile (add to.gitignore) - Use
flutter_dotenvpackage to load variables
To grant admin privileges to a user:
- Update Firestore manually:
db.collection('users').doc('USER_ID').update({
isAdmin: true
});- Or hardcode admin email in
routes.dart:
static const String _hardcodedAdminEmail = '[email protected]';- Sign Up → Choose "Donor" role → Wait for admin approval
- Post Items → Tap "+" → Fill item details → Upload photo
- Manage Requests → View requests on donor dashboard → Approve/Reject
- Chat with Seekers → Communicate after request approval
- Sign Up → Choose "Seeker" role → Wait for admin approval
- Browse Items → Home screen shows available items
- Request Items → Tap item → Tap "Request" button
- Track Requests → View status on seeker dashboard
- Rate Donors → Leave reviews after receiving items
- Access Admin Panel → Navigate to
/admin-approvalroute - Review New Users → Approve/reject pending users
- Moderate Content → Manage items, reviews, and reports
The app implements comprehensive security rules covering:
- User Authentication: All operations require authentication
- Role-based Access: Donors, Seekers, Admins have different permissions
- Data Validation: Input validation for ratings, reviews, requests
- Privacy Protection: Users can only access their own data
- Immutable Reviews: Prevents review manipulation
- Admin Controls: Special admin privileges for moderation
Key security features:
// Only authenticated users can create items
allow create: if isSignedIn() && request.resource.data.ownerId == request.auth.uid;
// Only item owner or admin can update
allow update: if (isSelf(resource.data.ownerId)) || isAdmin();
// Reviews are immutable
allow update, delete: if false;- ✅ Never expose API keys in version control
- ✅ Use environment variables for sensitive data
- ✅ Implement rate limiting on Firebase
- ✅ Enable Firebase App Check
- ✅ Regular security audits of Firestore rules
- ✅ Monitor Firebase usage for anomalies
flutter testtest/auth_test.dart- Authentication service teststest/item_test.dart- Item service teststest/messaging_test.dart- Messaging service teststest/widget_test.dart- Widget tests
- User registration and login
- Admin approval workflow
- Item posting and editing
- Request creation and approval
- Messaging between users
- Review submission
- Profile editing
- Image upload/delete
- Search functionality
- Chatbot interactions
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow Effective Dart guidelines
- Use meaningful variable and function names
- Add comments for complex logic
- Write unit tests for new features
This project is private and not licensed for public use. All rights reserved.
- Pronad - GitHub
For questions or support:
- Email: [email protected]
- Issues: GitHub Issues
- Flutter team for the amazing framework
- Firebase for backend services
- Supabase for storage solutions
- Material Design for UI inspiration
- Open source community for packages and tools
Current Version: 1.0.0+1
Status: Active Development
Last Updated: December 5, 2025
- Push notifications for requests and messages
- Item location mapping with Google Maps
- Advanced search filters (distance, category)
- User verification system
- Report inappropriate content
- Multi-language support
- Dark mode theme
- Social media sharing
- Item wishlists
- Donation history analytics
Built with ❤️ using Flutter