Skip to content

MedantSharan/PashuAI

Repository files navigation

PashuAI 🐾

An AI-powered mobile application designed to help people care for street animals with confidence. PashuAI combines veterinary expertise with artificial intelligence to provide instant guidance for animal rescue, first aid, and general pet care.

Overview

PashuAI ("Pashu" means animal in Hindi/Sanskrit) is a comprehensive animal welfare platform that empowers users to:

  • Get instant AI-powered veterinary advice using RAG (Retrieval-Augmented Generation)
  • Report and respond to animal emergencies
  • Learn proper animal care through interactive modules

Note: This project is currently under active development. Features and documentation may change as the project evolves.

Screenshots

PashuAI Home Screen PashuAI AI Chatbot

Features

AI Chat Assistant

  • Context-aware veterinary and animal rescue advice
  • Powered by Mixtral-8x7B via HuggingFace Inference
  • RAG implementation using Pinecone vector database
  • Trained on reliable animal care documentation

Emergency Response

  • Quick reporting system for animals in distress
  • Step-by-step guidance for emergency situations
  • Location-based services for finding nearby help

Learning Modules

  • Interactive courses on dog and cat care
  • Video tutorials and educational content
  • Quizzes to test knowledge retention
  • Structured learning paths for beginners

Tech Stack

Frontend

  • Framework: React Native with Expo
  • Navigation: React Navigation (Stack & Bottom Tabs)
  • State Management: React Context API
  • UI Components: Custom themed components with dark mode support
  • Backend Integration: Supabase for authentication and data storage

Backend

  • Runtime: Node.js with Express.js
  • AI Model: Groq Inference API
  • Vector Database: Pinecone for semantic search
  • Embeddings: LangChain with community integrations
  • Document Processing: PDF parsing for knowledge base ingestion

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Expo CLI
  • iOS Simulator (for macOS) or Android Emulator
  • Pinecone account and API key
  • HuggingFace account and API key
  • Supabase project (optional, for auth)

Installation

1. Clone the Repository

git clone <repository-url>
cd PashuAI

2. Install Frontend Dependencies

npm install

3. Install Backend Dependencies

cd backend
npm install

4. Environment Setup

Create a .env file in the backend directory:

PORT=3000
PINECONE_API_KEY=your_pinecone_api_key
PINECONE_ENVIRONMENT=your_pinecone_environment
PINECONE_INDEX_NAME=pashuai-docs
HF_API_KEY=your_huggingface_api_key
GROQ_API_KEY=your groq api key

5. Initialize the Vector Database

cd backend
npm run init-pinecone

6. Process Documents (Optional)

If you have custom veterinary documents to add to the knowledge base:

cd backend
npm run process-docs

Running the Application

Start the Backend Server

cd backend
npm start

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

Start the Frontend App

In a new terminal, from the project root:

npx expo start --tunnel

Then choose your platform:

  • Press i for iOS Simulator
  • Press a for Android Emulator
  • Press w for web browser
  • Scan the QR code with Expo Go app on your phone

Project Structure

PashuAI/
├── app/                          # Expo Router pages
│   └── (tabs)/                   # Tab navigation screens
├── src/
│   ├── screens/                  # Screen components
│   │   ├── main/                 # Main app screens
│   │   ├── learn/                # Learning module screens
│   │   ├── auth/                 # Authentication screens
│   │   └── profile/              # Profile screens
│   ├── components/               # Reusable components
│   ├── navigation/               # Navigation configuration
│   ├── context/                  # React Context providers
│   ├── services/                 # API services
│   ├── hooks/                    # Custom React hooks
│   ├── config/                   # App configuration
│   └── utils/                    # Utility functions
├── backend/
│   ├── services/                 # Backend services
│   │   ├── chatService.js        # AI chat logic
│   │   ├── llm.js                # LLM integration
│   │   └── vectorStore.js        # Pinecone vector store
│   ├── routes/                   # API routes
│   ├── scripts/                  # Utility scripts
│   │   ├── initPinecone.js       # Initialize Pinecone index
│   │   └── processDocuments.js   # Process and embed documents
│   ├── documents/                # Knowledge base documents
│   └── server.js                 # Express server entry point
├── components/                   # Shared UI components
├── assets/                       # Images, fonts, etc.
└── constants/                    # App constants

API Endpoints

Health Check

GET /health

Chat

POST /api/chat
Body: { "message": "Your question here" }
Response: { "answer": "AI response", "sources": [...] }

Backend Scripts

  • npm start - Start the production server
  • npm run dev - Start the development server with auto-reload
  • npm run init-pinecone - Initialize Pinecone index
  • npm run process-docs - Process and embed documents
  • npm run delete-index - Delete the Pinecone index

Development

Adding New Documents to Knowledge Base

  1. Place PDF documents in backend/documents/
  2. Run npm run process-docs to embed them
  3. The vector store will automatically update

Modifying the AI Prompt

Edit the SYSTEM_TEMPLATE in backend/services/chatService.js

Customizing the Theme

Theme configuration is in src/constants/ and uses React Context for theme switching.

Configuration

Expo Configuration

Modify app.json for:

  • App name and slug
  • Icons and splash screen
  • Platform-specific settings
  • Build configurations

EAS Build

Configure builds in eas.json for production deployment.

Contributing

Contributions are welcome! Please ensure:

  • Code follows existing style conventions
  • New features include appropriate documentation
  • Backend changes maintain RAG accuracy
  • UI changes support both light and dark themes

Made with ❤️ for street animals everywhere

About

PashuAI is an AI-powered mobile app for street animal rescue and care, providing instant veterinary advice using RAG technology.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors