Gemini Coder#
Gemini Coder is an AI application generation tool based on Google's Gemini API, Next.js, and Tailwind CSS. It can quickly generate complete web application code through simple text descriptions and implement real-time code editing and preview functions in conjunction with Sandpack. Users only need to provide a basic description of the application, and the system can automatically generate the corresponding code and interface, greatly simplifying the development process and improving development efficiency. Whether for rapid prototyping or small application development, Gemini Coder can provide powerful support.
Main Features#
- Code Generation: Automatically generates complete web application code based on simple text descriptions.
- Real-time Preview: Provides real-time code editing and preview functions, allowing users to instantly see the application effects.
- Multi-model Support: Compatible with models such as Gemini 1.5 Pro, Gemini 1.5 Flash, and Gemini 2.0 Flash Experimental, meeting different development needs.
Technical Principles#
- Gemini API: Code generation based on Google's Gemini API, capable of understanding user needs and generating code structures and logic that meet requirements.
- Next.js: As the framework for web applications, it supports static generation and server-side rendering, enhancing application loading speed and SEO performance.
- Tailwind CSS: As a styling framework, it achieves complex layouts and styles through utility class combinations, improving development efficiency and code maintainability.
- Sandpack: Provides real-time code editing and preview functions, offering users an isolated environment to safely edit code and see application changes in real time.
How to Run Gemini Coder#
-
Clone the Repository
First, clone the Gemini Coder GitHub repository:git clone https://github.com/osanseviero/geminiCoder
-
Configure the Environment
Create a .env file in the project root directory and add your Google AI Studio API key:
GOOGLE_AI_API_KEY=your_api_key_here
-
Install Dependencies and Run
Install project dependencies and start the local development server:
npm install npm run dev
-
Access the Application Open a browser and visit http://localhost:3000 to start using Gemini Coder.
Resources
HuggingFace Repository: https://huggingface.co/spaces/osanseviero/gemini-coder
GitHub Repository: https://github.com/osanseviero/geminiCoder
Gemini API Documentation: https://ai.google.dev/gemini-api/docs
Sandpack Documentation: https://sandpack.codesandbox.io/