A mobile application that connects people with surplus food (from homes, restaurants, or events) to those in need. Users can list or request nearby leftover food, helping reduce food waste and fight hunger in the community.
KhaddoBondhu is an Android application built with Java that serves as a bridge between food donors and recipients. The app features a modern Material Design interface with real-time search capabilities, user role management, seamless food sharing functionality, and comprehensive user profile viewing.
- Android Studio (latest version)
- Java Development Kit (JDK) 8 or higher
- Firebase Project
- Cloudinary Account
- Google Maps API Key
-
Clone the repository
git clone https://github.com/robiul-islam-ridoy/KhaddoBondhu.git cd KhaddoBondhu
-
Configure Firebase
- Create a Firebase project at Firebase Console
- Download
google-services.json
and place it in theapp/
directory - Enable Authentication, Firestore, and Storage in Firebase Console
- Configure Authentication methods (Email/Password, Anonymous)
-
Configure Cloudinary
- Create a Cloudinary account at Cloudinary
- Copy
local.properties.template
tolocal.properties
- Fill in your Cloudinary credentials:
sdk.dir=C\:\\Android_sdk CLOUDINARY_CLOUD_NAME=your_cloud_name CLOUDINARY_API_KEY=your_api_key CLOUDINARY_API_SECRET=your_api_secret MAPS_API_KEY=your_google_maps_api_key
-
Build and Run
./gradlew build ./gradlew installDebug
- Never commit
local.properties
orgoogle-services.json
to version control - These files are already in
.gitignore
- Use environment variables for sensitive data in production
- Implement proper input validation and sanitization
- β User Authentication: Email/Password + Anonymous authentication
- β Food Post Management: Create, edit, and delete food posts
- β Image Upload: Cloudinary integration for efficient image storage
- β Real-time Database: Firestore for live data synchronization
- β User Profile Management: Comprehensive user profiles with statistics
- β Post Statistics: Analytics and insights for food posts
- β Modern UI: Material Design Components throughout the app
- β Advanced User Search: Search through all users (Individuals, Restaurants, NGOs)
- β Real-time Search: Instant search results as you type (after 2 characters)
- β Smart Filtering: Multi-choice filter by user types (Individual, Restaurant, NGO)
- β Large Card Display: Beautiful large cards for search results with user details
- β Smooth Scrolling: Optimized scrolling for both search results and default content
- β Pull-to-Refresh: Refresh content by pulling down (only in content area)
- β Search Results Count: Shows number of results found with search query
- β Empty State Handling: Proper messaging when no results are found
- β Read-Only Profile View: View any user's profile without editing capabilities
- β Dynamic Posts Loading: Load and display user's actual posts from Firebase
- β Circular Profile Pictures: Perfect circular profile images with proper styling
- β User Type Badges: Display user type (Individual, Restaurant, NGO) with colored badges
- β Dynamic Statistics: Real-time stats showing posts count, total views, and ratings
- β Clickable Posts: View detailed information of any post by clicking on it
- β View-Only Interface: No edit or delete buttons - purely for viewing
- β Responsive Design: Matches the main profile page design exactly
- β Comprehensive User Info: Display name, email, phone, bio, and user type
- β Slim Search Bar: Modern, compact search interface with rounded corners
- β Icon Visibility: Clear filter and search icons with proper tinting
- β Responsive Layout: Proper space allocation between search and content
- β Performance Optimized: Enhanced RecyclerView configuration for smooth scrolling
- β Layout Restructuring: FrameLayout implementation for proper content switching
- β Profile Picture Styling: Circular images with proper borders and backgrounds
- Language: Java
- Backend: Firebase (Authentication, Firestore, Storage)
- Image Storage: Cloudinary
- UI Framework: Material Design Components
- Image Loading: Glide
- Maps: Google Maps API
- Search: Custom search implementation with real-time filtering
- Build System: Gradle
- New Activity:
UserProfileViewActivity
for read-only profile viewing - Enhanced Firebase Service: Added methods for fetching user data and posts by user ID
- Dynamic Content Loading: Real-time loading of user posts and statistics
- Circular Image Implementation: Perfect circular profile pictures with proper styling
- View-Only Interface: Removed edit/delete functionality for external profile viewing
-
Layout Restructuring:
- Used FrameLayout to properly manage search results vs default content
- Eliminated space competition between different content areas
-
Enhanced Scrolling:
- Fixed scrolling issues and optimized RecyclerView performance
- Added
setHasFixedSize(false)
andsetItemViewCacheSize(20)
-
Real-time Search:
- Implemented TextWatcher for instant search results
- Triggers search after 2 characters for optimal performance
-
Filter System:
- Multi-choice dialog for filtering by user types
- Supports Individual, Restaurant, and NGO filtering
-
UI/UX Enhancements:
- Slim search bar with proper icon visibility
- Smooth transitions between search and default content
- Proper empty state handling
-
Profile View System:
- Circular profile pictures with proper background styling
- Dynamic posts loading with comprehensive error handling
- Real-time statistics calculation from actual post data
- Seamless navigation between explore and profile views
The application has been thoroughly tested for:
- Search functionality with various query types
- Filter system with multiple user types
- Scrolling performance on different screen sizes
- Pull-to-refresh functionality
- UI responsiveness and layout stability
- User profile viewing and post interaction
- Circular image rendering and styling
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Java coding conventions
- Use meaningful commit messages
- Test on multiple Android versions
- Ensure proper error handling
- Document new features
This project is licensed under the MIT License - see the LICENSE file for details.
- Mahbob Alam - Lead Developer, Project Maintainer
- Robiul Islam Ridoy - Lead Developer, Project Maintainer
- Shafayet Islam - Developer, Project Planner
- Firebase for backend services
- Cloudinary for image storage
- Material Design for UI components
- The open-source community for various libraries
Made with β€οΈ for reducing food waste and helping communities