Skip to content

suryagit-31/Classify-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ Classify - AI-Powered Second-Hand Mobile App

Home Screen Marketplace Feed - Browse items in a beautiful 2-column grid layout

Item Details Screen Item Details - View full item information with direct seller contact

Sell Item Screen Sell Item - Create listings with AI-powered description generation

πŸ“– About Classify Mobile

Classify App is a modern, AI-powered marketplace mobile application built with React Native that revolutionizes the way people buy and sell second-hand items. The app combines cutting-edge AI technology with location-based discovery to create a seamless buying and selling experience.

What Makes Classify Special?

  • πŸ€– AI-Powered Descriptions: Generate compelling, sales-oriented item descriptions automatically using Google Gemini AI - just enter your title, price, and category!
  • πŸ“ Location-Based Discovery: Find items near you with intelligent geospatial search powered by MongoDB's 2dsphere indexing
  • πŸ“ž Direct Seller Contact: Connect with sellers instantly via one-tap phone calling - no chat delays
  • 🎨 Premium UI/UX: Beautiful, modern interface with clean design principles and smooth navigation
  • πŸ“± Cross-Platform: Native performance on both iOS and Android with a single codebase

✨ Key Features

🏠 Marketplace Feed

  • 2-Column Grid Layout: Beautiful card-based design showcasing items with images, prices, and categories
  • Location-Based Filtering: Automatically shows items near your location
  • Distance Display: See how far each item is from you with map pin indicators
  • Category Badges: Quick visual identification of item categories (Electronics, Furniture, Clothing, Vehicles, Other)
  • Pull-to-Refresh: Easy content refresh with a simple swipe
  • Floating Action Button: Quick access to create new listings

πŸ“± Item Details Screen

  • Immersive Image Display: Full-width hero images with gradient overlay for better visibility
  • Comprehensive Information: Title, price, category, and detailed descriptions
  • Seller Contact Section: Direct access to seller name and phone number
  • One-Tap Calling: Initiate phone calls directly from the app
  • Sheet-Style Layout: Modern bottom sheet design for smooth content presentation

✨ Sell Item Screen

  • Image Upload: Easy photo capture from camera or gallery with Cloudinary integration
  • Smart Form Fields: Title, price, category, and description inputs
  • AI Description Generator:
    • Enter title, price, and category
    • Click "✨ Generate Description with AI"
    • Get a persuasive, sales-oriented description automatically
  • Category Selection: Horizontal chip-based category picker
  • Seller Information: Name and phone number fields for direct contact
  • Form Validation: Comprehensive validation before submission

πŸ” Location Services

  • Automatic Location Detection: Uses device GPS to find your current location
  • Geospatial Queries: MongoDB 2dsphere index for efficient location-based searches
  • Radius Filtering: Find items within a specified radius (default: 10km)
  • Fallback Support: Graceful handling when location permissions are denied

πŸš€ Tech Stack

Frontend

Technology Version Purpose
React Native 0.83.0 Cross-platform mobile framework
TypeScript 5.8.3 Type-safe development
React Navigation 6.1.9 Native stack navigation
Axios 1.6.2 HTTP client for API calls
React Native Image Picker 7.0.3 Camera & gallery integration
Geolocation 3.4.0 Location services
Safe Area Context 5.5.2 Handle device notches and safe areas

Backend

Technology Version Purpose
Node.js >=20 Runtime environment
Express.js 4.18.2 RESTful API server
MongoDB Latest NoSQL database
Mongoose 8.0.3 MongoDB ODM
Cloudinary 1.41.0 Image storage & CDN
Google Gemini AI 0.24.1 AI description generation
Multer 1.4.5 File upload handling
CORS 2.8.5 Cross-origin resource sharing

