Skip to content

๐—ฃ๐—ฅ๐—”๐—š๐—”๐—ง๐—œ | ๐—ก๐—ฒ๐˜…๐˜.๐—ท๐˜€ ๐—–๐—ต๐—ฎ๐˜ ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—™๐—ฟ๐—ผ๐—ป๐˜๐—ฒ๐—ป๐—ฑ ๐—ณ๐—ผ๐—ฟ ๐—”๐—ด๐—ฟ๐—ถ๐—ฐ๐˜‚๐—น๐˜๐˜‚๐—ฟ๐—ฎ๐—น ๐—”๐—œ ๐ŸŒฑ

Notifications You must be signed in to change notification settings

Ecolash/PRAGATI-Frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

88 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

PRAGATI Logo

Agricultural AI Frontend

PRAGATI: Precision Retrieval & AI for Generative Agricultural Technology & Insights


PRAGATI is a pioneering RAG-powered Multi-Agent Orchestrator System tailored for agricultural domain knowledge. Our vision is to empower the agricultural sector with:

  • Specialized AI Agents: Deliver precise, timely, and context-aware recommendations for crop selection, irrigation, fertilizer use, pest detection etc.
  • Query Complexity Assessment: Optimizes retrieval and generation, ensuring the right expertise is applied to each query.
  • Multi-Agent Orchestration: Coordinates specialized agents for comprehensive, expert-backed answers.
  • Multi-Lingual & Multi-Modal Support: Accessible via text, image, and voice inputs, making PRAGATI an AI truly "For the Farmers".
  • Deep Research Pipelines: Enhance coverage and depth of recommendations.
  • Human-in-the-Loop (HITL) Validation: Ensures factual accuracy and reliable decision support for farmers and stakeholders.
  • Retrieval-Augmented Generation (RAG) Pipeline: Integrates semantic search with domain-specific knowledge base retrieval, ensuring all AI-generated responses are grounded in verified agricultural data.

PRAGATI is accurate, fast, and reliableโ€”driving progress and growth in agriculture, just as its name means!


A modern Next.js front-end application for Agricultural AI solutions, including chat, crop recommendations, disease prediction, and more.

Features

The dashboard provides the following AI-powered features and tools:

  • AI Specialists Tab

    • Crop Yield Prediction
    • Crop Health Analysis & Disease Prediction
    • Pest Control & Prediction
    • Crop Recommendations (Soil-based)
    • Fertilizer Guide
    • Irrigation Planning
    • Weather Advisory
    • Market Prices (Real-time)
    • Credit Policy & Market Intelligence
    • Risk Management
    • Agriculture News & Updates
  • Chat History Tab

    • Access and revisit all your previous chat sessions with AI agents.
  • QR Scanner

    • Scan QR codes for quick access to agri-data, resources, or field records.
  • Profile & Sign Out

    • Manage your user profile and securely sign out.

All features are accessible via a sidebar for seamless navigation between AI agents, chat history, and tools.

Table of Contents

Prerequisites

  • Node.js v18 or higher
  • pnpm package manager (optional but recommended)
  • A PostgreSQL-compatible database (Neon, Supabase, or local Postgres)
  • Git for version control

Getting Started

  1. Clone the repository:

    git clone https://github.com/Ecolash/Agricultural-AI-Frontend.git
    cd Agricultural-AI-Frontend
  2. Install dependencies:

    pnpm install
  3. Create a .env file in the project root based on the example below.

Environment Variables

Create a .env file with the following variables: In the project root:

DATABASE_URL=""           # PostgreSQL connection string
NEXTAUTH_SECRET=""        # Secret key for NextAuth.js
NEXTAUTH_URL=""           # Deployed frontend URL
NEXT_PUBLIC_API_URL=""    # Public API endpoint for the backend

Prisma Setup

Prisma ORM is used for database schema migrations and client generation.

  1. Generate Prisma client (runs automatically after install):

    pnpm prisma generate
  2. Apply migrations to your database:

    pnpm prisma migrate dev --name init
  3. (Optional) To reset your database and reapply all migrations:

    pnpm prisma migrate reset

Available Scripts

In the project directory, you can run:

  • pnpm dev or pnpm run dev:frontend
    Runs the development server at http://localhost:3000.

  • pnpm run build
    Builds the application for production and generates the Prisma client.

  • pnpm start
    Runs the production build with next start.

  • pnpm run lint
    Lints code with ESLint.

  • pnpm run type-check
    Runs TypeScript type checking.

  • pnpm run dev:setup
    Helpful scripts for local development (see scripts/dev-setup.sh help).

Project Structure

โ”œโ”€โ”€ app/                        # Next.js app directory (routing, pages, API routes)
โ”‚   โ”œโ”€โ”€ api/                    # API route handlers (auth, chat-history, etc.)
โ”‚   โ”œโ”€โ”€ dashboard/              # Dashboard UI and subpages
โ”‚   โ”œโ”€โ”€ qr-scanner/             # QR scanner feature pages
โ”‚   โ”œโ”€โ”€ signin/, signup/        # Auth pages
โ”‚   โ””โ”€โ”€ ...                     # Other feature pages and layouts
โ”‚
โ”œโ”€โ”€ components/                 # Reusable React components
โ”‚   โ”œโ”€โ”€ agent-interfaces/       # Specialized agent UI interfaces
โ”‚   โ”œโ”€โ”€ lib/                    # Component-specific utilities
โ”‚   โ”œโ”€โ”€ types/                  # Component-specific types
โ”‚   โ””โ”€โ”€ ui/                     # UI primitives (buttons, dialogs, etc.)
โ”‚
โ”œโ”€โ”€ data/                       # Static data, language lists, agent configs
โ”œโ”€โ”€ docs/                       # Project and API documentation
โ”œโ”€โ”€ hooks/                      # Custom React hooks
โ”œโ”€โ”€ lib/                        # API wrappers, utilities, and services
โ”‚   โ””โ”€โ”€ actions/                # Server actions and helpers
โ”œโ”€โ”€ prisma/                     # Prisma schema and migrations
โ”‚   โ””โ”€โ”€ migrations/             # Database migration files
โ”œโ”€โ”€ public/                     # Static assets (images, icons, etc.)
โ”œโ”€โ”€ scripts/                    # Utility scripts for setup and development
โ”œโ”€โ”€ styles/                     # Global and component styles
โ”œโ”€โ”€ types/                      # Global TypeScript type definitions
โ”œโ”€โ”€ assets/                     # Project assets (logo, images)
โ”œโ”€โ”€ .env                        # Environment variables
โ”œโ”€โ”€ package.json                # Project metadata and scripts
โ”œโ”€โ”€ tsconfig.json               # TypeScript configuration
โ”œโ”€โ”€ README.md                   # Project documentation
โ””โ”€โ”€ ...                         # Other config and dotfiles

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

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

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

๐—ฃ๐—ฅ๐—”๐—š๐—”๐—ง๐—œ | ๐—ก๐—ฒ๐˜…๐˜.๐—ท๐˜€ ๐—–๐—ต๐—ฎ๐˜ ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—™๐—ฟ๐—ผ๐—ป๐˜๐—ฒ๐—ป๐—ฑ ๐—ณ๐—ผ๐—ฟ ๐—”๐—ด๐—ฟ๐—ถ๐—ฐ๐˜‚๐—น๐˜๐˜‚๐—ฟ๐—ฎ๐—น ๐—”๐—œ ๐ŸŒฑ

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages