Ai Coding Tools

How to Use Cursor to Code a Simple Web App in 2 Hours

By BTW Team4 min read

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

In short

A step-by-step guide for beginners on how to build a basic web application using Cursor and AI tools within two hours.

If you’re a solo founder or indie hacker, the idea of coding a web app can feel overwhelming, especially if you’re just starting out. You might think it requires extensive knowledge of programming or hours of tedious work. But what if I told you that you could build a simple web app in about two hours using Cursor, an AI-powered coding tool? In this guide, I’ll walk you through the process step-by-step, sharing my personal experiences along the way.

Prerequisites: What You Need Before You Start

Before diving in, let’s make sure you have everything you need:

  1. Cursor Installed: Download and install Cursor from Cursor's website. It’s free to start, with a pro version available for $20/month.
  2. Basic Idea for Your App: Think of a simple web app idea. For this example, we’ll create a basic to-do list app.
  3. A Code Editor: While Cursor has its own editor, you might prefer using Visual Studio Code (free) or another editor of your choice.

Step 1: Setting Up Cursor

  1. Open Cursor: Launch the Cursor app after installation.
  2. Create a New Project: Click on ‘New Project’ and choose a suitable name for your app.
  3. Select Your Language: For our to-do list app, you can use HTML, CSS, and JavaScript. Cursor supports these languages seamlessly.

Step 2: Coding Your Web App with Cursor

Here’s how to leverage Cursor’s capabilities to code your app:

2.1: Building the HTML Structure

  1. Start with HTML: Type Create a basic HTML structure for a to-do list app. into Cursor.
  2. Let Cursor Generate the Code: Cursor will generate the basic HTML layout for you. You’ll get a simple structure with a <div> for tasks and an input field for new tasks.

2.2: Adding CSS for Styling

  1. Request CSS Styles: Type Add some basic CSS to style the to-do list.
  2. Look at the Output: Cursor will provide you with CSS styles. Adjust as needed to fit your design preferences.

2.3: Implementing JavaScript Functionality

  1. JavaScript Logic: Ask Cursor, Add JavaScript to enable adding and removing tasks from the list.
  2. Review and Test: Test the generated code in your browser. Ensure that adding and removing tasks works as expected.

2.4: Final Touches

  1. Refine Your Code: Go through the code, tweak any styles, and ensure everything is functioning correctly.
  2. Optimize for Performance: While Cursor handles a lot, always double-check for best practices in coding.

Step 3: Deploying Your Web App

Once your app is built, it’s time to share it with the world:

  1. Choose a Hosting Service: For beginners, services like Netlify (free tier available) or Vercel (free tier available) are great options.
  2. Deploy Your App: Follow the hosting service's instructions to upload your files.

Troubleshooting: What Could Go Wrong

  • Cursor Isn’t Generating Code: Ensure you’re using clear, specific prompts. If it doesn’t understand, rephrase your request.
  • JavaScript Not Working: Check the console for errors. Debugging is part of the learning process.
  • Styling Issues: Inspect elements in your browser to identify CSS conflicts.

What’s Next?

After you’ve deployed your app, consider the following:

  • User Feedback: Share your app with friends or online communities to gather feedback.
  • Iterate Based on Feedback: Make improvements based on user suggestions.
  • Explore Additional Features: Think about adding user authentication or a database for storing tasks.

Conclusion: Start Here

Building a simple web app in two hours using Cursor is entirely possible, even for beginners. By following this guide, you can create a functional to-do list app that showcases your coding skills. Don’t hesitate to explore Cursor’s capabilities further; it’s a powerful tool for indie hackers looking to speed up their development process.

What We Actually Use

In our experience at Built This Week, we find that Cursor is great for quick prototypes, but for more complex tasks, we often switch to traditional coding methods. It's a good starting point, but don't rely solely on it for production-level code.

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