Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🚀 Vibe Coding Platform

An awesome AI-powered coding platform that lets you build web applications with real-time preview and intelligent AI assistance. Code with vibes! ✨

Next.js TypeScript Tailwind CSS OpenAI

✨ Features

  • 🎨 Beautiful Modern UI - Stunning gradient design with smooth animations
  • 💻 Monaco Code Editor - The same editor that powers VS Code
  • 👀 Live Preview - See your changes instantly in a sandboxed iframe
  • 🤖 AI Assistant - Chat with GPT-4o mini or GPT-5 nano for coding help
  • 📁 File Management - Create, edit, and delete files with ease
  • 🎯 Syntax Highlighting - Support for HTML, CSS, JavaScript, and more
  • ⚡ Auto-Save - Changes are automatically reflected in preview
  • 🌈 Responsive Design - Works beautifully on all screen sizes

🎯 Tech Stack

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Editor: Monaco Editor
  • AI: OpenAI GPT-4o mini / GPT-5 nano
  • State Management: Zustand
  • Animations: Framer Motion
  • Icons: Lucide React

🚀 Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone <your-repo-url>
    cd cursordefinitivni
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env

    Edit .env and add your OpenAI API key:

    OPENAI_API_KEY=your_openai_api_key_here
    OPENAI_MODEL=gpt-4o-mini  # or gpt-5-nano
  4. Run the development server

    npm run dev
  5. Open your browser

    Navigate to http://localhost:3000

📖 Usage

Landing Page

Visit the homepage to see the beautiful landing page with feature highlights.

Editor

  1. Click "Start Coding" to enter the editor
  2. Sidebar: View and manage your files
    • Click a file to open it
    • Click ➕ to add a new file
    • Click 🗑️ to delete a file
  3. Code Editor: Write your code with syntax highlighting and autocomplete
  4. Live Preview: See your changes in real-time
  5. AI Assistant: Ask questions or get coding help in the chat panel

AI Assistant Features

The AI assistant can help you with:

  • 💡 Generate code snippets
  • 🐛 Debug and fix errors
  • 📚 Explain code concepts
  • ✨ Suggest improvements
  • 🎨 Create designs and layouts

Example Prompts

Try asking the AI:

  • "Create a responsive navigation bar"
  • "Add a gradient background animation"
  • "How do I center a div?"
  • "Generate a contact form with validation"
  • "Explain how flexbox works"

🎨 Customization

Changing the Theme

Edit app/globals.css to customize colors:

:root {
  --background: 224 71% 4%;
  --primary: 263 70% 50%;
  /* Add your custom colors */
}

Using Different AI Models

You can use various OpenAI models by setting the OPENAI_MODEL environment variable:

  • gpt-4o-mini - Fast and cost-effective (default)
  • gpt-5-nano - Fastest, most efficient GPT-5 model
  • gpt-4-turbo - More powerful for complex tasks
  • gpt-4 - Most capable model

📁 Project Structure

cursordefinitivni/
├── app/
│   ├── api/
│   │   ├── chat/          # AI chat endpoint
│   │   └── generate/      # Code generation endpoint
│   ├── editor/            # Main editor page
│   ├── globals.css        # Global styles
│   ├── layout.tsx         # Root layout
│   └── page.tsx           # Landing page
├── components/
│   ├── Header.tsx         # Top navigation
│   ├── Sidebar.tsx        # File explorer
│   ├── CodeEditor.tsx     # Monaco editor wrapper
│   ├── Preview.tsx        # Live preview iframe
│   └── ChatPanel.tsx      # AI chat interface
├── lib/
│   ├── store.ts           # Zustand state management
│   └── utils.ts           # Utility functions
└── public/                # Static assets

🔧 Configuration

Monaco Editor Options

Customize the editor in components/CodeEditor.tsx:

options={{
  fontSize: 14,
  fontFamily: "'Fira Code', Consolas, monospace",
  minimap: { enabled: true },
  // Add more options
}}

API Rate Limits

The platform respects OpenAI's rate limits:

  • GPT-4o mini: 500 RPM (Tier 1)
  • GPT-5 nano: 500 RPM (Tier 1)

🤝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📝 License

This project is open source and available under the MIT License.

🙏 Acknowledgments

  • Monaco Editor by Microsoft
  • OpenAI for amazing AI models
  • Next.js team for the awesome framework
  • Vercel for inspiration

🐛 Troubleshooting

API Key Issues

If you see "OpenAI API key not configured":

  1. Make sure you created a .env file
  2. Check that OPENAI_API_KEY is set correctly
  3. Restart the development server

Preview Not Loading

If the preview doesn't show:

  1. Check the browser console for errors
  2. Make sure your HTML has proper structure
  3. Try refreshing the preview manually

Editor Performance

If the editor feels slow:

  1. Disable minimap: minimap: { enabled: false }
  2. Reduce font size
  3. Close unused files

🎉 Have Fun!

Now go build something awesome! If you have questions or need help, the AI assistant is always there for you. Happy coding with vibes! ✨🚀


Made with ❤️ and AI

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages