Skip to content

ChatBot is an intent-driven AI assistant built using React and Vite on the frontend, with a Node.js + Express backend. It intelligently routes user queries based on intent—whether it's general, weather, news, or alerts—using Gemini Flash 2.0 for reasoning, WeatherAPI for forecasts, and NewsAPI for headlines. The backend orchestrates these APIs

License

Notifications You must be signed in to change notification settings

ANKVIT26/NodeMesh_Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 NodeMesh — AI-Powered Intent-Based Assistant

NodeMesh is a responsive AI assistant built using React + Vite on the frontend and a modular Node.js/Express.js backend. It intelligently routes user queries based on intent—leveraging Gemini Flash 2.0, WeatherAPI, and NewsAPI to deliver accurate, real-time responses.

🚀 Features

  • Sarcasm, Intent-Based Query Handling
    Automatically detects user intent or sarcasm across:

    • general/sarcasm → Gemini Flash 2.0
    • weather, rain, alert → WeatherMap API
    • news → NewsAPI
  • Smart Prompt Engineering
    Each API is guided by tailored prompts to ensure clarity, relevance, and structured output. Gemini is used for summarization, reasoning, and fallback logic. This handles the sarcasm of the user and answers it rather than assuming it literally. Apart from this, we have incorporated Gita Shlokas to answer distressed and mentally tired queries(used few-shot learning)

  • Frontend

    • Built with React + Vite
    • Responsive UI with Dark/Light Mode toggle
    • Clean routing and modular component design
  • Backend

    • Runs via npm run server
    • Handles API orchestration and intent parsing
    • Secured with .env for API key management

🧠 Powered by Gemini Flash 2.0

Gemini Flash 2.0 is used to:

  • Handle general queries with natural language understanding
  • Summarize external API responses
  • Format answers using markdown, bullet points, or JSON when needed

Prompt engineering is reflected in how each query is structured and routed, ensuring high-quality, context-aware responses.


📦 Tech Stack

Layer Tools Used
Frontend React, Vite, Tailwind CSS
Backend Node.js, Express
APIs Gemini Flash 2.0, WeatherAPI, NewsAPI
Dev Tools Postman, ESLint, dotenv

Testing the APIs

Use Postman to test backend endpoints by importing the API sample code/ pasting it in the raw format area and request using "POST" with your API Key to verify the working.

🛠 Setup Instructions

  1. Clone the repo

    git clone https://github.com/ANKVIT26/NodeMesh_Assistant.git
    cd NodeMesh_Assistant
  2. Install dependencies

    • The project has both frontend and backend folders.
    • Run:
      npm install
      inside each folder (frontend and backend).
  3. Create .env file

    • In the root or backend folder, add a .env file with your API keys:
      GEMINI_API_KEY=your_gemini_key
      WEATHER_API_KEY=your_weather_key
      NEWS_API_KEY=your_newsapi_key
  4. Start the backend server

    npm run server
  5. Start the frontend

    npm run dev
    • This launches the React + Vite frontend with hot reload.

⚡ Tech Stack Recap

  • Frontend: React, Vite, Tailwind CSS
  • Backend: Node.js, Express
  • APIs: Gemini Flash 2.0, WeatherAPI, NewsAPI
  • Dev Tools: Postman, ESLint, dotenv
image

#DEMO VIDEO https://drive.google.com/file/d/1Z-AfodYTV25SY84mCoV4Bwn10EC85z0G/view?usp=sharing

React + Vite(Official guide template)

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.

About

ChatBot is an intent-driven AI assistant built using React and Vite on the frontend, with a Node.js + Express backend. It intelligently routes user queries based on intent—whether it's general, weather, news, or alerts—using Gemini Flash 2.0 for reasoning, WeatherAPI for forecasts, and NewsAPI for headlines. The backend orchestrates these APIs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published