Ai Coding Tools

How to Build a Simple CRUD App in 2 Hours Using AI Coding Tools

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 rapidly create a simple CRUD application using AI coding tools, emphasizing practical implementation and time efficiency.

Building a CRUD (Create, Read, Update, Delete) app is a rite of passage for any aspiring developer. But let’s be honest: if you’re a solo founder or side project builder, you don’t always have the luxury of spending weeks on a project. Enter AI coding tools, which can help you whip up a functional CRUD app in just 2 hours. This guide will walk you through the essentials, tools, and pitfalls to avoid.

Prerequisites: What You Need Before You Start

Before diving in, ensure you have the following:

  • A computer: Windows, macOS, or Linux will work.
  • Node.js installed: Necessary for running JavaScript applications.
  • Basic understanding of JavaScript: If you can write simple functions, you’re good to go.
  • An IDE: Visual Studio Code is recommended for its extensions and ease of use.

Step-by-Step Guide to Building Your CRUD App

Step 1: Setting Up Your Environment (15 minutes)

  1. Install Node.js: Download from Node.js official site.
  2. Create a new project directory:
    mkdir my-crud-app
    cd my-crud-app
    
  3. Initialize your Node.js project:
    npm init -y
    

Step 2: Choose Your AI Coding Tool (10 minutes)

Here’s a list of AI coding tools that can help you generate boilerplate code and streamline development:

| Tool Name | Pricing | Best For | Limitations | Our Take | |------------------|-------------------------------|---------------------------|-------------------------------------|-----------------------------------| | GitHub Copilot | $10/mo or $100/yr | Autocompleting code | Limited to popular libraries | We use it for quick suggestions. | | Tabnine | Free tier + $12/mo pro | Code completion | Less effective for niche languages | Good for JavaScript projects. | | Codeium | Free | Autocompletion | Limited integrations | Offers decent suggestions. | | Replit | Free tier + $7/mo pro | Full-stack development | Free tier has limited storage | Great for quick prototypes. | | Sourcery | Free | Code optimization | Focuses on Python | Not suitable for JS apps. | | CodeGPT | $19/mo | Generating functions | Requires a solid prompt | Useful for boilerplate. | | Ponicode | Free tier + $10/mo pro | Unit testing code | Limited to JavaScript | Good for testing while building. | | AI Dungeon | Free | Story-based coding | Not focused on practical coding | Fun but not for serious apps. | | Koder | $8/mo | Code generation | Works best with PHP | Useful for backend-focused apps. | | Jupyter Notebook | Free | Data-driven apps | Not ideal for web apps | Excellent for Python-centric CRUD. |

Step 3: Generate Your API (20 minutes)

Using GitHub Copilot, start generating your backend API. Here’s a simple example:

  1. Install Express:
    npm install express
    
  2. Create a basic server:
    const express = require('express');
    const app = express();
    app.use(express.json());
    
    const items = []; // In-memory storage
    
    app.post('/items', (req, res) => {
        items.push(req.body);
        res.status(201).send(req.body);
    });
    
    app.get('/items', (req, res) => {
        res.send(items);
    });
    
    app.listen(3000, () => {
        console.log('Server is running on port 3000');
    });
    

Step 4: Frontend Setup (30 minutes)

  1. Choose a frontend framework: React is a solid choice.
  2. Create your React app:
    npx create-react-app my-crud-frontend
    cd my-crud-frontend
    
  3. Install Axios for API calls:
    npm install axios
    

Step 5: Connect Frontend to API (30 minutes)

In your React app, set up Axios to connect to your API:

import axios from 'axios';

const fetchData = async () => {
    const response = await axios.get('http://localhost:3000/items');
    console.log(response.data);
};

Step 6: Test Your CRUD Operations (15 minutes)

Use Postman or a similar tool to test your API. Make sure you can create, read, update, and delete items.

Troubleshooting: What Could Go Wrong

  • CORS issues: If your frontend can’t access your backend, you may need to set up CORS middleware in Express.
  • Unexpected errors: Check your console for errors and debug accordingly.

What's Next?

Once your CRUD app is up and running, consider adding user authentication, deploying your app, or enhancing the UI.

Conclusion: Start Here

To build your CRUD app in under 2 hours, follow the steps above and leverage AI coding tools to streamline your process. Start small, and don’t hesitate to iterate on your project!

If you're looking for real-world insights and tools we're testing, check out our podcast, Built This Week. We share everything we learn from building our products, including what works and what doesn't.

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