Documentation
Supabase Setup
Supabase is an open-source alternative to Firebase that uses PostgreSQL as its database. This guide will help you set up Supabase for use with Cryptica.
Supabase offers a generous free tier that is sufficient for most personal password management needs.
Setup Steps
Step 1: Create a Supabase Project
- Sign up for a Supabase account at supabase.com
- Create a new project and give it a name
- Choose a strong database password and select your region
Step 2: Create Database Table
You need to create a table to store your encrypted passwords. You can use the SQL editor in the Supabase dashboard with the following SQL:
CREATE TABLE items (
key TEXT PRIMARY KEY,
value JSONB NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);
-- Add RLS policies
ALTER TABLE items ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Users can only access their own items"
ON items
FOR ALL
USING (auth.uid() = (value->>'userId')::uuid);
This SQL creates a table with the necessary fields and adds row-level security (RLS) to ensure users can only access their own data.
Step 3: Get Connection Information
- In your Supabase dashboard, navigate to Project Settings
- Find your API URL and anon key in the API section
- Copy these values as you'll need them to configure Cryptica
https://[YOUR_PROJECT_ID].supabase.co
Step 4: Configure Cryptica
- Open Cryptica and go to Settings
- In the Database section, select Supabase as the provider
- Enter your Supabase URL and API key
- Click Test Connection to verify everything is working
Troubleshooting
Connection Failed
Check that your URL and API key are correct. Make sure you're using the anon key for public operations.
Access Denied
Verify that you've correctly set up RLS policies. Users should only be able to access their own data.
Other Issues
Check the Supabase dashboard for any errors or logs that might help identify the issue.