Skip to content

Add Supabase integration for cloud project storage #14

@ebowwa

Description

@ebowwa

Summary

Implement Supabase integration to enable cloud storage and sharing of projects without requiring authentication.

Implementation Details

Features Added

  • ✅ Cloud storage for projects in Supabase database
  • ✅ Shareable project links with unique share IDs
  • ✅ Auto-load projects from URL parameters
  • ✅ Project name management
  • ✅ Update existing projects in cloud
  • ✅ Copy share link to clipboard
  • ✅ Show last saved timestamp
  • ✅ Works without Supabase (graceful fallback)

Technical Details

  • Projects stored in projects table with JSONB screens data
  • Images stored as base64 in database (not using Supabase Storage)
  • Anonymous access via RLS policies
  • 8-character share IDs for project URLs
  • No authentication required (MVP approach)

Files Modified

  • /lib/supabase.ts - Client configuration
  • /lib/supabase-operations.ts - CRUD operations
  • /supabase/schema.sql - Database schema
  • /.env.local.example - Environment template
  • /app/page.tsx - UI integration with cloud features

Setup Required

  1. Create Supabase project
  2. Run schema.sql in SQL editor
  3. Add env variables to .env.local
  4. Restart dev server

Resolves requirements for cloud persistence without user authentication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions