Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hari7261/genai-bot

๐Ÿค– Gemini AI Chatbot: A smart, fast chatbot thatโ€™s easy to use, looks cool, and gives fun replies. ๐Ÿš€๐Ÿ’ฌ
https://github.com/hari7261/genai-bot

api chatbot chatbot-gemini fullstack-development gemini-ai gemini-api gemini-pro gemini-pro-api hari7261 reactjs

Last synced: 7 days ago
JSON representation

๐Ÿค– Gemini AI Chatbot: A smart, fast chatbot thatโ€™s easy to use, looks cool, and gives fun replies. ๐Ÿš€๐Ÿ’ฌ

Awesome Lists containing this project

README

        

# **๐Ÿค– Gemini AI Chatbot**
Your friendly, futuristic AI companion! ๐Ÿช

![batmen](https://github.com/user-attachments/assets/47a8ce70-601a-4661-b0f3-70c1bcbc1590)

---

## **๐ŸŒŒ Welcome to the Future of Conversations!**

Gemini AI Chatbot isnโ€™t just any chatbotโ€”itโ€™s your intergalactic chat partner. With cutting-edge **AI**, a sleek design, and a personality cooler than your morning coffee, Gemini is here to chat, answer questions, and make your day a little brighter. ๐ŸŒŸ

### **Why Gemini?**
- **๐Ÿง  Smart AI**: Powered by the brainiest machine learning models (OpenAI GPT APIs).
- **๐Ÿ–Œ๏ธ Beautiful Interface**: A sleek, dark theme interface that doesnโ€™t hurt your eyes during your late-night existential crisis chats.
- **โšก Fast Responses**: Speedy like a rocket! ๐Ÿš€
- **๐ŸŽ‰ Error Handling**: Because nobody likes it when things break (we added a spinner just for dramatic effect).

---

## **๐Ÿ› ๏ธ Tech Stack (A Symphony of Greatness)**

| **Technology** | **Purpose** |
|-----------------------|-----------------------------------------------------------------------------|
| ๐Ÿฆ„ **Next.js** | The ultra-modern React framework for building blazingly fast web apps. |
| ๐ŸŽจ **Tailwind CSS** | CSS, but make it fashion. Stunning design, no sweat. |
| ๐Ÿ’ป **TypeScript** | JavaScriptโ€™s cooler, type-safe sibling. Keeps your code bug-free! ๐Ÿ› |
| ๐Ÿค– **Lucide Icons** | Fancy icons that jazz up the UI (hello, **Bot** and **Loader**!). |
| ๐Ÿ”‘ **Environment** | Secrets like API keys stored securely in `.env.local`. Shhh, itโ€™s a secret!|
| ๐ŸŒŽ **APIs** | Powered by **Google** APIs and the mighty **GPT** for interactive chats. |

---

## **โœจ Features That Make Gemini Awesome**

| **Feature** | **How it Works** |
|--------------------------|----------------------------------------------------------------------------------|
| **๐Ÿš€ Dynamic Chat** | Gemini fetches your input, sends it to the AI, and responds faster than your ex. |
| **๐ŸŒ™ Dark Theme** | A UI so cool, it belongs in a sci-fi movie. ๐ŸŒŒ |
| **๐ŸŒ€ Spinning Loader** | Fancy spinner animation while Gemini processes your request. |
| **๐Ÿ”” Error Alerts** | When life gives you lemons (errors), we show you pretty red alerts. ๐Ÿ‹ |

---

## **๐Ÿ’ก How It All Works (A Peek Under the Hood)**

### 1๏ธโƒฃ **AI Logic**
When you type a message:
- **Your Message** ๐Ÿ“ โžก๏ธ Sent to our `/api/chat` endpoint.
- **Magic Happens** ๐Ÿช„: The backend uses **OpenAI GPT API** to craft a witty, insightful, or downright goofy response.
- **Response** ๐Ÿ’ฌ โžก๏ธ Delivered to you faster than a pizza.

### 2๏ธโƒฃ **UI Design**
- Built with **Tailwind CSS**, itโ€™s like playing with Lego blocks, but for design.
- Everything is modular: from buttons to alerts, weโ€™ve made it reusable and beautiful.

### 3๏ธโƒฃ **State Management**
- **React useState**: Keeps track of everything from loading states to your heartfelt messages.
- **Error Handling**: Any hiccups? We catch them and show a polite error message (no tantrums here).

### 4๏ธโƒฃ **Environment Variables**
- Your API key is securely stored in `.env.local` (because privacy matters).
- We retrieve the key using `process.env.GOOGLE_API_KEY`.

---

## **๐ŸŽฎ How to Run Locally (Spoiler Alert: Super Easy)**

```bash
# Clone the repo ๐Ÿš€
git clone https://github.com/your-repo/chatbot.git

# Navigate to the project directory
cd chatbot

# Install dependencies ๐Ÿ“ฆ
npm install

# Add your API key to .env.local
echo "GOOGLE_API_KEY=your_api_key_here" > .env.local

# Start the development server ๐Ÿ› ๏ธ
npm run dev
```

Visit `http://localhost:3000` and start chatting with Gemini. ๐Ÿ’ฌ

---

## **๐Ÿ“ธ Screenshots**

### **Futurstic**
![Screenshot 2024-12-14 203518](https://github.com/user-attachments/assets/0a6232e4-61f0-4ccb-ab39-8304b1842b26)

### **Chat in Action**
![Screenshot 2024-12-14 202810](https://github.com/user-attachments/assets/7208f50d-51bc-4465-b32e-009c3c417a1a)

---

## **๐Ÿ˜‚ Fun Facts**

- Gemini is faster than your Wi-Fi on a good day.
- Its dark theme saves your eyes *and* makes you look like a hacker.
- Designed for both **deep conversations** and **memes**.

---

### **๐Ÿšจ Disclaimers**
- **Itโ€™s not a human** (even if it sounds like one).
- Doesnโ€™t guarantee lottery-winning predictions.

---

Let the AI magic begin! ๐Ÿ’ซ