{"id":26253921,"url":"https://github.com/waghib/gemini-chat-bot","last_synced_at":"2026-04-13T12:32:41.674Z","repository":{"id":281250722,"uuid":"944696228","full_name":"Waghib/Gemini-Chat-Bot","owner":"Waghib","description":"Frontend Application link","archived":false,"fork":false,"pushed_at":"2025-05-12T16:43:41.000Z","size":687,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-30T21:23:24.399Z","etag":null,"topics":["chatbot","chatbot-application","full-stack","gemini-api","mern-stack"],"latest_commit_sha":null,"homepage":"https://gemini-chat-bot-ecru.vercel.app/chat","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Waghib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-07T20:02:04.000Z","updated_at":"2025-06-19T08:23:00.000Z","dependencies_parsed_at":"2025-05-07T10:49:30.007Z","dependency_job_id":null,"html_url":"https://github.com/Waghib/Gemini-Chat-Bot","commit_stats":null,"previous_names":["waghib/gemini-chat-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Waghib/Gemini-Chat-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waghib%2FGemini-Chat-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waghib%2FGemini-Chat-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waghib%2FGemini-Chat-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waghib%2FGemini-Chat-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Waghib","download_url":"https://codeload.github.com/Waghib/Gemini-Chat-Bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waghib%2FGemini-Chat-Bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatbot","chatbot-application","full-stack","gemini-api","mern-stack"],"created_at":"2025-03-13T18:18:39.820Z","updated_at":"2026-04-13T12:32:41.649Z","avatar_url":"https://github.com/Waghib.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gemini Chat Application\n\n![Gemini Chat Application](assets/gemini-chat-preview.png)\n\nA chat application using React for the frontend, Node.js for the backend, and MongoDB for storing conversation history. The application uses Google's Gemini API for generating responses.\n\n## Features\n\n- Modern, responsive UI similar to ChatGPT\n- Conversation history storage and retrieval\n- Real-time chat with Google's Gemini API\n- Create and switch between different conversations\n\n## Prerequisites\n\n- Node.js and npm (for traditional setup)\n- MongoDB (local or Atlas cloud instance)\n- Google Gemini API key\n- Docker and Docker Compose (for containerized setup)\n- Azure VM or similar cloud server (for production deployment)\n\n## Setup Instructions\n\nYou can run this application either traditionally, using Docker locally, or deploy it to your Azure VM.\n\n### Option 1: Azure VM Deployment (Production)\n\n1. **SSH into your Azure VM:**\n   ```\n   ssh yourusername@20.94.44.47\n   ```\n\n2. **Clone the repository:**\n   ```\n   git clone \u003crepository-url\u003e\n   cd Gemini-Chat-Bot\n   ```\n\n3. **Set your Gemini API key** in the docker-compose.yml file:\n   ```yaml\n   # In docker-compose.yml\n   services:\n     server:\n       environment:\n         # Replace with your actual API key\n         - GEMINI_API_KEY=your_actual_api_key_here\n   ```\n\n4. **Make sure ports are open in Azure:**\n   - Open ports 80 (HTTP), 5000 (API), and 27017 (MongoDB) in your Azure Network Security Group\n\n5. **Build and start the containers:**\n   ```\n   docker-compose up -d\n   ```\n\n6. **Access the application:**\n   - Frontend: http://20.94.44.47 (port 80)\n   - Backend API: http://20.94.44.47:5000\n\n### Option 2: Docker Setup (Local Development)\n\n1. **Clone the repository:**\n   ```\n   git clone \u003crepository-url\u003e\n   cd Gemini-Chat-Bot\n   ```\n\n2. **Set your Gemini API key** in the docker-compose.yml file:\n   ```yaml\n   # In docker-compose.yml\n   services:\n     server:\n       environment:\n         # Replace with your actual API key\n         - GEMINI_API_KEY=your_actual_api_key_here\n   ```\n\n3. **Build and start the containers:**\n   ```\n   docker-compose up -d\n   ```\n\n4. **Access the application:**\n   - Frontend: http://localhost (port 80)\n   - Backend API: http://localhost:5000\n\n### Option 3: Traditional Setup\n\n#### Backend Setup\n\n1. Navigate to the server directory:\n   ```\n   cd Gemini-Chat-Bot/server\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Create a `.env` file in the server directory with the following variables:\n   ```\n   PORT=5000\n   MONGODB_URI=your_mongodb_connection_string\n   GEMINI_API_KEY=your_gemini_api_key\n   ```\n\n4. Start the server:\n   ```\n   npm run dev\n   ```\n\n#### Frontend Setup\n\n1. Navigate to the client directory:\n   ```\n   cd Gemini-Chat-Bot/client\n   ```\n\n2. Install dependencies:\n   ```\n   npm install\n   ```\n\n3. Start the React development server:\n   ```\n   npm start\n   ```\n\n4. Open your browser and go to `http://localhost:3000` to use the application.\n\n## Docker Services\n\nWhen running with Docker, the application consists of three containers:\n\n1. **MongoDB (gemini-mongo)**:\n   - Database for storing chat history\n   - Port: 27017\n   - Data persisted in a Docker volume\n\n2. **Backend (gemini-server)**:\n   - Node.js Express server\n   - Port: 5000\n   - Connects to MongoDB and the Gemini API\n\n3. **Frontend (gemini-client)**:\n   - React application served via Nginx\n   - Port: 80\n   - Communicates with the backend API\n\n## Azure VM Security Considerations\n\nWhen deploying to Azure VM, consider these security measures:\n\n1. **Restrict MongoDB access:**\n   - For production, update docker-compose.yml to not expose MongoDB port to the public\n   - Use a firewall to restrict access to your VM\n\n2. **Use HTTPS:**\n   - For production use, configure Nginx with SSL certificates\n   - You can use Let's Encrypt for free certificates\n\n3. **Environment Variables:**\n   - Store sensitive data like API keys in Azure Key Vault\n   - Use environment files rather than hardcoding values\n\n## How to Get a Gemini API Key\n\n1. Go to [Google AI Studio](https://aistudio.google.com/)\n2. Create an account or sign in\n3. Navigate to API keys section\n4. Create a new API key\n5. Copy the API key and paste it in your `.env` file or docker-compose.yml\n\n## Project Structure\n\n- `/client` - React frontend\n  - `/src/components` - UI components\n  - `/src/context` - React context for state management\n  - `/src/pages` - Main application pages\n  - `/src/utils` - Utility functions and API calls\n\n- `/server` - Node.js backend\n  - `/controllers` - Request handlers\n  - `/models` - MongoDB schemas\n  - `/routes` - API routes\n  - `index.js` - Main entry point\n\n## Troubleshooting Docker Setup\n\n- If you encounter issues with MongoDB connection, check if port 27017 is already in use:\n  ```\n  sudo lsof -i :27017\n  ```\n  \n- To stop any running MongoDB instance:\n  ```\n  sudo kill \u003cPID\u003e\n  ```\n\n- For detailed logs from specific containers:\n  ```\n  docker-compose logs server\n  docker-compose logs client\n  docker-compose logs mongo\n  ```\n\n- To rebuild containers after code changes:\n  ```\n  docker-compose up -d --build\n  ```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaghib%2Fgemini-chat-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaghib%2Fgemini-chat-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaghib%2Fgemini-chat-bot/lists"}