Ai Coding Tools

How to Use GitHub Copilot to Write Your First Full-Stack App in Just 3 Days

By BTW Team3 min read

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

In short

A step-by-step tutorial guiding beginners on utilizing GitHub Copilot for a quick full-stack application development.

If you're a solo founder or indie hacker, the thought of building a full-stack app can be daunting. You might feel overwhelmed by the sheer amount of code you need to write or the different technologies you need to juggle. But what if I told you that you could leverage AI to speed up the process? Enter GitHub Copilot, a tool that can help you write code faster and more efficiently. In this guide, I'll walk you through how to use GitHub Copilot to build your first full-stack app in just three days.

Time Estimate and Prerequisites

You can finish this project in about 3 days if you dedicate a few solid hours each day. Here’s what you need to get started:

Prerequisites

  • Basic understanding of JavaScript: You should be comfortable with ES6 syntax.
  • GitHub account: You'll need this for Copilot and version control.
  • Node.js and npm installed: Required for running JavaScript on the server.
  • A code editor: Visual Studio Code is recommended because it integrates well with Copilot.

Day 1: Setting Up Your Project

Step 1: Initialize Your Project

  1. Create a new directory for your app.
  2. Run npm init -y in your terminal to create a package.json file.

Step 2: Install Dependencies

You’ll likely need Express for the backend and React for the frontend. Install them with:

npm install express react react-dom

Step 3: Enable GitHub Copilot

In Visual Studio Code, install the GitHub Copilot extension from the marketplace. Once installed, log in with your GitHub account.

Expected Outputs

By the end of Day 1, you should have your project structure set up with basic files:

  • A server.js file for your Express server.
  • A client folder for your React application.

Troubleshooting

  • Copilot not suggesting code: Make sure the extension is enabled and you're in a JavaScript file.

Day 2: Building the Backend

Step 4: Writing Your API

Using GitHub Copilot, start writing your API routes. For example, you can type:

// Create a new route for users
app.get('/users', (req, res) => {
  // Copilot should suggest the logic here
});

Step 5: Connecting to a Database

If you’re using MongoDB, install the required package:

npm install mongoose

Then, set up your database connection. Copilot can assist here too by suggesting connection strings and schemas.

Expected Outputs

By the end of Day 2, you should have a working API that can handle basic CRUD operations.

Limitations

  • Copilot might not always suggest the best practices for security or performance, so double-check the code it generates.

Day 3: Building the Frontend

Step 6: Setting Up React

Create your React components. Start by generating a simple component:

function App() {
  return <h1>Hello, World!</h1>;
}

Let Copilot assist in building forms and API calls.

Step 7: Connecting Frontend to Backend

Use fetch or axios to connect your frontend to the backend API. For instance:

fetch('/api/users')
  .then(response => response.json())
  .then(data => console.log(data));

Expected Outputs

By the end of Day 3, you should have a fully functional full-stack app that can display data fetched from your API.

What's Next

Consider deploying your app using platforms like Vercel for the frontend and Heroku for the backend.

Conclusion: Start Here

Building a full-stack app in just three days is ambitious, but with GitHub Copilot, it becomes much more manageable. To get started, follow this structured approach and leverage Copilot for code suggestions.

What We Actually Use

We use GitHub Copilot for rapid prototyping and to fill in boilerplate code, but we always review and refine the suggestions it makes. It's a powerful tool, but it's not a replacement for understanding the code you're writing.

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