Skip to content

NotVivek12/IndianVegeterianCentral

Repository files navigation

IndianVegeterianCentral

A comprehensive vegetarian food discovery app with AI-powered analysis, real-time scanning, recipe generation, and restaurant finding capabilities.

🌟 Features

Authentication

  • Secure Login/Register: Powered by Clerk authentication
  • Social Sign-In: Support for Google, GitHub, and more
  • Protected Routes: All main features require authentication
  • User Profile Management: Built-in profile settings and account management

�📱 Scan Page

  • Real-time Barcode Scanning: Instant product identification using camera
  • OCR Text Recognition: Scan ingredient lists and product labels
  • AI Ingredient Analysis: Powered by Ollama for vegetarian verification
  • Smart Fallbacks: Multiple detection methods for accuracy

👨‍🍳 Cook Page

  • AI Recipe Generation: Creative recipes based on available ingredients
  • Vegetarian Validation: Prevents non-vegetarian ingredient usage
  • Real-time Ingredient Check: Instant feedback on ingredient compatibility
  • Comprehensive Recipe Details: Step-by-step instructions with quantities

🌍 Country Page

  • Global Cuisine Database: 30 countries with 90+ vegetarian dishes
  • AI-Powered Search: Intelligent dish and cuisine discovery
  • Cultural Food Exploration: Authentic vegetarian recipes worldwide
  • Expandable Country Cards: Detailed cuisine information

📍 Nearby Page

  • Location-Based Search: Find vegetarian restaurants using GPS
  • Free API Integration: OpenStreetMap + Overpass API (no API keys needed!)
  • Real Restaurant Data: Community-sourced from OpenStreetMap
  • Interactive Maps: Direct links to maps and directions

🆓 100% Free APIs Used

This project uses completely free APIs with no registration or API keys required:

  • OpenStreetMap + Overpass API: Restaurant discovery and mapping
  • Browser Geolocation API: User location access
  • Ollama Local AI: Ingredient analysis and recipe generation
  • Open Food Facts: Product barcode database
  • Tesseract.js: OCR text recognition

🚀 Getting Started

Prerequisites

  • Node.js 18+
  • Ollama installed locally (for AI features)
  • Clerk Account (free tier available - for authentication)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd mini-project
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env

    Required: Add your Clerk publishable key to .env:

    VITE_CLERK_PUBLISHABLE_KEY=pk_test_your_key_here

    Get your key from: https://dashboard.clerk.com

    The default settings work out of the box with free APIs!

  4. Install Ollama AI model (optional for AI features)

    ollama pull gemma2:latest
  5. Start the development server

    npm run dev

⚙️ Configuration

Environment Variables

All APIs are pre-configured with free services. Customize in .env:

# OpenStreetMap APIs (FREE)
VITE_OVERPASS_API_URL=https://overpass-api.de/api/interpreter
VITE_OPENSTREETMAP_BASE_URL=https://www.openstreetmap.org

# Ollama Local AI
VITE_OLLAMA_BASE_URL=http://localhost:11434
VITE_OLLAMA_MODEL=gemma2:latest

# App Settings
VITE_DEFAULT_SEARCH_RADIUS=5
VITE_MAX_RESTAURANTS=20
VITE_ENABLE_MOCK_FALLBACK=true

Ollama Setup

  1. Install Ollama from ollama.ai
  2. Pull the required model: ollama pull gemma2:latest
  3. Start Ollama service: ollama serve

The app works without Ollama but AI features will be limited.

🏗️ Architecture

Technology Stack

  • Frontend: React 19.1.1 + TypeScript + Vite
  • Styling: TailwindCSS 3.4.0
  • AI: Ollama (local) + Gemma 3 4B model
  • Mapping: OpenStreetMap + Overpass API
  • Scanning: Tesseract.js + ZXing Library
  • Icons: Heroicons

Project Structure

src/
├── components/        # Reusable UI components
├── pages/            # Main application pages
├── context/          # React context providers
├── types.ts          # TypeScript type definitions
└── main.tsx          # Application entry point

📊 API Usage

Free APIs Integration

  • No API keys required for basic functionality
  • Unlimited usage of OpenStreetMap services
  • Local AI processing via Ollama (privacy-first)
  • Fallback systems for reliable operation

Real Data Sources

  • Restaurant Data: OpenStreetMap community contributions
  • Product Database: Open Food Facts (550k+ products)
  • Maps & Directions: OpenStreetMap routing

🔒 Privacy & Security

  • Local AI Processing: All AI analysis happens on your machine
  • No Data Collection: No personal data sent to external servers
  • Open Source APIs: Transparent and community-driven
  • Optional Features: All location/camera access requires explicit permission

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Commit changes: git commit -m 'Add feature'
  4. Push to branch: git push origin feature-name
  5. Open a Pull Request

📄 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • OpenStreetMap community for restaurant data
  • Ollama team for local AI capabilities
  • Open Food Facts for product database
  • Tesseract.js for OCR functionality

🧪 Environment & Secrets

This project uses a .env file for configuration. The actual .env is not committed (see .gitignore). To customize settings:

  1. Copy .env.example to .env
  2. Adjust variables as needed (models, API endpoints, radius, fallbacks)
  3. Restart the dev server after changes

Never commit real API keys (if you add paid providers later). Keep .env.example updated with safe defaults.


Built with ❤️ for the vegetarian community

Releases

No releases published

Packages

 
 
 

Contributors

Languages