{"id":22369272,"url":"https://github.com/tushcmd/supabase-notes","last_synced_at":"2025-03-26T16:20:40.229Z","repository":{"id":245122069,"uuid":"817327871","full_name":"tushcmd/supabase-notes","owner":"tushcmd","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-22T14:55:19.000Z","size":1451,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T19:14:15.778Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tushcmd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-19T13:27:45.000Z","updated_at":"2024-12-25T12:04:18.000Z","dependencies_parsed_at":"2024-06-19T23:50:38.542Z","dependency_job_id":"295df621-58f9-484f-b0ef-9f14a58d46f8","html_url":"https://github.com/tushcmd/supabase-notes","commit_stats":null,"previous_names":["tushcmd/supabase-notes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushcmd%2Fsupabase-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushcmd%2Fsupabase-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushcmd%2Fsupabase-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tushcmd%2Fsupabase-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tushcmd","download_url":"https://codeload.github.com/tushcmd/supabase-notes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245689474,"owners_count":20656418,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T19:19:45.540Z","updated_at":"2025-03-26T16:20:40.208Z","avatar_url":"https://github.com/tushcmd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Supabase\n\n## What is Supabase\n\nAn open source alternative to Firebase\n\n- PostgreSQL database with realtime capabilities\n- Authenticationa with multiple methods/services\n- File storage\n- Serverless Functions\n- Real-time\n- AI and vectors\n\nBuild on top of Postgres, a very stable relational database. You can manage your databse from the Supabase interface\n\n- Create tables, relationships, etc\n- Write SQL queries\n- Enable \u0026 disable extensions\n- Real-time engine on top of Postgres\n- PostgREST API\n\n### User Authentication\n\nCreate and manage users from Supabase\n\n- Email/Password\n- Magic Link\n- Google\n- Github\n- More...\n\n### Access Control\n\nSecurity is managed via Postgres RLS (Row Level Security)\n\n#### How It Works\n\n1. A user signs up. Supabase creates a new user in the `auth.users` table.\n2. Supabase returns a new JWT, which contains the user's `UUID`.\n3. Every request to your database also sends the JWT.\n4. Postgres inspects the JWT to determine the user making the request.\n5. The user's UID can be used in policies to restcricts access to rows.\n\n##### Allow read access\n\n``` sql\n-- 1. Create table  \ncreate table profiles (\n    id uuid references auth.users,\n    avatar_url text\n);\n\n-- 2. Enable RLS\nalter table profiles\n    enable row level security;\n\n-- 3. Create policy\ncreate policy \"Public profiles are viewable by everyone\"\n    on profiles for select using (\n        true\n    );\n```\n\n### Client Libraries\n\nThe supabase client makes it easy to access data, authenticate, use storage, etc\n\n``` js\nconst { error, data } = await supabase.auth.signUp({\n    email: 'example@email.com',\n    password: 'example-password'\n})\n```\n\n``` js\nconst { data, error } = await supabase\n    .from('countries')\n    .select('\n        name,\n        cities (\n            name\n        )\n    ')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushcmd%2Fsupabase-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftushcmd%2Fsupabase-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftushcmd%2Fsupabase-notes/lists"}