Prerequisites
Supabase Account
Sign up for a free account at supabase.com
Supabase CLI
Optional but recommended for local development
Create a New Project
Create Project
- Log in to your Supabase Dashboard
- Click “New Project”
- Enter your project details:
- Name: Bookmarks (or your preferred name)
- Database Password: Choose a strong password
- Region: Select the closest region to your users
- Click “Create new project”
Project creation takes 2-3 minutes. Your database will be provisioned automatically.
Save Project Credentials
Once created, navigate to Project Settings > API and save:
- Project URL
- anon/public key
Database Schema
The Bookmarks application uses a singlebookmarks table to store all bookmark data.
Create the Bookmarks Table
Create Table
Run the following SQL to create the bookmarks table:This creates a table with the following columns:
id: Auto-incrementing primary keytitle: Bookmark title (from metadata)domain: Website domainurl: Full bookmark URLdescription: Meta descriptionimage: Preview image URLcreated_at: Timestamp of when bookmark was savedsaved_by: User ID (foreign key to auth.users)tags: Array of tag stringspinned: Boolean flag for pinned bookmarks
Database Indexes (Optional)
For better query performance, add these indexes:Authentication Configuration
The application supports OAuth providers and magic link (OTP) authentication.Supported Authentication Methods
The app implements social login and email OTP authentication via
/src/stores/AuthStore.ts:18-45Configure OAuth Providers
Enable and configure your preferred OAuth providers:
- Google
- GitHub
- Other Providers
- Create OAuth credentials in Google Cloud Console
- Add authorized redirect URI:
https://your-project.supabase.co/auth/v1/callback - Enter Client ID and Client Secret in Supabase
Configure Email Authentication
- Navigate to Authentication > Providers > Email
- Enable “Email OTP” for magic link authentication
- Customize the email template if desired
Edge Functions Setup
The application uses two Edge Functions for enhanced functionality.1. Get Metadata Function
This function fetches website metadata (title, description, images) when users add bookmarks.2. Generate Tags Function
This function uses AI to automatically generate relevant tags for bookmarks.Create Function File
Create
supabase/functions/generate-tags/index.ts with your AI integration logic.Get Function URLs
Verify Setup
Test Authentication
Go to Authentication > Users and test creating a user with your configured providers.
Next Steps
Configure Environment Variables
Set up your local and production environment variables
Setup Authentication
Implement authentication in your application