How to Use GitHub Copilot to Write a Full App in 2 Hours
How to Use GitHub Copilot to Write a Full App in 2 Hours
In the world of indie hacking and side projects, time is often our most precious resource. The idea of building a full app in just two hours feels ambitious, if not downright impossible. But with tools like GitHub Copilot, it becomes a feasible goal. In this guide, I'll walk you through the process of leveraging GitHub Copilot for rapid app development, sharing practical tips and honest insights from our own experiences.
Prerequisites: What You'll Need
Before diving in, ensure you have the following:
- GitHub Account: Sign up for a free account if you don't have one.
- Visual Studio Code: Download and install VS Code, which is where you'll be coding.
- GitHub Copilot: Subscribe to GitHub Copilot for $10/month (as of July 2026). It offers a free trial for the first 30 days.
- Basic Understanding of JavaScript: Familiarity with JavaScript or TypeScript will help you make the most of Copilot’s suggestions.
Step 1: Set Up Your Environment
- Install GitHub Copilot: Open VS Code, go to the Extensions view, and search for GitHub Copilot. Install it and log in with your GitHub account.
- Create a New Project: Open a new folder in VS Code and create a new file named
app.js(orapp.tsif you prefer TypeScript).
Step 2: Define Your App's Purpose
Take a moment to outline what your app will do. For this example, let’s build a simple to-do list app that allows users to add, view, and delete tasks. Clearly defining your app’s functionality will help Copilot generate relevant code.
Step 3: Start Coding with Copilot
-
Add Basic Structure: Start typing a function to initialize your app. For example, type
function initApp() {and let Copilot suggest the rest. You’ll see it automatically fill in boilerplate code for setting up your HTML and CSS. -
Implement Features:
- Adding Tasks: Type
function addTask(task) {and let Copilot generate the logic for adding a task to an array. - Displaying Tasks: Type
function displayTasks() {and see how Copilot fills in a loop to render tasks to the screen. - Deleting Tasks: Type
function deleteTask(taskId) {for Copilot to suggest how to remove a task from the list.
- Adding Tasks: Type
-
Iterate and Test: As you implement each feature, run the app in your browser to test functionality. You might need to tweak the suggestions Copilot gives you, but it accelerates the process significantly.
Step 4: Troubleshooting Common Issues
What Could Go Wrong
- Code Errors: Sometimes Copilot may suggest code that contains errors. Always test your code frequently to catch these early.
- Unexpected Suggestions: If Copilot doesn’t understand your intent, you can provide comments or more context to guide it. For example, comment
// function to clear all tasksbefore typing.
Solutions
- Use the Copilot Feedback Mechanism: If a suggestion is incorrect, use the thumbs down icon to help improve future suggestions.
- Refer to Documentation: When in doubt, consult the official documentation for JavaScript or any libraries you’re using.
Step 5: Finalize and Deploy Your App
Once your app is functional, consider deploying it. You can use platforms like Vercel or Netlify for easy deployment, which are both free for basic usage.
- Vercel: Free tier available, great for static sites and serverless functions.
- Netlify: Free tier available, offers continuous deployment from GitHub.
What's Next
Now that you’ve built your app, think about the following steps:
- User Feedback: Share your app with a few users to gather feedback. This will help you identify areas for improvement.
- Iterate: Based on feedback, consider adding new features or refining existing ones.
- Explore More Tools: Look into other AI coding tools like Tabnine or Replit Ghostwriter if you want to expand your toolkit.
Conclusion: Start Here
Using GitHub Copilot can significantly streamline your app development process. By following these steps, you can realistically build a full app in just two hours. The key is to stay focused, utilize Copilot effectively, and be prepared to iterate on your work.
If you're looking to build more products and learn along the way, check out our journey on Built This Week.
Follow Our Building Journey
Weekly podcast episodes on tools we're testing, products we're shipping, and lessons from building in public.