Ai Coding Tools

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

By BTW Team5 min read

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

Building a web app can feel like a daunting task, especially for indie hackers and solo founders strapped for time. But what if I told you that you could leverage AI tools to create a simple web app in under two hours? In this guide, I’ll share the exact tools and steps we used to get it done, along with pricing and limitations. Let’s dive in!

Prerequisites: What You’ll Need

Before we start, here’s what you’ll need to have in place:

  • A code editor: We recommend using Visual Studio Code (free).
  • Basic knowledge of HTML/CSS/JavaScript: This isn’t a deep dive into coding, but familiarity helps.
  • An account with a cloud service provider: We’ll use Vercel (free tier available) for deployment.
  • Access to AI coding tools: We’ll explore a few options below.

Top AI Tools for Building Web Apps

Here’s a list of AI coding tools that can assist you in building your web app quickly. Each tool offers unique features, pricing, and limitations.

| Tool Name | What It Does | Pricing | Best For | Limitations | Our Take | |---------------------|----------------------------------------------------------|-----------------------------|------------------------------|--------------------------------------------------------|--------------------------------| | GitHub Copilot | AI-powered code suggestions directly in your IDE | $10/mo per user | Real-time coding assistance | Limited to VS Code; requires GitHub account | We use it for quick snippets. | | OpenAI Codex | Natural language to code generation | $0-20/mo based on usage | Converting prompts to code | Requires API key; costs can add up | Great for generating boilerplate. | | Replit | Online IDE with AI assistance | Free tier + $20/mo pro | Collaborative coding | Limited features on the free tier | We use it for quick prototyping. | | ChatGPT | Conversational AI for coding questions | Free tier + $20/mo pro | Getting coding help | Not specifically designed for coding | Use it for debugging and ideas. | | Tabnine | AI code completion across multiple languages | Free tier + $12/mo pro | Multi-language support | May not support niche languages | We find it useful for JavaScript. | | Codeium | AI code assistant with real-time collaboration | Free | Team projects | Lacks advanced features compared to paid tools | Good for collaborative efforts. | | CodeSandbox | Online code editor for rapid prototyping | Free tier + $12/mo pro | Quick web app demos | Limited deployment options on free tier | Great for testing ideas. | | Glitch | Collaborative coding platform for web apps | Free | Building small web apps | Performance issues with larger apps | We use it for small projects. | | Pipedream | Integrates APIs and automates workflows | Free tier + $20/mo pro | API integrations | Can be complex for beginners | Useful for backend services. | | Builder.ai | No-code platform with AI assistance | Starts at $29/mo | Complete no-code solutions | Higher costs for complex projects | Not our first choice for simple apps. |

Step-by-Step Guide to Building Your Web App

Step 1: Set Up Your Development Environment (15 minutes)

  1. Install Visual Studio Code: Download and install it from here.
  2. Create a new folder: This will be your project directory.
  3. Open the terminal: Use Visual Studio Code’s integrated terminal to run your commands.

Step 2: Initialize Your Project (10 minutes)

  1. Create an HTML file: Name it index.html.
  2. Add basic HTML structure:
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Simple Web App</title>
    </head>
    <body>
        <h1>Hello, World!</h1>
    </body>
    </html>
    

Step 3: Use AI Tools for Assistance (30 minutes)

  1. Use GitHub Copilot: Start typing a JavaScript function, and let Copilot suggest the code. For example, create a button that alerts "Hello, World!" when clicked.
  2. Use ChatGPT or OpenAI Codex: If you get stuck, ask for help. For instance, "How do I add a button in JavaScript?"

Step 4: Style Your App (20 minutes)

  1. Create a CSS file: Name it styles.css.
  2. Link it to your HTML:
    <link rel="stylesheet" href="styles.css">
    
  3. Add some basic styles:
    body {
        font-family: Arial, sans-serif;
        text-align: center;
        margin-top: 50px;
    }
    

Step 5: Deploy Your Web App (30 minutes)

  1. Create an account on Vercel: Sign up here.
  2. Install Vercel CLI: Run npm i -g vercel in your terminal.
  3. Deploy your app: Inside your project directory, run vercel and follow the prompts.

Troubleshooting: What Could Go Wrong

  • Deployment Failed: Check your console for errors. Often, it’s a missing file or incorrect path.
  • Styling Issues: Ensure your CSS file is correctly linked in the HTML.
  • JavaScript Not Working: Use console.log to debug your functions.

What’s Next?

Once your simple web app is live, consider adding more features or exploring the following:

  • Integrate an API: Use Pipedream for backend services.
  • Enhance your UI: Experiment with frameworks like Bootstrap or Tailwind CSS.
  • Collect user feedback: Use tools like Typeform to gather insights.

Conclusion: Start Here

Building a web app in under two hours is entirely feasible with the right tools and approach. Start with GitHub Copilot or OpenAI Codex for coding assistance, and deploy using Vercel. Don’t hesitate to experiment and iterate based on user feedback.

If you’re ready to start building, grab your tools and dive in!

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

AI Tools for Coding: Cursor vs. GitHub Copilot – Which is Best for Experts?

AI Tools for Coding: Cursor vs. GitHub Copilot – Which is Best for Experts? As a developer, choosing the right AI coding tool can be a daunting task, especially when you're already

Jun 8, 20263 min read
Ai Coding Tools

Cursor vs GitHub Copilot: Who Is the Real Coding Assistant?

Cursor vs GitHub Copilot: Who Is the Real Coding Assistant? As a solo founder or indie hacker, you know that time is money. The coding assistant you choose can either save you hour

Jun 8, 20263 min read
Ai Coding Tools

How to Use Cursor to Automate Your Coding in Under 30 Minutes

How to Use Cursor to Automate Your Coding in Under 30 Minutes If you're a solo founder or indie hacker, you know that time is your most precious resource. Automation can be a gamec

Jun 8, 20264 min read
Ai Coding Tools

Cursor vs. GitHub Copilot: Which AI Tool Truly Improves Code Quality?

Cursor vs. GitHub Copilot: Which AI Tool Truly Improves Code Quality? As a solo founder or indie hacker, you know how critical code quality is to the success of your project. With

Jun 8, 20263 min read
Ai Coding Tools

How to Build Your First AI-Powered App Using Codeium in 2 Hours

How to Build Your First AIPowered App Using Codeium in 2 Hours Ever felt overwhelmed thinking about building an AIpowered app? You're not alone. Many solo founders and indie hacker

Jun 8, 20264 min read
Ai Coding Tools

How to Use Cursor and GitHub Copilot for Faster Coding in 30 Minutes

How to Use Cursor and GitHub Copilot for Faster Coding in 30 Minutes As indie hackers and solo founders, we often find ourselves juggling multiple tasks while trying to ship code e

Jun 8, 20263 min read