Ai Coding Tools

How to Build a Simple Web App Using AI Code Assistant in 2 Hours

By BTW Team4 min read

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

In short

A step-by-step tutorial on how to leverage an AI code assistant to build a functional web app in just two hours, perfect for new developers.

Building a web app can feel daunting, especially if you’re a solo founder or indie hacker juggling multiple responsibilities. But what if I told you that with the right AI code assistant, you could whip up a simple web app in just 2 hours? Sounds unrealistic? Let’s break down how you can do this using tools that are both affordable and effective.

Prerequisites: What You Need Before You Start

Before diving in, make sure you have the following:

  • A basic understanding of HTML, CSS, and JavaScript: You don’t need to be an expert, but familiarity will help.
  • An AI code assistant account: Sign up for one of the tools listed below.
  • A code editor: I recommend Visual Studio Code, which is free and widely used.
  • A local server environment: Use something like XAMPP or Node.js for testing your app locally.

Step 1: Choose Your AI Code Assistant

Here's a comparison of some popular AI code assistants that can help you build your web app:

| Tool Name | Pricing | Best For | Limitations | Our Take | |-------------------|-----------------------|-------------------------------------|-------------------------------------|-----------------------------------| | GitHub Copilot | $10/mo | Code suggestions in real-time | Limited to GitHub ecosystem | We use this for rapid prototyping | | Tabnine | Free tier + $12/mo | Autocompletion and suggestions | Less context-aware than others | Good for quick fixes | | Codeium | Free | Multi-language support | Fewer integrations | Best for budget-conscious devs | | Replit | Free tier + $20/mo | Collaborative coding | Performance can lag under load | Great for team projects | | OpenAI Codex | $15/mo | Complex code generation | Requires API knowledge | Not our first choice for simplicity| | Sourcery | Free tier + $19/mo | Code reviews and suggestions | Limited to Python | We don't use it for web apps |

What We Actually Use

In our experience, GitHub Copilot is a solid choice for indie builders due to its real-time suggestions and ease of use within VS Code.

Step 2: Define Your Web App’s Functionality

Before you start coding, clearly outline what your web app will do. For this tutorial, let’s say you want to create a simple to-do list app. It should allow users to:

  1. Add tasks
  2. Delete tasks
  3. Mark tasks as complete

Step 3: Start Coding

Here’s a step-by-step guide to building your app using GitHub Copilot:

1. Set Up Your Project

  • Create a new directory for your project.
  • Initialize with npm init -y to create a package.json file.
  • Install Express with npm install express if you’re using Node.js.

2. Build the Frontend

  • Create an index.html file with a basic layout.
  • Use GitHub Copilot to generate a simple form for adding tasks. Type a comment like <!-- Create a form for adding tasks --> and let Copilot suggest the code.

3. Set Up the Backend

  • Create an app.js file for your server.
  • Use Copilot to generate a simple endpoint to handle adding and deleting tasks.

4. Connect Frontend and Backend

  • Ensure your frontend makes requests to your backend using fetch().
  • Again, use Copilot to generate example fetch calls.

5. Test Your App

  • Run your server and open the HTML file in a browser.
  • Test adding, deleting, and marking tasks.

Expected Output

By the end of this step, you should have a functional to-do list web app that lets you add and manage tasks.

Troubleshooting: What Could Go Wrong

  1. Error Handling: If your server doesn’t start, check for syntax errors in your code.
  2. Network Issues: If your frontend can’t connect to the backend, ensure your API endpoints are correct.
  3. UI Problems: Use the browser’s developer tools to debug UI issues.

What’s Next: Scaling Your App

Once you have your simple web app up and running, consider these next steps:

  • Add User Authentication: Use Firebase or Auth0.
  • Deploy Your App: Host it using platforms like Vercel or Heroku.
  • Gather Feedback: Share it with friends or on social media to get user input.

Conclusion: Start Building Today

Using an AI code assistant drastically reduces the time it takes to build a web app. With just 2 hours and the right tools, you can create something functional and valuable. Start with GitHub Copilot, outline your app's features, and follow the steps to bring your idea to life.

Ready to dive in? Get your tools set up and start coding today!

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