vikasgautam2003/Xplain__Your_topic_Explainer
0
๐ง Xplain- Your Topic Explainer
   
๐ Overview
This project is a Topic Explainer Web App built with:
- Node.js + Express.js (backend)
- EJS (templating engine for frontend)
- LangChain.js + Google Gemini API (LLM integration)
Users can enter any topic, and the app generates a detailed explanation using AI.
๐ Features
- ๐ Simple web interface with EJS templates
- ๐ AI-generated explanations of any topic
- โก Fast and scalable backend with Express.js
- ๐ Secure API key management via
.env - ๐จ Ready to style and extend
๐ ๏ธ Installation
1๏ธโฃ Clone the Repository
git clone https://github.com/your-username/langchain-topic-explainer.git
cd langchain-topic-explainer
2๏ธโฃ Install Dependencies
npm install
3๏ธโฃ Set Environment Variables
Create a .env file in the project root:
GOOGLE_API_KEY=your_google_api_key_here
4๏ธโฃ Run the App
node server.js
App will be running at ๐ http://localhost:3000
๐ Project Structure
๐ฆ langchain-topic-explainer
โโโ ๐ server.js # Express server
โโโ ๐ langchain.js # LangChain integration logic
โโโ ๐ package.json
โโโ ๐ views/ # EJS templates
โ โโโ index.ejs
โโโ ๐ public/ # Static files (CSS, images, JS)
โโโ ๐ .env # Environment variables
โโโ ๐ README.md
๐ API Key Setup
Go to Google AI Studio
.
Generate a Gemini API key.
Add it to your .env file as GOOGLE_API_KEY.
๐งโ๐ป Usage Example
Enter a topic like:
Artificial Intelligence
The app will return a detailed explanation powered by Gemini.
