A full-stack AI chatbot built using React, Express.js, and Google's Gemini API.
- AI-powered conversations using Gemini
- React frontend
- Express.js backend
- Secure API key management with
.env - Chat history display
- REST API communication between frontend and backend
- Easy to extend with dark mode, markdown, and code highlighting
- React
- Vite
- JavaScript
- CSS
- Node.js
- Express.js
- CORS
- Dotenv
- Google Gemini API
aichatbot/
│
├── src/
│ ├── components/
│ │ └── ChatBot.jsx
│ └── App.jsx
│
├── Backend/
│ ├── server.js
│ ├── package.json
│ └── .env (Not included in repository)
│
├── .gitignore
├── package.json
└── README.md
git clone https://github.com/pranithakshayreddy-tech/aichatbot.git
cd aichatbotnpm installcd Backend
npm installCreate a .env file inside the Backend folder.
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
Do not commit the .env file to GitHub.
cd Backend
node server.jsBackend runs on:
http://localhost:5000
Open another terminal:
npm run devFrontend runs on:
http://localhost:5173
React Frontend
│
▼
Express Backend
│
▼
Google Gemini API
│
▼
Express Backend
│
▼
React Frontend
- ChatGPT-like UI
- Dark mode
- Typing animation
- Markdown support
- Code syntax highlighting
- Chat history persistence
- User authentication
Pranith Akshay Reddy