CohereBuilder is a modern web application that enables developers to generate React components using natural language. Similar to V0.dev, this platform allows you to describe the UI components you need in plain English, and our AI will generate the corresponding React code with a live preview.
- 🤖 AI-powered generation - Create React components with natural language prompts
- 💻 Modern three-panel UI - Chat interface, code editor, and live preview in one app
- 🎨 Live component previews - See your components as they're built
- 📝 Code editing - Syntax highlighting and easy customization
- 📦 Code export - Download individual components or entire projects as ZIP files
- 🚀 Serverless architecture - Powered by Vercel Edge Functions for fast response times
- 🌐 Web-based - No installation required, works in your browser
- 🌓 Dark theme - Easy on the eyes for comfortable development
- 📱 Responsive design - Works on desktop, tablet, and mobile devices
- Next.js - React framework with serverless capabilities
- React - UI component library
- TypeScript - Type-safe JavaScript
- Tailwind CSS - Utility-first CSS framework
- Cohere API - AI-powered code generation
- Vercel - Deployment and serverless functions
- Edge Runtime - Fast, globally distributed API endpoints
- JSZip - ZIP file generation for code export
- Node.js 18.0 or later
- npm or yarn
-
Clone this repository:
git clone https://github.com/likhon-developer/CohereBuilder.git cd CohereBuilder
-
Install dependencies:
npm install
-
Create a
.env.local
file in the root directory with your Cohere API key:COHERE_API_KEY=your_api_key_here NEXT_PUBLIC_COHERE_API_KEY=your_api_key_here
-
Start the development server:
npm run dev
-
Open http://localhost:3000 in your browser to see the application.
The easiest way to deploy your CohereBuilder is to use the Vercel Platform.
- Push your code to a Git repository (GitHub, GitLab, Bitbucket)
- Import the project to Vercel
- Add your environment variables in the Vercel dashboard
- Deploy!
Or deploy directly from the CLI:
npm run deploy
src/
├── app/ # Next.js app router files
│ ├── api/ # Serverless API routes
│ ├── page.tsx # Main application page
│ └── layout.tsx # Root layout
├── components/ # React components
│ ├── ui/ # UI primitives
│ ├── chat-interface.tsx # Chat interface component
│ └── code-panel.tsx # Code editor and preview
├── lib/ # Utility functions and API clients
│ ├── cohere-api.ts # Cohere API integration
│ └── utils.ts # Helper functions
public/ # Static files
- Enter a description of the component you want to create in the chat interface
- The AI will generate a React component based on your description
- Preview the component in real-time in the right panel
- Edit the code if needed
- Export the component for use in your project
- "Create a responsive navbar with a logo, navigation links and a mobile menu"
- "Build a product card with image, title, price, rating stars and add to cart button"
- "Design a contact form with name, email, message fields, and validation"
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by likhon-developer