Gemini Code Assist

An advanced, full-stack web application that uses Gemini AI API to help developers write, fix, and understand code with ease.

šŸ’” Core Features

  1. Code Generator - Generate complete code snippets in selected languages by describing the task in natural language
  2. Bug Fixing Assistant - Automatically detect and fix bugs in user-submitted code using Gemini's smart analysis
  3. Code Explainer - Understand unfamiliar code with AI-powered natural language explanations
  4. AI Chat Assistant - Chat with Gemini like a programming partner
  5. Prompt History - View all past queries and AI responses, stored locally
  6. Theme Switcher - Toggle between professional dark mode and clean light mode
  7. Smart Prompt System - Automatically structure and enhance user input for better accuracy
  8. Export Feature - Download generated code or explanations as files

🧰 Tech Stack

  • Frontend: React 18, TypeScript, TailwindCSS, Monaco Editor
  • Backend: Hono, TypeScript
  • AI: Gemini Pro API
  • Storage: Local storage for history, SQLite for backend data
  • Extras: File export, notifications, responsive design

šŸš€ Getting Started

  1. Set up your Gemini API key in environment variables as GEMINI_API_KEY
  2. The app will be available at the HTTP endpoint
  3. Start coding with AI assistance!

šŸ“ Project Structure

ā”œā”€ā”€ backend/
│   ā”œā”€ā”€ index.ts           # Main Hono server
│   ā”œā”€ā”€ routes/
│   │   ā”œā”€ā”€ gemini.ts      # Gemini API integration
│   │   └── static.ts      # Static file serving
│   └── database/
│       └── queries.ts     # Database operations
ā”œā”€ā”€ frontend/
│   ā”œā”€ā”€ index.html         # Main HTML template
│   ā”œā”€ā”€ index.tsx          # React entry point
│   ā”œā”€ā”€ components/        # React components
│   └── styles/
ā”œā”€ā”€ shared/
│   └── types.ts           # Shared TypeScript types
└── README.md

Environment Variables

  • GEMINI_API_KEY - Your Google Gemini API key (required)

Usage

Navigate to the app and start using the various AI-powered coding features:

  • Generate code by describing what you need
  • Fix bugs by pasting problematic code
  • Get explanations for complex code snippets
  • Chat with the AI for coding help
  • Export your results and view your history