Design System

  • Color Palette: Modern, clean colors with primary blue (#2563EB) and emerald green (#10B981)
  • Typography: Consistent font sizes and weights for headings, body, and subtle text
  • Spacing: Comfortable padding and margins (16px minimum on screen edges)
  • Shadows: Subtle iOS-style shadows for depth
  • Border Radius: 12px for small elements, 16px for cards, 24px for large buttons

πŸ“‹ Implementation Details

Architecture

Classify/
β”œβ”€β”€ src/                          # Frontend React Native code
β”‚   β”œβ”€β”€ components/               # Reusable UI components
β”‚   β”‚   β”œβ”€β”€ Icon.tsx             # Custom icon component
β”‚   β”‚   └── ItemCard.tsx         # Item card for marketplace
β”‚   β”œβ”€β”€ constants/                # App constants
β”‚   β”‚   └── designSystem.ts      # Design system (colors, typography, spacing)
β”‚   β”œβ”€β”€ hooks/                    # Custom React hooks
β”‚   β”‚   └── useLocation.ts       # Location detection hook
β”‚   β”œβ”€β”€ navigation/               # Navigation setup
β”‚   β”‚   └── AppNavigator.tsx     # Stack navigator configuration
β”‚   β”œβ”€β”€ screens/                  # App screens
β”‚   β”‚   β”œβ”€β”€ HomeScreen.tsx       # Marketplace feed
β”‚   β”‚   β”œβ”€β”€ ItemDetailScreen.tsx # Item details view
β”‚   β”‚   └── SellItemScreen.tsx   # Create listing form
β”‚   β”œβ”€β”€ services/                 # API services
β”‚   β”‚   └── api.ts               # Axios-based API client
β”‚   └── types/                    # TypeScript type definitions
β”‚       β”œβ”€β”€ item.ts              # Item interfaces
β”‚       └── navigation.ts        # Navigation types
β”‚
β”œβ”€β”€ backend/                      # Backend Node.js/Express server
β”‚   β”œβ”€β”€ config/                   # Configuration files
β”‚   β”‚   β”œβ”€β”€ cloudinary.js        # Cloudinary setup
β”‚   β”‚   └── database.js          # MongoDB connection
β”‚   β”œβ”€β”€ controllers/              # Request handlers
β”‚   β”‚   β”œβ”€β”€ aiController.js      # AI description generation
β”‚   β”‚   └── itemController.js    # Item CRUD operations
β”‚   β”œβ”€β”€ middleware/               # Express middleware
β”‚   β”‚   └── upload.js            # Multer file upload config
β”‚   β”œβ”€β”€ models/                   # Mongoose schemas
β”‚   β”‚   └── Item.js              # Item model with geospatial index
β”‚   β”œβ”€β”€ routes/                   # API routes
β”‚   β”‚   β”œβ”€β”€ aiRoutes.js          # AI endpoints
β”‚   β”‚   └── itemRoutes.js        # Item endpoints
β”‚   β”œβ”€β”€ utils/                    # Utility functions
β”‚   β”‚   └── cloudinaryUpload.js  # Image upload helper
β”‚   └── server.js                 # Express server entry point
β”‚
└── docs/                         # Documentation
    β”œβ”€β”€ SETUP.md                  # Setup instructions
    β”œβ”€β”€ TECH_STACK.md             # Technology details
    └── IMPLEMENTATION_SUMMARY.md # Implementation overview

API Endpoints

Item Management

  • GET /api/items - Get all items (with optional location filter)
    • Query params: lat, long, radius (km)
  • GET /api/items/:id - Get single item by ID
  • POST /api/items - Create new item listing
    • Body: { title, description, price, category, imageUrl, location, sellerName, sellerPhone }

AI Features

  • POST /api/generate-description - Generate AI description
    • Body: { title, category, price }
    • Returns: { description }

Step 1: Clone the Repository

git clone https://github.com/yourusername/classify.git
cd classify

Step 2: Install Dependencies

# Install frontend dependencies
npm install

# Install backend dependencies
cd backend
npm install
cd ..

Step 3: Configure Environment Variables

Create a .env file in the backend/ directory:

# MongoDB
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/classify

# Cloudinary
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret

# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key

# Server
PORT=3000

Step 4: Configure API Base URL

Update src/config/api.ts based on your setup:

// Android Emulator
export const API_BASE_URL = 'http://10.0.2.2:3000';

// iOS Simulator
export const API_BASE_URL = 'http://localhost:3000';

// Physical Device (use your computer's IP address)
export const API_BASE_URL = 'http://192.168.1.XXX:3000';

Step 5: Start the Backend Server

cd backend
npm start

The server will run on http://localhost:3000

Step 6: Start the React Native App

# Start Metro bundler
npm start

# In a new terminal, run on Android
npm run android

# Or run on iOS
npm run ios

πŸ“± Usage

For Buyers

  1. Browse Items: Open the app to see the marketplace feed with items near your location
  2. View Details: Tap any item card to see full details, description, and seller information
  3. Contact Seller: Tap the phone number or "Contact Seller" button to call directly

For Sellers

  1. Create Listing: Tap the floating "+" button on the home screen
  2. Upload Photo: Take a photo or select from gallery
  3. Fill Details: Enter title, price, and select category
  4. Generate Description: Tap "✨ Generate Description with AI" to auto-generate a compelling description
  5. Add Contact Info: Enter your name and phone number
  6. Post Listing: Tap "Post Listing" to publish your item

🎯 Features in Detail

AI Description Generation

The AI feature uses Google Gemini to generate persuasive, sales-oriented descriptions:

  1. User enters: Title, Price, Category
  2. AI generates: A short, catchy description (max 3 sentences)
  3. Description is optimized for sales and engagement

Example:

  • Input: Title: "Vintage Camera", Price: "$150", Category: "Electronics"
  • Output: "Capture timeless moments with this beautifully preserved vintage camera. Perfect for photography enthusiasts and collectors alike. At just $150, this is an incredible opportunity to own a piece of photographic history."

Location-Based Search

  • Uses MongoDB's $near operator with 2dsphere index
  • Default search radius: 10km (configurable)
  • Calculates distance using Haversine formula
  • Falls back to recent items if location unavailable

Image Upload & Storage

  • Cloudinary integration for reliable image hosting
  • Automatic optimization and CDN delivery
  • Supports camera and gallery selection
  • Base64 encoding for efficient uploads

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the ISC License.


πŸ™ Acknowledgments


πŸ“ž Support -9014326021

For support, email suryadammalapa.com or open an issue in the repository.


Built with ❀️ using React Native

⭐ Star this repo if you find it helpful!

About

Classify - AI-Powered Second-Hand Marketplace A modern React Native marketplace app for buying and selling second-hand items with AI-powered description generation and location-based discovery. ##

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors