A location-based marketplace Android application that allows users to buy and sell items with AI-powered image recognition and real-time chat functionality.
- User registration and login
- Email-based authentication with Firebase Auth
- Password reset functionality
- Secure user session management
- Post Creation: Users can create listings with photos, descriptions, and prices
- AI Image Recognition: Automatic object detection and classification using Google ML Kit
- Location-Based Discovery: Find items near your location using GPS
- Real-time Chat: Communicate with sellers through post-specific chat rooms
- User Profiles: Manage your own posts and account information
- Explore: Browse all available posts from other users with distance calculations
- Chat: View and participate in conversations for all posts
- Profile: Manage your posts and account settings
- Post Details: View detailed information about items including AI descriptions
- Language: Kotlin
- UI Framework: Android Views with ViewBinding
- Architecture: Activity-based with Firebase integration
- Authentication: Firebase Auth
- Database: Cloud Firestore
- Storage: Firebase Storage for images
- ML/AI: Google ML Kit for object detection
- Firebase SDK (Auth, Firestore, Storage)
- Google Play Services (Location, Maps)
- ML Kit Object Detection
- Picasso for image loading
- CircleImageView for profile pictures
app/src/main/java/com/example/peerstore/
βββ MainActivity.kt # Splash screen
βββ SingInActivity.kt # User login
βββ SingUpActivity.kt # User registration
βββ ForgotPasswordActivity.kt # Password reset
βββ ExploreActivity.kt # Browse posts
βββ ChatActivity.kt # View all chats
βββ PostChatActivity.kt # Individual post chat
βββ ProfileActivity.kt # User profile
βββ CreatePostActivity.kt # Create new post
βββ PostInfoActivity.kt # Post details
βββ PostChatActivity.kt # Chat for specific post
- Android Studio Arctic Fox or later
- Android SDK API 24+
- Google Services JSON configuration file
-
Clone the repository
git clone <repository-url> cd peer-store
-
Firebase Setup
- Create a new Firebase project at console.firebase.google.com
- Enable Authentication (Email/Password)
- Enable Cloud Firestore
- Enable Firebase Storage
- Download
google-services.jsonand place it inapp/
-
Configure Permissions The app requires the following permissions:
INTERNET- For Firebase connectivityACCESS_FINE_LOCATION- For location-based featuresACCESS_COARSE_LOCATION- For location servicesCAMERA- For taking photos of items
-
Build and Run
./gradlew assembleDebug
When users create posts, the app automatically analyzes uploaded photos using Google ML Kit to:
- Detect objects in images
- Generate confidence scores for identified items
- Provide automatic descriptions to supplement user descriptions
- Calculate distances between user location and posted items
- Display items sorted by proximity
- GPS integration for accurate positioning
- Post-specific chat rooms stored in Firestore
- Real-time message synchronization
- User identification in chat messages
- Clean, Material Design-inspired interface
- Bottom navigation for easy screen switching
- Image rotation handling for camera captures
- Responsive layouts for different screen sizes
{
"posts": ["postId1", "postId2", ...]
}{
"title": "Item title",
"image": "https://firebase-storage-url",
"imageName": "unique-image-name.jpg",
"descriptionAI": "AI-generated description",
"descriptionOwner": "User description",
"price": "100",
"owner": "userId",
"latitude": 40.7128,
"longitude": -74.0060,
"globalChat": ["userId_message1", "userId_message2", ...]
}- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Create a Pull Request
- User authentication handled securely through Firebase Auth
- Database rules should be configured to ensure users can only modify their own data
- Image uploads are processed through Firebase Storage with proper access controls
- Location data is used only for distance calculations and not stored permanently
- Push notifications for new messages
- Advanced search and filtering options
- User ratings and reviews system
- Payment integration
- Enhanced AI descriptions with more detailed analysis
- Dark mode support
- Multi-language support
This project is available under the MIT License. See LICENSE file for more details.
For issues and questions, please create an issue in the repository or contact the development team.