An awesome AI-powered coding platform that lets you build web applications with real-time preview and intelligent AI assistance. Code with vibes! ✨
- 🎨 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
- 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
- Node.js 18+ installed
- OpenAI API key (Get one here)
-
Clone the repository
git clone <your-repo-url> cd cursordefinitivni
-
Install dependencies
npm install
-
Set up environment variables
cp .env.example .env
Edit
.envand add your OpenAI API key:OPENAI_API_KEY=your_openai_api_key_here OPENAI_MODEL=gpt-4o-mini # or gpt-5-nano
-
Run the development server
npm run dev
-
Open your browser
Navigate to http://localhost:3000
Visit the homepage to see the beautiful landing page with feature highlights.
- Click "Start Coding" to enter the editor
- Sidebar: View and manage your files
- Click a file to open it
- Click ➕ to add a new file
- Click 🗑️ to delete a file
- Code Editor: Write your code with syntax highlighting and autocomplete
- Live Preview: See your changes in real-time
- AI Assistant: Ask questions or get coding help in the chat panel
The AI assistant can help you with:
- 💡 Generate code snippets
- 🐛 Debug and fix errors
- 📚 Explain code concepts
- ✨ Suggest improvements
- 🎨 Create designs and layouts
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"
Edit app/globals.css to customize colors:
:root {
--background: 224 71% 4%;
--primary: 263 70% 50%;
/* Add your custom colors */
}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 modelgpt-4-turbo- More powerful for complex tasksgpt-4- Most capable model
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
Customize the editor in components/CodeEditor.tsx:
options={{
fontSize: 14,
fontFamily: "'Fira Code', Consolas, monospace",
minimap: { enabled: true },
// Add more options
}}The platform respects OpenAI's rate limits:
- GPT-4o mini: 500 RPM (Tier 1)
- GPT-5 nano: 500 RPM (Tier 1)
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is open source and available under the MIT License.
- Monaco Editor by Microsoft
- OpenAI for amazing AI models
- Next.js team for the awesome framework
- Vercel for inspiration
If you see "OpenAI API key not configured":
- Make sure you created a
.envfile - Check that
OPENAI_API_KEYis set correctly - Restart the development server
If the preview doesn't show:
- Check the browser console for errors
- Make sure your HTML has proper structure
- Try refreshing the preview manually
If the editor feels slow:
- Disable minimap:
minimap: { enabled: false } - Reduce font size
- Close unused files
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