Skip to content

stabildev/next-supabase-mvp

Repository files navigation

Features

  • Authentication using Supabase Auth
  • File Uploads using Supabase Storage
  • Dark Mode
  • Shadcn/ui

Set up storage and policies

  • Create a new storage bucket and set the STORAGE_BUCKET environment variable to the bucket name.
  • Create the following storage policies for the bucket:

Access own files

  • Name: Access own files
  • Allowed operation: SELECT
  • Target roles: (default)
  • Policy definition:
bucket_id = 'Files' and owner_id = auth.uid()::text and (storage.foldername(name))[1] = auth.uid()::text

Allow upload

  • Name: Allow upload
  • Allowed operation: INSERT
  • Target roles: (default)
  • Policy definition:
bucket_id = 'Files' and (storage.foldername(name))[1] = auth.uid()::text

Delete own files

  • Name: Delete own files
  • Allowed operation: SELECT, DELETE
  • Target roles: (default)
  • Policy definition:
bucket_id = 'Files' and owner_id = auth.uid()::text and (storage.foldername(name))[1] = auth.uid()::text

About

A Nextjs + Supabase File Uploader MVP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published