Skip to Content
DocumentationGuidesBuilding a Todo App with ByteMason

Building a Todo App with ByteMason

This guide walks you through creating a full-stack todo application with authentication, categories, and due dates.

Project Setup

# Create new project mason new todo-app cd todo-app # Generate specification mason plan "Create a todo app with user authentication, categories, and due dates. Users should be able to create, update, delete todos and organize them by categories. Each todo should have a title, description, due date, category, and completion status."

Understanding the Generated Specification

The specification will include:

  1. Database Schema:

    • Users table (handled by Supabase Auth)
    • Todos table
    • Categories table
  2. API Endpoints:

    • CRUD operations for todos
    • Category management
    • User preferences
  3. UI Components:

    • Authentication forms
    • Todo creation/edit forms
    • Category management
    • Todo list with filters

Database Setup

# Configure Supabase mason db setup ./spec/specification.json # Push migrations mason db push

Code Generation

# Generate application code mason code ./spec/specification.json

Testing Your Application

# Install dependencies npm install # Start development server npm run dev

Common Issues and Solutions

  • Build Errors: Run mason repair to fix common issues
  • Database Sync: Use mason db push after schema changes
  • UI Updates: Modify shadcn components in components/ui
Last updated on