RAG WEB APP
# đ± CropSense - Agricultural Guidance Platform
CropSense is an AI-powered agricultural guidance platform that provides farmers with evidence-based answers to their farming questions using RAG (Retrieval-Augmented Generation) technology.
## đ Table of Contents
- Overview
- Architecture
- Tech Stack
- Project Structure
- Getting Started
- Development
- Deployment
- Documentation
## đŻ Overview
CropSense combines trusted agricultural resources with advanced AI to deliver:
- **Context-aware answers** grounded in verified agricultural documents
- **Source citations** for every response
- **Mobile-friendly** chat interface
- **Real-time** query processing
## đïž Architecture
```
ââââââââââââââââ
â Web App â
â (React+Vite) â
ââââââââŹââââââââ
â
âŒ
ââââââââââââââââ
â Firebase â
â Auth+Hosting â
ââââââââŹââââââââ
â
âŒ
ââââââââââââââââ ââââââââââââââââ
â Functions ââââââ¶â RAG Backend â
â (Node.js) â â (FastAPI) â
ââââââââââââââââ ââââââââŹââââââââ
â
âŒ
ââââââââââââââââ
â Vertex AI â
â Embeddings + â
â Gemini â
ââââââââââââââââ
```
## đ ïž Tech Stack
### Frontend
- **React 18** - UI library
- **Vite** - Build tool
- **TypeScript** - Type safety
- **Tailwind CSS** - Styling
- **Framer Motion** - Animations
- **React Router** - Navigation
- **TanStack Query** - Data fetching
- **React Hook Form + Zod** - Form handling
### Backend
- **Firebase** - Auth, Hosting, Firestore, Functions
- **FastAPI** (Python) - RAG backend
- **Vertex AI** - Embeddings & Generation
- **Firestore** - Vector storage (MVP)
### Tooling
- **PNPM** - Package manager
- **ESLint + Prettier** - Code quality
- **Vitest** - Testing
- **GitHub Actions** - CI/CD
## đ Project Structure
```
.
âââ apps/
â âââ web/ # React frontend application
â âââ src/
â â âââ components/ # React components
â â â âââ ui/ # Base UI components
â â â âââ layouts/ # Layout components
â â âââ pages/ # Page co âŠ