Back to Documentation

Guides

Step-by-step guides to help you build amazing applications with CodeAI.

Building Your First App

Learn how to generate a complete React application from a simple description.

1

Start a New Workspace

On the CodeAI homepage, describe what you want to build in the input field. For example:

"Create a modern landing page with a hero section, features, and contact form"

Click "Generate" and CodeAI will automatically create a workspace and start building your app.

2

Watch the Generation Process

As CodeAI generates your app, you'll see:

  • Real-time code streaming in the chat panel
  • File structure being created
  • Components being generated one by one
  • Live preview updating as code is applied
3

Review and Iterate

Once generation is complete, you can:

  • View the live preview in the right panel
  • Browse generated files in the file explorer
  • Make edits by chatting with the AI
  • Install additional packages as needed

Cloning Websites

Clone any website by simply pasting its URL and let CodeAI recreate it.

1

Paste the URL

Instead of describing what you want, paste a URL directly into the input field:

https://example.com

CodeAI will automatically detect it's a URL and switch to clone mode.

2

Website Analysis

CodeAI will:

  • Scrape the website content and structure
  • Capture a screenshot for reference
  • Extract brand colors and styling
  • Analyze the layout and components
3

Code Generation

Based on the scraped content, CodeAI generates:

  • React components matching the original design
  • CSS/Tailwind styles to replicate the look
  • Layout structure and navigation
  • Interactive elements and animations
4

Refinement

After the initial clone, you can refine it by:

  • Asking for specific adjustments: "Make the header darker"
  • Adding new features: "Add a newsletter signup form"
  • Improving responsiveness: "Make it mobile-friendly"
  • Optimizing performance: "Reduce bundle size"

Iterative Development Workflow

Use the chat interface to iteratively improve and modify your application.

1

Understanding Edit vs Generate

CodeAI intelligently determines whether to make targeted edits or regenerate:

Targeted Edits (Incremental)

"Change the header color to black"

"Update the hero text"

"Add a button to the footer"

Full Regeneration

"Rebuild the entire app"

"Start over with a new design"

2

Making Edits

To make changes to your app:

  1. Type your request in the chat input at the bottom
  2. Be specific about what you want to change
  3. CodeAI will analyze your request and make targeted edits
  4. Watch the preview update in real-time

Tip: The more specific you are, the better the results. Instead of "fix it", say "change the button color from blue to red".

3

Viewing Changes

After making edits, you can:

  • See which files were modified in the chat
  • View the updated code in the file explorer
  • Check the live preview for visual changes
  • Review the file diff if needed
4

Conversation Context

CodeAI maintains context throughout your conversation:

  • Remembers previously generated components
  • Keeps track of scraped websites
  • Maintains awareness of applied code changes
  • Understands your project structure

This means you can reference previous work: "Update the header we created earlier" or "Make the button match the one in the hero section".

Package Management

Install and manage npm packages for your generated applications.

1

Automatic Detection

CodeAI can automatically detect missing packages:

  • When you import a package that's not installed
  • When you see errors like "react-router-dom not found"
  • When the AI suggests installing specific packages

Simply type "install packages" or "check packages" in the chat, and CodeAI will detect and install what's needed.

2

Manual Installation

You can also request specific packages:

"Install react-router-dom and framer-motion"

CodeAI will install the packages and automatically restart the development server.

3

Package Installation Process

During installation, you'll see:

  • Progress updates in the chat
  • Package names being installed
  • Installation status (success/failure)
  • Automatic dev server restart

Note: The preview may refresh automatically after packages are installed to show the updated application.

Using the Chat Interface

Master the chat interface to get the most out of CodeAI.

1

Chat Input

The chat input at the bottom of the workspace supports:

  • Natural language requests
  • Code generation prompts
  • Edit instructions
  • Package installation requests
  • File operations
2

Message Types

Messages in the chat are color-coded:

  • User messages - Your requests and prompts
  • AI responses - CodeAI's generated code and explanations
  • System messages - Status updates and notifications
  • File updates - Notifications about file changes
  • Errors - Error messages and warnings
3

Model Selection

You can switch between AI models:

  • Claude Haiku 4.5 - Fast and efficient (default)
  • Claude Sonnet 4.5 - More powerful for complex tasks

Use the model selector in the chat interface to switch models. Different models may produce different results for the same prompt.

4

Best Practices for Chatting

To get the best results:

  • Be specific about what you want
  • Reference existing components by name when possible
  • Break complex requests into smaller steps
  • Provide context when asking for changes
  • Use natural language - no need for special syntax

Example:

❌ "Fix it"

✅ "Change the hero section background from blue to a gradient from purple to pink"

File Management

Navigate and manage your project files effectively.

1

File Explorer

The file explorer shows your project structure:

  • Click folders to expand/collapse
  • Click files to view their contents
  • See file icons indicating file types
  • Track which files have been modified
2

Viewing File Contents

When you click a file:

  • The file content appears in the code viewer
  • Syntax highlighting is applied automatically
  • You can copy code snippets
  • File path is shown at the top
3

File Operations

You can request file operations via chat:

  • "Create a new component called Button.jsx"
  • "Delete the old Header.jsx file"
  • "Move the utils folder to src/lib"
  • "Rename App.jsx to Main.jsx"

Ready for More?

Check out our best practices guide to learn advanced techniques and optimization tips.

View Best Practices