A modern, responsive web application that replicates the Google Gemini AI chat interface using React.js and the Google Generative AI API.
- Interactive Chat Interface: Clean and intuitive UI similar to Google Gemini
- Real-time AI Responses: Powered by Google's Generative AI API
- Responsive Design: Works seamlessly across desktop, tablet, and mobile devices,
- Chat History: Maintains conversation history with recent prompts
- Collapsible Sidebar: Toggle sidebar for better screen utilization
- Typing Animation: Smooth text animation for AI responses
- Modern UI/UX: Beautiful gradient text effects and hover animations.
https://gemini-clone-11.onrender.com
- Frontend Framework: React.js 18
- Build Tool: Vite
- Styling: CSS3 with modern flexbox and grid layouts
- AI Integration: Google Generative AI API
- Font: Google Fonts (Outfit)
- Icons: Custom SVG assets
Before running this project, make sure you have the following installed:
git clone https://github.com/mdashad0/Gemini-Clone.git
cd Gemini-Clonenpm installCreate a .env file in the root directory and add your Google Generative AI API key:
VITE_GOOGLE_AI_API_KEY=your_api_key_hereNote: Currently, the API key is stored in the src/config/gemini.js file. For production use, move it to environment variables.
npm run devThe application will be available at http://localhost:5173
gemini-clone/
├── public/
│ └── vite.svg
├── src/
│ ├── assets/
│ │ ├── assets.js # Asset exports
│ │ └── *.png # UI icons and images
│ ├── components/
│ │ ├── Main/
│ │ │ ├── Main.jsx # Main chat interface
│ │ │ └── Main.css # Main component styles
│ │ └── Sidebar/
│ │ ├── Sidebar.jsx # Navigation sidebar
│ │ └── Sidebar.css # Sidebar styles
│ ├── config/
│ │ └── gemini.js # Google AI API configuration
│ ├── context/
│ │ └── Context.jsx # React Context for state management
│ ├── App.jsx # Root component
│ ├── main.jsx # Application entry point
│ └── index.css # Global styles
├── package.json
├── vite.config.js
└── README.md
- Get your API key from Google AI Studio
- Update the API key in
src/config/gemini.js:
const apiKey = "YOUR_API_KEY_HERE";- Styling: Modify CSS files in component folders
- AI Model: Change the model in
src/config/gemini.js - UI Assets: Replace icons in
src/assets/folder
- Welcome message with gradient text
- Quick action cards for common prompts
- Message input with send functionality
- Response display with typing animation
- Collapsible design
- Recent chat history
- Quick access buttons (Help, Activity, Settings)
- Responsive hamburger menu for mobile
The application is fully responsive with breakpoints for:
- Desktop: Full sidebar and expanded layout
- Tablet: Collapsed sidebar with icons
- Mobile: Off-canvas sidebar with overlay
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint code
npm run lintContributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
MD Ashad
- Google Generative AI team for the powerful API
- React.js community for the excellent documentation
- Vite team for the lightning-fast build tool
If you have any questions or need help, please open an issue on GitHub.
⭐ Star this repository if you found it helpful!