Ai Coding Tools

How to Build Your First Web App Using Cursor and GitHub Copilot in 2 Hours

By BTW Team4 min read

How to Build Your First Web App Using Cursor and GitHub Copilot in 2026

Have you ever felt overwhelmed by the idea of building your first web app? You’re not alone. Many indie hackers and solo founders struggle with where to start, often getting bogged down by the complexity of coding and the myriad of tools available. But here’s a contrarian insight: with the right tools, you can get a functional web app up and running in just 2 hours. In this guide, we’ll walk through using Cursor and GitHub Copilot, two powerful AI coding tools that can make the process smoother and faster.

Prerequisites: What You Need Before You Start

Before diving into the build, here’s what you need to have ready:

  • A GitHub account: This is where your code will be stored. Sign up for free if you don’t have one.
  • Cursor installed: Cursor is a code editor that leverages AI to assist you in writing code. You can download it for free here.
  • GitHub Copilot: This AI-powered coding assistant integrates directly into your editor. It costs $10/month after a free trial.
  • Basic understanding of HTML, CSS, and JavaScript: While you don’t need to be an expert, familiarity with these languages will help.

Step 1: Set Up Your Environment (30 Minutes)

  1. Download and install Cursor from the official website.
  2. Sign in to GitHub within Cursor to enable Copilot.
  3. Enable GitHub Copilot in Cursor settings. You might need to enter your payment details if you’re past the trial period.

Expected Output: You should have a fully functioning Cursor environment with GitHub Copilot enabled.

Step 2: Create a New Project (15 Minutes)

  1. Open Cursor and create a new project.
  2. Initialize a Git repository with the command:
    git init
    
  3. Create the basic file structure:
    • index.html
    • style.css
    • script.js

Expected Output: Your project folder with the basic files set up.

Step 3: Build Your Web App (1 Hour)

Now comes the fun part—actually building your web app. We’ll create a simple to-do list app as an example.

3.1: HTML Structure

In index.html, start by defining the basic structure. Use GitHub Copilot to speed things up. You can begin typing out your HTML and let Copilot suggest the rest.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>To-Do List App</title>
</head>
<body>
    <h1>My To-Do List</h1>
    <input type="text" id="task-input" placeholder="Add a new task">
    <button id="add-task">Add Task</button>
    <ul id="task-list"></ul>
    <script src="script.js"></script>
</body>
</html>

3.2: CSS Styling

In style.css, add some basic styles to make your app look decent. Again, let Copilot assist where it can.

body {
    font-family: Arial, sans-serif;
}
h1 {
    color: #333;
}
#task-input {
    margin-right: 10px;
}

3.3: JavaScript Functionality

In script.js, implement the functionality to add tasks to your list. Use Copilot to generate functions quickly.

document.getElementById('add-task').onclick = function() {
    const taskInput = document.getElementById('task-input');
    const newTask = taskInput.value;
    if (newTask) {
        const li = document.createElement('li');
        li.textContent = newTask;
        document.getElementById('task-list').appendChild(li);
        taskInput.value = ''; // Clear input
    }
};

Expected Output: A functional to-do list app that allows you to add tasks.

Troubleshooting: What Could Go Wrong

  • Copilot doesn’t suggest code: Make sure you’re signed into GitHub and that Copilot is enabled in Cursor.
  • Syntax errors: Double-check your code for any typos or missing brackets.
  • Styling issues: Inspect elements in your browser to identify any CSS problems.

What’s Next: Deploy Your App

Once your app is built and tested locally, you can deploy it using platforms like GitHub Pages (free) or Vercel (free tier available). Follow the platform's documentation for deployment instructions.

Conclusion: Start Here

Building your first web app doesn’t have to take weeks or even days. With tools like Cursor and GitHub Copilot, you can accomplish it in about 2 hours. If you’re ready to take the plunge, gather your prerequisites, follow the steps outlined above, and get coding.

What We Actually Use

In our experience, we use Cursor for its intuitive interface and GitHub Copilot for its smart suggestions. While it’s not perfect, it significantly speeds up our development process.

Follow Our Building Journey

Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.

Subscribe

Never miss an episode

Subscribe to Built This Week for weekly insights on AI tools, product building, and startup lessons from Ryz Labs.

Subscribe
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for Beginners

10 Common Mistakes When Using AI Coding Tools for Beginners As a beginner in coding, diving into AI coding tools can feel like a doubleedged sword. On one hand, these tools promise

Oct 8, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back

5 Common Misconceptions About AI Coding Tools and Why They Hold You Back As a solo founder or indie hacker, you might be considering leveraging AI coding tools to boost your produc

Oct 7, 20264 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning

5 Common Misconceptions About AI Coding Tools That Will Hurt Your Learning As a beginner in coding, diving into the world of AI coding tools can feel like stepping into a futuristi

Oct 6, 20263 min read
Ai Coding Tools

10 AI Coding Tools Beginners Overlook in 2026

10 AI Coding Tools Beginners Overlook in 2026 As a beginner in coding, diving into the vast ocean of AI tools can feel overwhelming. While flashy tools often grab the spotlight, ma

Oct 6, 20265 min read
Ai Coding Tools

5 Common Misconceptions About AI Coding Tools That Beginners Believe

5 Common Misconceptions About AI Coding Tools That Beginners Believe As a solo founder or indie hacker, diving into the world of AI coding tools can feel overwhelming, especially i

Oct 5, 20263 min read