Ai Coding Tools

How to Use GitHub Copilot to Write a Full Web App in 2 Hours

By BTW Team4 min read

Comparing tools? See the AI tools tested on the show.

In short

A step-by-step guide on leveraging GitHub Copilot to accelerate the development of a complete web application in just 2 hours.

If you’ve ever felt overwhelmed by the prospect of building a web app, you’re not alone. Many indie hackers and solo founders share the same anxiety. The idea of writing thousands of lines of code can be daunting. But what if I told you that you could leverage GitHub Copilot to streamline the process and actually build a full web app in just two hours? Sounds too good to be true? Let’s break it down.

What is GitHub Copilot?

GitHub Copilot is an AI-powered code completion tool that suggests whole lines or blocks of code as you type. It’s like having a pair of experienced developers sitting beside you, ready to offer code snippets, functions, and even entire class structures based on your comments and the context of your project.

Pricing Breakdown

  • Free Tier: Available for individuals and students with limited features.
  • Pro Plan: $10/month for individuals or $19/month for businesses.
  • Enterprise Plan: Custom pricing for larger teams with enhanced features.

Best For

  • Indie hackers: Especially useful for those who are not full-time developers and need faster coding solutions.
  • Prototyping: Rapidly testing ideas and building MVPs.

Limitations

  • Contextual Understanding: It can misinterpret your intent, leading to incorrect suggestions.
  • Dependency on Internet: Requires a reliable internet connection to function.
  • Code Quality: While it generates code, it may not always follow best practices or be optimized.

Prerequisites for Building Your Web App

Before diving in, here’s what you’ll need:

  • GitHub account: Sign up for free if you don’t have one.
  • Visual Studio Code: Download and install this code editor.
  • GitHub Copilot extension: Install it from the VS Code marketplace.
  • Basic knowledge of JavaScript: Familiarity with the language will help you guide Copilot effectively.

Step-by-Step Guide to Building a Web App

Step 1: Set Up Your Environment (15 minutes)

  1. Install Visual Studio Code: If you haven't already, download and install VS Code.
  2. Install GitHub Copilot: Go to the Extensions Marketplace and search for GitHub Copilot to install it.
  3. Create a New Project: Open VS Code and create a new folder for your web app.

Step 2: Initialize Your Project (20 minutes)

  1. Create an HTML file: Start with index.html and add basic HTML structure.
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Your Web App</title>
    </head>
    <body>
        <h1>Welcome to My Web App</h1>
    </body>
    </html>
    
  2. Set Up CSS and JS Files: Create styles.css and app.js files for styling and functionality.
  3. Link Your Files: Add links to styles.css and app.js in your HTML.

Step 3: Use GitHub Copilot to Generate Code (1 hour)

  1. Comment Your Intent: For example, write // Create a button in your app.js file. Copilot will suggest code for you.
  2. Accept Suggestions: Use the Tab key to accept Copilot's suggestions or modify them as needed.
  3. Iterate Quickly: Continue writing comments to guide Copilot in generating the components you need (like forms, API calls, etc.).

Step 4: Testing Your Web App (20 minutes)

  1. Open Live Server: Use the Live Server extension in VS Code to run your app locally.
  2. Debugging: Check the console for any errors and refine your code using Copilot’s suggestions.

Step 5: Deployment (15 minutes)

  1. Choose a Hosting Platform: Consider platforms like Vercel or Netlify (both free for basic usage).
  2. Deploy Your App: Follow their guides to push your code and make your web app live.

What Could Go Wrong

  • Code Errors: Sometimes, Copilot generates code that doesn’t work as intended. Always test and debug.
  • Misunderstood Context: If you’re vague in your comments, Copilot might suggest irrelevant code. Be specific.

What’s Next?

Now that you have a basic web app up and running, consider adding features like authentication, a database, or even integrating third-party APIs. This is where you can further explore GitHub Copilot's capabilities to enhance your project.

Conclusion: Start Here

If you’re ready to build your first web app using GitHub Copilot, follow the steps outlined above. It’s an incredibly powerful tool that, when used correctly, can significantly speed up your development process. Start with a simple project, and before you know it, you’ll be shipping more features in less time.

What We Actually Use

We use GitHub Copilot along with VS Code, Vercel for deployment, and Postman for API testing. This stack has allowed us to build and iterate quickly without being bogged down by coding minutiae.

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools

Watch real AI builds every week

Built This Week is a weekly podcast where Jordan Metzner and Sam Nadler build something real with AI every episode, test new AI tools and talk with founders who build with AI.

See the tools
Ai Coding Tools

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them)

3 AI Coding Tools That Are Overrated (and Why You Should Avoid Them) In the everevolving landscape of AI coding tools, it's easy to get swept up in the hype. As indie hackers and s

Nov 30, 20263 min read
Ai Coding Tools

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026

5 Ways AI Coding Tools Can Accelerate Your MVP Development in 2026 In 2026, the landscape for indie hackers and solo founders has evolved significantly, especially with the advent

Nov 26, 20264 min read
Ai Coding Tools

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026

5 AI Coding Tools That Make Legacy Code Feel Brand New in 2026 If you’re a developer stuck maintaining legacy code, you know the frustration. It’s like navigating a maze blindfolde

Nov 23, 20264 min read
Ai Coding Tools

10 AI Coding Tools That Will Save You Hours of Debugging in 2026

10 AI Coding Tools That Will Save You Hours of Debugging in 2026 Debugging can feel like a neverending cycle of frustration. Whether you're a solo founder or an indie hacker, spend

Nov 18, 20265 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for MVP Development

10 Common Mistakes When Using AI Coding Tools for MVP Development As a founder in 2026, you’re likely aware that AI coding tools can significantly speed up the MVP development proc

Nov 16, 20264 min read
Ai Coding Tools

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026

5 AI Coding Myths Every Beginner Developer Should Ditch in 2026 As a beginner developer, you’ve probably come across a ton of buzz surrounding AI coding tools. But with all the hyp

Nov 12, 20263 min read