Skip to main content

Notes App Tutorial

⏱️ 45 minutes Build a notes app with user accounts and cloud synchronization. You’ll learn about authentication, cloud databases, and real-time sync using Supabase.

What You’ll Build

A notes app that:
  • Has user sign up and login
  • Creates, edits, and deletes notes
  • Syncs notes to the cloud
  • Works across devices (same account = same notes)

Before You Start

This tutorial requires a Supabase account (free tier available).

Set Up Supabase

  1. Go to supabase.com and create a free account
  2. Create a new project (any name, choose a region near you)
  3. Wait for the project to initialize (~2 minutes)
  4. Note your project URL and anon key (Settings → API)
Keep the Supabase dashboard open — you’ll need it throughout this tutorial.

Part 1: Create the App

On the Nativeline home page, enter:

Complete the Wizard

  • Who is this for? — Anyone (public app)
  • Feel — Simple & clean
  • Priority — Core functionality first
  • Colors — Your choice
  • Name — Cloud Notes

Part 2: Connect Supabase

Tell Nativeline about your Supabase project:
Replace YOUR_SUPABASE_URL and YOUR_ANON_KEY with your actual values from the Supabase dashboard.
The anon key is safe to include in apps — it only allows operations that your Row Level Security policies permit. Never share your service_role key.

Part 3: Create the Notes Table

We need a database table to store notes. In your Supabase dashboard:
  1. Go to Table Editor
  2. Click Create a new table
  3. Name: notes
  4. Add columns:
    • id (uuid, primary key) — auto-generated
    • user_id (uuid, not null) — links to auth.users
    • title (text)
    • content (text)
    • created_at (timestamptz, default: now())
    • updated_at (timestamptz, default: now())
  5. Enable Row Level Security (RLS)

Add RLS Policies

In the Supabase dashboard, go to Authentication → Policies and add: Select policy (users can read their own notes):
Insert policy (users can create notes):
Update policy (users can edit their own notes):
Delete policy (users can delete their own notes):
Now tell Nativeline:

Part 4: Build the Auth Flow

Let’s create the login and signup screens:
Test the flow:
  1. Try signing up with an email
  2. You should be logged in and see the notes list
  3. Log out and try logging back in

Part 5: Build the Notes List

Create the main notes interface:

Part 6: Create Note Editor

Build the editing experience:

Part 7: Add Note Deletion

Let users delete notes:

Part 8: Add Real-time Sync

Make notes update in real-time:
Test this by:
  1. Opening your Supabase dashboard → Table Editor → notes
  2. Editing a note directly in Supabase
  3. Watching it update in the app

Help users find notes:

Part 10: Polish the Design

Make it look professional:

Final Result

You now have a cloud-synced notes app with:
  • ✅ User registration and login
  • ✅ Create, read, update, delete notes
  • ✅ Cloud sync via Supabase
  • ✅ Real-time updates
  • ✅ Search functionality
  • ✅ Polished UI

What You Learned


Troubleshooting

  • Double-check your project URL (ends in .supabase.co)
  • Make sure you’re using the anon key, not the service_role key
  • Check if your Supabase project is still initializing
  • Check Supabase Authentication → Users to see if user was created
  • Check if email confirmation is required (Authentication → Settings)
  • For testing, you can disable email confirmation
  • Check Supabase Table Editor for errors
  • Verify RLS policies are set correctly
  • Make sure user_id is being set when creating notes
  • Real-time requires Supabase Realtime to be enabled (it’s on by default)
  • Check the browser console in Supabase for errors
  • Try refreshing the app
Your RLS policies might be incorrect. In Supabase:
  1. Go to Authentication → Policies
  2. Verify each policy uses auth.uid() = user_id
  3. Make sure RLS is enabled on the table

Understanding the Architecture


Challenge: Extend Your App

Try these on your own:
  1. Rich text — Add formatting (bold, italic, lists)
  2. Folders — Organize notes into folders
  3. Sharing — Share notes with other users
  4. Markdown — Support markdown preview
  5. Offline mode — Work offline and sync when back online
  6. Attachments — Add images to notes using Supabase Storage

Next Steps

Supabase Deep Dive

Learn more about Supabase integration

Publish to TestFlight

Share your app with real users