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

Cursor vs GitHub Copilot: Which AI Coding Tool Provides Better Code Support?

Cursor vs GitHub Copilot: Which AI Coding Tool Provides Better Code Support? (2026) As a solo founder or indie hacker, you're probably juggling multiple projects and trying to maxi

Jul 16, 20263 min read
Ai Coding Tools

Best AI Coding Tools for Indie Developers in 2026

Best AI Coding Tools for Indie Developers in 2026 As an indie developer, finding the right tools to boost productivity while keeping costs low is a constant challenge. In 2026, AI

Jul 16, 20264 min read
Ai Coding Tools

5 Mistakes You'll Make When Relying on AI Coding Tools

5 Mistakes You'll Make When Relying on AI Coding Tools In 2026, AI coding tools are becoming increasingly popular among indie hackers and solo founders. While they promise to make

Jul 16, 20263 min read
Ai Coding Tools

How to Build Your First API Using AI Tools in Under 2 Hours

How to Build Your First API Using AI Tools in Under 2 Hours Building an API can seem daunting, especially if you're a solo founder or indie hacker without a deep technical backgrou

Jul 16, 20264 min read
Ai Coding Tools

Five Myths About AI Coding Tools That Every Developer Should Know

Five Myths About AI Coding Tools That Every Developer Should Know As we dive into 2026, AI coding tools have become more prevalent than ever. But despite their increasing importanc

Jul 16, 20264 min read
Ai Coding Tools

How to Achieve a Functional App with AI Tools in Just 30 Days

How to Achieve a Functional App with AI Tools in Just 30 Days Building an app can often feel like a daunting task, especially if you’re a solo founder or a side project builder. Th

Jul 16, 20264 min read