Vibe Coding · Module 7 of 14

Store Data with Supabase

Design a small database, save and load tasks, and lock it down with Row Level Security so users only see their own data.

~25 min3 lessons1 matching tasks1 sorting tasks3 checklists1 fill-in tasks1 questions1 click challenges1 ordering tasks
Start module

What you'll learn

  1. 1

    Tables, Rows, Columns and Keys

    Design the TinyTasks table: what to store, which column identifies each task, and which links it to its owner.

    Goal: Design a table with the right columns, a primary key and an owner column.

    • A database is a set of tables
    • Database words
    • Store it or not?
    • Project task: create the table
    • Before you continue
  2. 2

    Save, Load, Update and Delete

    Connect TinyTasks to Supabase with Clerk's native integration, then create, read, update and delete tasks.

    Goal: Connect Clerk sessions to Supabase and implement create, read, update and delete for tasks.

    • CRUD: the four things apps do with data
    • Connecting Clerk and Supabase
    • Complete the query
    • Project task: save tasks for real
    • Before you continue
  3. 3

    Row Level Security: Lock It Down

    Write access rules in the database so no user can read or change another user's tasks, then prove it with two accounts.

    Goal: Enable Row Level Security with per-user policies, and test that one user can't access another user's data.

    • Why the database must say no
    • Pick the right policy
    • Find the dangerous policy
    • Prove it with two accounts
    • Project task: enable RLS and test it
    • Before you continue