Ai Coding Tools

How to Build a Simple App with GitHub Copilot in 2 Hours

By BTW Team3 min read

How to Build a Simple App with GitHub Copilot in 2 Hours

Building an app can feel daunting, especially for beginners. You might be wondering, "How can I code something functional in under two hours?" Well, with the right tools, like GitHub Copilot, you can turn your idea into a working prototype without spending a fortune or getting lost in the weeds of traditional coding. In this guide, I’ll walk you through leveraging GitHub Copilot to build a simple app, all within a two-hour window.

Prerequisites

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

  • GitHub Account: Sign up for free if you don’t have one.
  • Visual Studio Code (VSCode): Download and install this code editor.
  • GitHub Copilot Subscription: It costs $10/month for individuals, but there’s a free trial available.
  • Basic Understanding of JavaScript: Knowing the basics will help you tweak the code Copilot suggests.

Step 1: Set Up Your Environment (15 minutes)

  1. Install VSCode: Once installed, open it and install the GitHub Copilot extension.
  2. Sign In: Use your GitHub credentials to authenticate Copilot.
  3. Create a New Project:
    • Open the terminal in VSCode and create a new directory for your app:
      mkdir my-simple-app
      cd my-simple-app
      
    • Initialize a Git repository:
      git init
      

Step 2: Write Your First Lines of Code (30 minutes)

  1. Create an index.html file:

    • Right-click in the file explorer and select "New File". Name it index.html.
    • Start typing the basic structure of an HTML document. Copilot should suggest completing it for you.
  2. Add a Simple UI:

    • Type <body> and start adding elements like buttons or input fields. For example:
      <button id="myButton">Click me!</button>
      <p id="output"></p>
      
    • Copilot will suggest JavaScript functions based on your HTML structure.

Step 3: Implement Logic with JavaScript (30 minutes)

  1. Create a script.js file:
    • In the same way as before, create a new file named script.js.
    • Start typing a function to handle button clicks:
      document.getElementById('myButton').onclick = function() {
          document.getElementById('output').innerText = 'Button clicked!';
      };
      
    • Again, let Copilot suggest the rest of the code.

Step 4: Style Your App (15 minutes)

  1. Create a styles.css file:
    • Create a new file named styles.css.
    • Type some basic CSS rules, such as:
      body {
          font-family: Arial, sans-serif;
          text-align: center;
      }
      
    • Use Copilot to enhance your styles based on your preferences.

Step 5: Test Your App (15 minutes)

  1. Open index.html in a Browser:
    • Right-click the file and select "Open with Live Server" if you have that extension installed. If not, just open it manually in your web browser.
  2. Click the Button: Ensure that everything works as expected.

Troubleshooting Common Issues

  • Copilot Not Suggesting Code: Make sure you’re connected to the internet and Copilot is enabled in VSCode.
  • Browser Not Showing Changes: Refresh the page or clear the cache if you don’t see updates.
  • Errors in JavaScript: Check the console for error messages, which can guide you in debugging.

What’s Next?

Now that you’ve built a simple app, consider expanding its functionality. You could:

  • Integrate an API to fetch data.
  • Add more interactive elements.
  • Deploy your app using platforms like Vercel or Netlify (both have free tiers).

Conclusion

Building an app in just two hours is entirely feasible with GitHub Copilot. It’s not just about speed; it’s about efficiently turning your ideas into functioning prototypes without the usual overhead. Start your coding journey by creating something simple, and let Copilot guide you along the way.

What We Actually Use: In our projects, we rely heavily on GitHub Copilot for rapid prototyping. It saves us time, especially when we need boilerplate code or quick solutions.

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