Team Ai
Apppublic

vikasgautam2003/Xplain__Your_topic_Explainer

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

๐Ÿง  Xplain- Your Topic Explainer

![Node.js](https://nodejs.org/) ![Express](https://expressjs.com/) ![LangChain](https://js.langchain.com/) ![Google Gemini API](https://ai.google.dev/)


๐Ÿ“– 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

bash
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.