Greenify is a mobile application designed to encourage sustainable practices by analyzing live images and building communities. Users capture photos of their space (balcony, roadside, basement, etc.) and Greenify automatically analyzes the image using Perplexity’s Sonar API to suggest suitable plants for that location. The app also connects like-minded people in the locality to create communities for sustainable, economic, and social growth.

Features

  • AI-Powered Plant Analysis using image recognition and location data to suggest suitable plants
  • Location-Based Recommendations considering weather, sunlight, and environmental conditions
  • Community Building connecting users with similar plant interests and sustainable goals
  • Cross-Platform Mobile App built with Expo for iOS, Android, and web
  • Real-time Weather Integration for accurate plant suitability assessment
  • Structured JSON Output using Pydantic models for consistent data handling
  • AR Model Support for enhanced plant visualization

Abstract Data Flow Diagram

Abstract Data Flow Diagram

Prerequisites

  • Node.js 20.19.4+ and npm
  • Python 3.10.0+ and pip
  • Expo CLI and SDK 51+
  • Perplexity API key (Sonar Pro and Sonar Deep Research)
  • Android SDK/Studio or Xcode (for local builds)
  • Mobile device with camera for image capture

Installation

# Clone the repository
git clone https://github.com/deepjyotipaulhere/greenify.git
cd greenify

# Install frontend dependencies
npm install

# Install backend dependencies
cd service
pip install -r requirements.txt

Configuration

Create .env file in the service directory:
PPLX_API_KEY=your_perplexity_api_key_here

Usage

  1. Start Backend Service:
    cd service
    python app.py
    
  2. Start Frontend App:
    npx expo start
    
  3. Access the App:
    • Install Expo Go app and scan QR code, or
    • Open web browser on mobile and navigate to the URL shown
  4. Use the App:
    • Grant camera and location permissions
    • Take a photo of your space (balcony, garden, etc.)
    • Receive AI-powered plant recommendations
    • Connect with nearby users for community building
demo

Code Explanation

  • Frontend: React Native with Expo for cross-platform mobile development
  • Backend: Python Flask API handling image processing and Perplexity API integration
  • AI Integration: Perplexity Sonar Pro for image analysis and Sonar Deep Research for plant recommendations
  • Data Models: Pydantic models for structured JSON output and data validation
  • Image Processing: Real-time image analysis with location-based context
  • Community Features: User matching based on plant suggestions and sustainable interests
  • Weather Integration: Real-time weather data for accurate plant suitability assessment