Ai Coding Tools

How to Build a Simple App with GitHub Copilot in 1 Hour

By BTW Team4 min read

How to Build a Simple App with GitHub Copilot in 1 Hour

If you're like me, you've probably found yourself staring at a blank screen, overwhelmed by the thought of building an app from scratch. The good news is that with tools like GitHub Copilot, you can dramatically speed up the process. In this guide, I’ll walk you through how to build a simple app in about an hour using GitHub Copilot.

Prerequisites: What You Need to Get Started

Before diving in, make sure you have the following:

  • GitHub Account: You’ll need this to use GitHub Copilot.
  • Visual Studio Code: This is where you’ll write your code. Download it here.
  • GitHub Copilot Subscription: Costs $10/month or $100/year. There’s a free trial available.
  • Basic Understanding of JavaScript: Familiarity with JavaScript will help you understand the code Copilot generates.

Step 1: Set Up Your Environment (10 Minutes)

  1. Install Visual Studio Code: If you haven’t done so already, download and install it.
  2. Install GitHub Copilot: Go to the Extensions view in VS Code and search for "GitHub Copilot". Click install.
  3. Sign In: After installation, sign in to your GitHub account and activate your Copilot subscription.

Step 2: Create a New Project (10 Minutes)

  1. Open VS Code and create a new folder for your project.
  2. Initialize a Git Repository: Open the terminal in VS Code (Ctrl + backtick) and run:
    git init
    
  3. Create an HTML File: Create a new file called index.html and add the basic HTML structure. You can type ! and hit Tab to auto-generate the skeleton.

Expected Output

Your index.html should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple App</title>
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

Step 3: Use GitHub Copilot to Generate JavaScript (20 Minutes)

  1. Create a JavaScript File: Make a new file called app.js.
  2. Start Writing Functions: Begin typing a function like function greet() { and let Copilot suggest the rest. Hit Tab to accept suggestions.
  3. Add Event Listeners: For example, if you want a button to trigger the greet function, type:
    document.getElementById('myButton').addEventListener('click', greet);
    

Expected Output

Your app.js will look something like this:

function greet() {
    alert('Hello from GitHub Copilot!');
}

document.getElementById('myButton').addEventListener('click', greet);

Step 4: Connect JavaScript to HTML (10 Minutes)

  1. Add a Button in index.html: Include a button that will trigger the greet function.
    <button id="myButton">Greet Me!</button>
    
  2. Link the JavaScript File: At the end of your index.html, add:
    <script src="app.js"></script>
    

Expected Output

Your complete index.html should now look like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple App</title>
</head>
<body>
    <h1>Hello, World!</h1>
    <button id="myButton">Greet Me!</button>
    <script src="app.js"></script>
</body>
</html>

Step 5: Test Your App (5 Minutes)

  1. Open Your HTML File: Right-click on index.html in the file explorer and select "Open with Live Server" (you may need to install the Live Server extension).
  2. Click the Button: Click the "Greet Me!" button and see if the alert pops up.

Troubleshooting

  • Button Not Working: Ensure your JavaScript file is correctly linked and that there are no syntax errors in your code.
  • Copilot Suggestions Not Appearing: Make sure you're signed in and that the extension is enabled.

What's Next?

Now that you have a basic app up and running, consider expanding its functionality. You could add styles with CSS, implement more complex JavaScript features, or even integrate an API. The possibilities are endless!

Conclusion: Start Here

Building an app with GitHub Copilot is not only feasible but also quite simple if you follow this guide. The key is to leverage Copilot effectively to speed up your coding process. Remember, practice makes perfect, so don’t hesitate to experiment with different features and functionalities.

What We Actually Use: For our own projects, we rely heavily on GitHub Copilot for rapid prototyping and coding assistance, especially when we’re pressed for time.

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

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time

10 AI Coding Tools That Will Drastically Reduce Your Debugging Time As a developer, whether you're just starting out or have years of experience, debugging can feel like a neverend

Oct 16, 20265 min read
Ai Coding Tools

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
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