ZestyDB

We have implemented a web app to store a to-do list using a realtime database. You can visit it by clicking here: todo.zestydb.com.

Database Setup

  1. Create a Cloudflare D1 database. We named ours “todo”.
  2. Execute the following SQL commands to create the tables we need for our to-do list.
CREATE TABLE categories (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    name TEXT UNIQUE NOT NULL
);

CREATE TABLE tasks (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    description TEXT NOT NULL,
    due_date DATE NOT NULL,
    category_id INTEGER,
    priority_level INTEGER CHECK(priority_level BETWEEN 1 AND 4),
    status TEXT DEFAULT 'active' CHECK(status IN ('active', 'completed')),
    FOREIGN KEY (category_id) REFERENCES categories(id)
);
  1. Create a Cloudflare Worker. We named ours “todo”.
  2. Set the D1 Database Binding for the Worker. We connected our “todo” database to the environment variable “TODO_DB”.
  3. Insert the code into the worker. You can find our worker code here.
  4. Map the worker to a custom domain. You can find our worker running at todo.zestydb.com.

Project Description

You can view the project description here.

ERD

You can view the Entity-Relationship Diagram below.

Entity-Relationship Diagram

SQL Walkthrough

You can view how each feature of the to-do list querys using SQL here.

Video Walkthrough

You can watch a video on how the to-do list works here.

Creator Profiles

Jesse Naser
Timothy Kosinski
Rory Jolliff
George Ebaugh