- Authentication using Supabase Auth
- File Uploads using Supabase Storage
- Database access with Drizzle ORM
- Full Row Level Security (RLS) support
- Dark Mode with Theme Provider
- Form state management using the new
useFormState
anduseFormStatus
hooks - Fully responsive design using Tailwind CSS
create role app_user with login password 'app_user';
grant select, insert, update, delete on all tables in schema public to app_user;
alter default privileges in schema public grant select, insert, update, delete on tables to app_user;
Use the dashboard to enable RLS policies for each table.
- Create a new storage bucket and set the
STORAGE_BUCKET
environment variable to the bucket name. - Create the following storage policies for the bucket:
- 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
- Name:
Allow upload
- Allowed operation:
INSERT
- Target roles: (default)
- Policy definition:
bucket_id = 'Files' and (storage.foldername(name))[1] = auth.uid()::text
- 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