Loading repository data…
Loading repository data…
Chiragj2003 / repository
Gemini Clone by Chirag Joshi | React + Vite + Gemini API | Full-featured Google Gemini AI chat interface clone
A beautifully designed clone of Google Gemini with a clean, professional interface matching the original design. Built with React and powered by Google's Generative AI.
Clone the repository
git clone https://github.com/Chiragj2003/gemini-clone.git
cd gemini-clone
Install dependencies
npm install
Set up environment variables
Copy the example file and add your API key:
cp .env.example .env
Edit .env and add your Gemini API key:
VITE_GEMINI_API_KEY=your_api_key_here
Start the development server
npm run dev
Open in browser
Navigate to http://localhost:5173
Primary Color: #1a73e8 (Google Blue)
Hover Color: #1557b0
Background: #ffffff
Surface: #f8f9fa
Text Primary: #202124
Text Secondary: #5f6368
Border: #dadce0
gemini-clone/
├── src/
│ ├── components/
│ │ ├── Main/
│ │ │ ├── Main.jsx # Main chat interface
│ │ │ └── main.css # Main component styles
│ │ ├── Sidebar/
│ │ │ ├── Sidebar.jsx # Navigation sidebar
│ │ │ └── Sidebar.css # Sidebar styles
│ │ └── ai/
│ │ ├── chat.jsx # Chat response renderer
│ │ └── code-highlighter.jsx # Code block component
│ ├── context/
│ │ └── context.jsx # Global state management
│ ├── config/
│ │ └── gemini.js # AI configuration
│ ├── assets/
│ │ └── assets.js # Image/icon assets
│ ├── App.jsx # Root component
│ ├── main.jsx # Entry point
│ └── index.css # Global styles
├── public/ # Static assets
├── .env.example # Environment variables template
├── FEATURES.md # Complete feature list
├── DESIGN_UPDATES.md # Design documentation
└── README.md # This file
| Technology | Version | Purpose |
|---|---|---|
| React | 18.3.1 | UI Framework |
| Vite | 6.0.1 | Build Tool |
| Google Generative AI | 0.21.0 | AI Integration |
| React Markdown | 9.0.1 | Markdown Rendering |
| React Syntax Highlighter | 15.6.1 | Code Highlighting |
| Lucide React | 0.468.0 | Icons |
| Tailwind CSS | 3.4.16 | Utility Styles |
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint
Edit /src/index.css CSS variables:
:root {
--primary-color: #1a73e8; /* Change primary color */
--text-primary: #202124; /* Change text color */
/* ... more variables */
}
Update the font import in /src/index.css:
@import url('https://fonts.googleapis.com/css2?family=Your+Font&display=swap');
Edit the cards in /src/components/Main/Main.jsx:
<div className="card" onClick={() => handleCardClick('Your prompt here')}>
<p>Your suggestion text</p>
<img src={assets.your_icon} alt="Icon" />
</div>
.env file has the correct API keynpm run devVITE_ for Vite to recognize itnpm install to ensure all dependencies are installedrm -rf node_modules package-lock.json && npm installnode -v (should be 16+)Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)Contributions are welcome! Please follow these steps:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is open source and available under the MIT License.
Chirag
Built with ❤️ using React and Google Gemini AI
For questions or support, please open an issue on GitHub.