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.
-
Sarcasm, Intent-Based Query Handling
Automatically detects user intent or sarcasm across:general/sarcasm→ Gemini Flash 2.0weather,rain,alert→ WeatherMap APInews→ 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
.envfor API key management
- Runs via
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.
| Layer | Tools Used |
|---|---|
| Frontend | React, Vite, Tailwind CSS |
| Backend | Node.js, Express |
| APIs | Gemini Flash 2.0, WeatherAPI, NewsAPI |
| Dev Tools | Postman, ESLint, dotenv |
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.
-
Clone the repo
git clone https://github.com/ANKVIT26/NodeMesh_Assistant.git cd NodeMesh_Assistant -
Install dependencies
- The project has both frontend and backend folders.
- Run:
inside each folder (
npm install
frontendandbackend).
-
Create
.envfile- In the root or backend folder, add a
.envfile with your API keys:GEMINI_API_KEY=your_gemini_key WEATHER_API_KEY=your_weather_key NEWS_API_KEY=your_newsapi_key
- In the root or backend folder, add a
-
Start the backend server
npm run server
-
Start the frontend
npm run dev
- This launches the React + Vite frontend with hot reload.
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express
- APIs: Gemini Flash 2.0, WeatherAPI, NewsAPI
- Dev Tools: Postman, ESLint, dotenv
#DEMO VIDEO https://drive.google.com/file/d/1Z-AfodYTV25SY84mCoV4Bwn10EC85z0G/view?usp=sharing
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
The React Compiler is not enabled on this template. To add it, see this documentation.
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.