Ai Coding Tools

How to Build a Simple Web App with AI Assistance in Under 2 Hours

By BTW Team4 min read

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

In short

A step-by-step guide on leveraging AI coding tools to create a web app quickly, even if you are a beginner.

In 2026, building a web app has never been easier, thanks to AI assistance. But if you're like many indie hackers and side project builders, you might feel overwhelmed by the options available. The good news? You can create a simple web app in under 2 hours using AI tools that streamline the coding process. Let’s dive into how you can do this, and I’ll share the tools that actually work.

Time Estimate: 2 Hours

Before we start, you can expect to finish this project in about 2 hours if you have the prerequisites ready.

Prerequisites

Here’s what you’ll need:

  • A basic understanding of HTML, CSS, and JavaScript (no expert knowledge required)
  • A code editor like Visual Studio Code (free)
  • Accounts set up on AI tools like OpenAI and a hosting service (more on that later)

Step-by-Step Guide

Step 1: Define Your App's Purpose

Before diving into the code, spend a few minutes deciding what your web app will do. A simple task manager or a weather app are great ideas for beginners.

Step 2: Choose Your Tech Stack

For this project, we’ll use:

  • Frontend: HTML, CSS, and JavaScript
  • Backend: Node.js with Express.js
  • Database: Firebase for easy integration

Step 3: Set Up Your Development Environment

  1. Install Node.js from nodejs.org.
  2. Set up Firebase: Create a Firebase project at firebase.google.com.

Step 4: Use AI to Generate Code

This is where AI comes in. Use tools like OpenAI's ChatGPT or GitHub Copilot to generate boilerplate code. Here’s how:

  • OpenAI ChatGPT: Ask it to generate a basic Express.js application structure.
  • GitHub Copilot: As you type your code in Visual Studio Code, it will suggest completions based on your context.

Example Prompt for ChatGPT:

"Generate a simple Express.js app that connects to Firebase."

Step 5: Build the Frontend

Create a simple HTML page and use CSS for styling. Again, you can use AI tools to generate basic layouts.

Step 6: Connect Frontend and Backend

Use fetch calls in JavaScript to send and receive data between your frontend and the Express.js backend. AI can help you write these functions too.

Step 7: Deploy Your App

Use platforms like Vercel or Heroku for free hosting. Both have straightforward deployment processes that you can complete in minutes.

Expected Output

By the end of this process, you should have a simple web app running, with a functional UI and backend.

Troubleshooting

  • What could go wrong: You might run into issues like CORS errors or Firebase authentication problems.
    • Solution: Check your Firebase settings or adjust CORS policies in your Express.js app.

What's Next?

Now that you have a simple web app, consider adding features like user authentication or integrating third-party APIs to enhance its functionality.

Tool Comparison Table

| Tool | Pricing | Best For | Limitations | Our Take | |------------------|-----------------------------|--------------------------------|-------------------------------------|-------------------------------------------| | OpenAI ChatGPT | Free tier + $20/mo pro | Code generation | Limited context in complex apps | We use this for generating boilerplate code. | | GitHub Copilot | $10/mo | Code suggestions | Requires a GitHub account | We rely on this for writing functions faster. | | Vercel | Free tier + $20/mo pro | Hosting frontend apps | Limited to specific frameworks | We love Vercel for quick deployments. | | Heroku | Free tier + $7/mo | Hosting backend apps | Dynos sleep on free tier | We don’t use this much due to sleeping dynos. | | Firebase | Free tier + $25/mo | Real-time databases | Cost increases with usage | We use Firebase for quick database setup. | | Visual Studio Code | Free | Code editing | None | Our go-to editor for all projects. |

What We Actually Use

In our experience, we primarily rely on OpenAI ChatGPT for code generation and GitHub Copilot for real-time suggestions. For hosting, we prefer Vercel due to its speed and ease of use.

Conclusion

If you’re looking to build a simple web app quickly, start with defining your app's purpose, then leverage AI tools like OpenAI and GitHub Copilot to assist you throughout the coding process.

Remember, this approach works great for prototypes or simple apps, but as your project grows, you may need to dive deeper into coding practices and frameworks.

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