{"id":21192081,"url":"https://github.com/biomassives/ecoops-actionlog","last_synced_at":"2025-03-14T21:13:00.100Z","repository":{"id":69907924,"uuid":"514109515","full_name":"biomassives/ecoops-actionlog","owner":"biomassives","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-15T03:01:41.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-21T13:43:51.642Z","etag":null,"topics":["accountability","biodiversity-credit-system","climate-science","community-development","cultural-heritage","nft-generator","resiliency","verification-methodologies"],"latest_commit_sha":null,"homepage":"https://ecoopslog.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/biomassives.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-07-15T02:31:45.000Z","updated_at":"2023-07-18T09:14:32.000Z","dependencies_parsed_at":"2023-05-25T07:30:26.497Z","dependency_job_id":null,"html_url":"https://github.com/biomassives/ecoops-actionlog","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"5687ab9c7b68840e1dafe67a016241cf94220969"},"previous_names":["biomassives/ecoops-actionlog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomassives%2Fecoops-actionlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomassives%2Fecoops-actionlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomassives%2Fecoops-actionlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biomassives%2Fecoops-actionlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biomassives","download_url":"https://codeload.github.com/biomassives/ecoops-actionlog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243646666,"owners_count":20324586,"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":["accountability","biodiversity-credit-system","climate-science","community-development","cultural-heritage","nft-generator","resiliency","verification-methodologies"],"created_at":"2024-11-20T19:07:00.883Z","updated_at":"2025-03-14T21:13:00.077Z","avatar_url":"https://github.com/biomassives.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Supabase Next.js User Management\n\nThis example will set you up for a very common situation: users can sign up with a magic link and then update their account with public profile information, including a profile image.\n\nThis demonstrates how to use:\n\n- User signups using Supabase [Auth](https://supabase.com/auth).\n- User avatar images using Supabase [Storage](https://supabase.com/storage).\n- Public profiles restricted with [Policies](https://supabase.com/docs/guides/auth#policies).\n- Frontend using [Next.js](\u003c[nextjs.org/](https://nextjs.org/)\u003e).\n\n## Technologies used\n\n- Frontend:\n  - [Next.js](https://github.com/vercel/next.js) - a React framework for production.\n  - [Supabase.js](https://supabase.com/docs/library/getting-started) for user management and realtime data syncing.\n- Backend:\n  - [app.supabase.io](https://app.supabase.io/): hosted Postgres database with restful API for usage with Supabase.js.\n\n## Instant deploy\n\nThe Vercel deployment will guide you through creating a Supabase account and project. After installation of the Supabase integration, all relevant environment variables will be set up so that the project is usable immediately after deployment 🚀.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fsupabase%2Fsupabase%2Ftree%2Fmaster%2Fexamples%2user-management%2Fnextjs-ts-user-management\u0026project-name=supabase-user-management\u0026repository-name=supabase-user-management\u0026demo-title=Supabase%20User%20Management\u0026demo-description=An%20example%20web%20app%20using%20Supabase%20and%20Next.js\u0026demo-url=https%3A%2F%2Fsupabase-nextjs-ts-user-management.vercel.app\u0026demo-image=https%3A%2F%2Fi.imgur.com%2FZ3HkQqe.png\u0026integration-ids=oac_jUduyjQgOyzev1fjrW83NYOv\u0026external-id=nextjs-user-management)\n\n## Build from scratch\n\n### 1. Create new project\n\nSign up to Supabase - [https://app.supabase.io](https://app.supabase.io) and create a new project. Wait for your database to start.\n\n### 2. Run \"User Management\" Quickstart\n\nOnce your database has started, run the \"User Management Starter\" quickstart. Inside of your project, enter the `SQL editor` tab and scroll down until you see `User Management Starter: Set up a Public Profiles table which you can access with your API`.\n\n### 3. Get the URL and Key\n\nGo to the Project Settings (the cog icon), open the API tab, and find your API URL and `anon` key, you'll need these in the next step.\n\nThe `anon` key is your client-side API key. It allows \"anonymous access\" to your database, until the user has logged in. Once they have logged in, the keys will switch to the user's own login token. This enables row level security for your data. Read more about this [below](#postgres-row-level-security).\n\n![image](https://user-images.githubusercontent.com/10214025/88916245-528c2680-d298-11ea-8a71-708f93e1ce4f.png)\n\n**_NOTE_**: The `service_role` key has full access to your data, bypassing any security policies. These keys have to be kept secret and are meant to be used in server environments and never on a client or browser.\n\n### 4. Env vars\n\nCreate a file in this folder `.env.local`\n\n```\nNEXT_PUBLIC_SUPABASE_URL=\nNEXT_PUBLIC_SUPABASE_ANON_KEY=\n```\n\nPopulate this file with your URL and Key.\n\n### 5. Run the application\n\nRun the application: `npm run dev`. Open your browser to `https://localhost:3000/` and you are ready to go 🚀.\n\n## Supabase details\n\n### Postgres Row level security\n\nThis project uses very high-level Authorization using Postgres' Role Level Security.\nWhen you start a Postgres database on Supabase, we populate it with an `auth` schema, and some helper functions.\nWhen a user logs in, they are issued a JWT with the role `authenticated` and their UUID.\nWe can use these details to provide fine-grained control over what each user can and cannot do.\n\nThis is a trimmed-down schema, with the policies:\n\n```sql\n-- Create a table for Public Profiles\ncreate table profiles (\n  id uuid references auth.users not null,\n  updated_at timestamp with time zone,\n  username text unique,\n  avatar_url text,\n  website text,\n\n  primary key (id),\n  unique(username),\n  constraint username_length check (char_length(username) \u003e= 3)\n);\n\nalter table profiles enable row level security;\n\ncreate policy \"Public profiles are viewable by everyone.\"\n  on profiles for select\n  using ( true );\n\ncreate policy \"Users can insert their own profile.\"\n  on profiles for insert\n  with check ( auth.uid() = id );\n\ncreate policy \"Users can update own profile.\"\n  on profiles for update\n  using ( auth.uid() = id );\n\n-- Set up Realtime!\nbegin;\n  drop publication if exists supabase_realtime;\n  create publication supabase_realtime;\ncommit;\nalter publication supabase_realtime add table profiles;\n\n-- Set up Storage!\ninsert into storage.buckets (id, name)\nvalues ('avatars', 'avatars');\n\ncreate policy \"Avatar images are publicly accessible.\"\n  on storage.objects for select\n  using ( bucket_id = 'avatars' );\n\ncreate policy \"Anyone can upload an avatar.\"\n  on storage.objects for insert\n  with check ( bucket_id = 'avatars' );\n```\n\n## Authors\n\n- [Supabase](https://supabase.com)\n\nSupabase is open source. We'd love for you to follow along and get involved at https://github.com/supabase/supabase\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomassives%2Fecoops-actionlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiomassives%2Fecoops-actionlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiomassives%2Fecoops-actionlog/lists"}