Ai Coding Tools

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

By BTW Team4 min read

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

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.

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

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow

10 Common Mistakes When Integrating AI Coding Tools into Your Workflow As developers, we’re always on the lookout for ways to streamline our workflow and boost productivity. Enter

Oct 14, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools That Could Hurt Your Development Process

5 Myths About AI Coding Tools That Could Hurt Your Development Process As a solo founder or indie hacker, you might be lured by the promises of AI coding tools that claim to simpli

Oct 13, 20264 min read
Ai Coding Tools

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026

5 Common Mistakes Developers Make When Using AI Coding Tools in 2026 As AI coding tools have become an integral part of a developer's toolkit in 2026, many are still stumbling over

Oct 12, 20264 min read
Ai Coding Tools

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026

5 Myths About AI Coding Tools: What Every Developer Should Know in 2026 As we dive into 2026, the landscape of AI coding tools has evolved significantly, yet many developers still

Oct 11, 20263 min read
Ai Coding Tools

Why AI Coding Assistants Are Overrated for Beginners in 2026

Why AI Coding Assistants Are Overrated for Beginners in 2026 As a solo founder or indie hacker, it’s tempting to think that AI coding assistants are the silver bullet to jumpstart

Oct 10, 20263 min read
Ai Coding Tools

10 Common Mistakes When Using AI Coding Tools for Beginners

10 Common Mistakes When Using AI Coding Tools for Beginners As a beginner in coding, diving into AI coding tools can feel like a doubleedged sword. On one hand, these tools promise

Oct 8, 20264 min read