Course එකට ආපසු

Replit Alternative

15 මිනිත්තු🏋️Activity

Replit Alternative

Replit offers a different approach — you'll see the actual code while still getting AI assistance. Let's explore this powerful alternative.

🎯 Lesson Objectives

By the end of this lesson, you will:

  • Understand what Replit offers compared to v0.dev
  • Set up a Replit account
  • Create your first project with AI assistance
  • Know when to use Replit vs v0.dev

v0.dev vs Replit

v0.dev
Replit
AI generates complete UI
Full coding environment + AI
Code hidden by default
You see all the code
Create without understanding
Learn as you create
Browser only
Browser + Mobile app
React/Next.js focused
Any language/framework
Instant UI results
More control, more learning

When to Choose Each

Decision Guide

Choose Replit when you:

  • Want to see and understand the code
  • Want to learn how things work
  • Need to use the mobile app
  • Want to try different programming languages

Choose v0.dev when you:

  • Want the fastest visual results
  • Don't need to see the code
  • Want React/Next.js components specifically
  • Just want to create without learning syntax

Step 1: Get Replit

Replit Setup

0/4

Mobile Users

Replit has a dedicated mobile app! Search "Replit" in your app store for coding on the go.


Step 2: Create Your First Repl

A "Repl" is a Replit project. Here's how to create one:

Create a Repl

0/4

Step 3: Understanding the Interface

Text

Key Areas:

  • Files panel — See all your project files
  • Code editor — Write and edit code
  • Preview — See your webpage live
  • AI Assistant — Get AI help
  • Run button — Execute your code

Step 4: Understanding the Files

Every HTML/CSS/JS project has three main files:

FilePurposeAnalogy
index.htmlStructureThe skeleton/bones
style.cssAppearanceThe clothes/skin
script.jsBehaviorThe brain/muscles

Remember the Trinity?

This is the Web Trinity from Module 3 in action!

  • HTML = Structure
  • CSS = Style
  • JavaScript = Behavior

Step 5: Using Replit AI

Replit has built-in AI assistance. Here's how to use it:

Method 1: AI Chat

  • Click the AI icon or chat panel
  • Describe what you want
  • AI suggests code or makes changes

Method 2: Inline AI

  • Start typing in the editor
  • AI suggests completions
  • Press Tab to accept

Method 3: Select + Ask

  • Select some code
  • Right-click → "Ask AI"
  • Get explanations or modifications

Practice: Create a Welcome Page

Let's use Replit AI to build something:

Replit AI Prompt
Create a simple welcome page with: - A large heading saying 'Welcome to My Site' - A paragraph with a short introduction about me - A button that says 'Learn More' - Center everything on the page - Use a nice blue color scheme
ChatGPTClaude

Welcome Page Exercise

0/6

Reading the Generated Code

After AI generates code, take a moment to look at it:

In index.html:

HTML
<h1>Welcome to My Site</h1>
<p>This is my introduction...</p>
<button>Learn More</button>

In style.css:

CSS
body {
text-align: center;
background-color: #e3f2fd;
}
h1 {
color: #1565c0;
}

The Learning Advantage

Unlike v0.dev, Replit shows you exactly what code creates your design. This is how you gradually learn to read and understand code!


Sharing Your Replit Project

To share your creation:

  1. Click Run (make sure your project runs)
  2. Look at the preview panel header
  3. Click the expand/external link icon
  4. Copy the URL (format: projectname.username.repl.co)

Your Live URL

Your Replit project gets a URL like:

https://my-first-page.yourname.repl.co

Anyone with this link can see your creation!


Quick Comparison Summary

If You Want...Use...
Fastest visual UI creationv0.dev
To see and learn from codeReplit
Mobile app for codingReplit
React componentsv0.dev
Multiple language supportReplit
Pure no-code experiencev0.dev

✅ Lesson Summary

What you learned:

  1. Replit shows you all the code (great for learning)
  2. Three files make up a web project: HTML, CSS, JS
  3. Replit AI can generate and modify code for you
  4. Choose v0.dev for speed, Replit for learning

Both Are Valid

There's no "wrong" choice between v0.dev and Replit. They're different tools for different purposes.

Use what works best for your current goal!


📝 Quick Quiz

📝 Quiz

1/3

What does Replit show that v0.dev hides by default?


➡️ Next Lesson

Now you know both tools! In the next lesson, we'll put everything together to build a complete, shareable website using only AI prompts!