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

How to Integrate AI Coding Tools into Your Everyday Workflow: A 30-Minute Guide

How to Integrate AI Coding Tools into Your Everyday Workflow: A 30Minute Guide As a solo founder or indie hacker, you’re constantly juggling tasks. The promise of AI coding tools i

Jun 28, 20265 min read
Ai Coding Tools

How to Use Codeium for Faster Development in 60 Minutes

How to Use Codeium for Faster Development in 60 Minutes If you’re a solo founder or indie hacker, you know that time is your most precious resource. Every minute spent coding is a

Jun 28, 20264 min read
Ai Coding Tools

Supabase vs Firebase: Best AI Integrations for Your Project in 2026

Supabase vs Firebase: Best AI Integrations for Your Project in 2026 As a solo founder or indie hacker, choosing the right backend service can feel like navigating a minefield, espe

Jun 28, 20264 min read
Ai Coding Tools

GitHub Copilot vs. Codeium: Which AI Coding Tool Delivers Better Code?

GitHub Copilot vs. Codeium: Which AI Coding Tool Delivers Better Code? As indie hackers and solo founders, we often find ourselves strapped for time, juggling multiple projects whi

Jun 28, 20264 min read
Ai Coding Tools

How to Develop a Simple App Using AI Coding Tools in Just 2 Hours

How to Develop a Simple App Using AI Coding Tools in Just 2 Hours If you're a solo founder or indie hacker, the idea of developing an app can be daunting. You might think you need

Jun 28, 20264 min read
Ai Coding Tools

The Real Difference: GitHub Copilot vs Cursor for Expert Programmers

The Real Difference: GitHub Copilot vs Cursor for Expert Programmers As expert programmers, we often find ourselves in a constant battle against time and complexity. The tools we c

Jun 28, 20263 min read