{"id":18614841,"url":"https://github.com/andrewjbateman/react-supabase-auth","last_synced_at":"2026-05-01T21:34:07.307Z","repository":{"id":96860919,"uuid":"389431827","full_name":"AndrewJBateman/react-supabase-auth","owner":"AndrewJBateman","description":":clipboard: React app with Supabase PostgreSQL backend","archived":false,"fork":false,"pushed_at":"2021-07-28T06:33:02.000Z","size":1014,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-23T07:52:08.311Z","etag":null,"topics":["chakra-ui","html5","javascript","react","supabase"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AndrewJBateman.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":"2021-07-25T20:05:16.000Z","updated_at":"2023-12-01T06:18:20.000Z","dependencies_parsed_at":"2023-03-30T11:36:33.932Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/react-supabase-auth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/react-supabase-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Freact-supabase-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Freact-supabase-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Freact-supabase-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Freact-supabase-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/react-supabase-auth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Freact-supabase-auth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32513759,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chakra-ui","html5","javascript","react","supabase"],"created_at":"2024-11-07T03:27:11.281Z","updated_at":"2026-05-01T21:34:07.272Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: React Supabase Authentication\n\n* React frontend with a Supabase PostgreSQL database backend\n* Tutorial code from [CodingAndCaffeine](https://www.youtube.com/channel/UCQk_kRUoxJQY5vqbJQFgJDA) - see [:clap: Inspiration](#clap-inspiration) below. Modified to show Web Vitals user data as measured by Chrome\n* **Note:** to open web links in a new window use: _ctrl+click on link_\n\n![GitHub repo size](https://img.shields.io/github/repo-size/AndrewJBateman/react-supabase-auth?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/react-supabase-auth?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/react-supabase-auth?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/react-supabase-auth?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: React Supabase Authentication](#zap-react-supabase-authentication)\n  * [:page_facing_up: Table of contents](#page_facing_up-table-of-contents)\n  * [:books: General info](#books-general-info)\n  * [:camera: Screenshots](#camera-screenshots)\n  * [:signal_strength: Technologies](#signal_strength-technologies)\n  * [:floppy_disk: Setup](#floppy_disk-setup)\n  * [:flashlight: Testing](#flashlight-testing)\n  * [:computer: Code Examples](#computer-code-examples)\n  * [:cool: Features](#cool-features)\n  * [:clipboard: Status \u0026 To-Do List](#clipboard-status--to-do-list)\n  * [:clap: Inspiration](#clap-inspiration)\n  * [:file_folder: License](#file_folder-license)\n  * [:envelope: Contact](#envelope-contact)\n\n## :books: General info\n\n* Supabase is an open-source alternative to Firebase, but uses Postgres instead of document database. Database is realtime \u0026 can use SQL joins. Realtime notifications via Websockets. RESTful API requires no backend code.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/login.png)\n![Example screenshot](./img/web.png)\n\n## :signal_strength: Technologies\n\n* [React v17](https://reactjs.org/) Javascript library\n* [Chakra-ui/react v1](https://www.npmjs.com/package/@chakra-ui/react) React components that work out of the box.\n* [Supabase public Beta](https://supabase.io/) Postgres database\n* [supabase-js v1](https://www.npmjs.com/package/@supabase/supabase-js) isomorphic Javascript client for Supabase\n* [web-vitals v1](https://www.npmjs.com/package/web-vitals) library to measure the Web Vitals metrics of real users\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies then...\n* Create free account with Supabase and create table from SQL menu/User Management Starter as per [tutorial](https://www.youtube.com/watch?v=x38PWNZhSEM)\n* Create `.env.local` then add your Supabase API Authentication credentials as shown in `.env.example.local`\n* `ng serve` for a dev server. Navigate to `http://localhost:4200/` - app will automatically reload if you change any of the source files\n* `ng run build` for a build folder\n\n## :flashlight: Testing\n\n* Tests not set up\n\n## :computer: Code from [Tutorial](https://www.youtube.com/watch?v=x38PWNZhSEM)\n\n* `Account.js` function to get user profile from Supabase\n\n```javascript\nasync function getProfile() {\n\t\ttry {\n\t\t\tsetLoading(true);\n\t\t\tconst user = supabase.auth.user();\n\n\t\t\tlet { data, error, status } = await supabase\n\t\t\t\t.from(\"profiles\")\n\t\t\t\t.select(`username, website, avatar_url`)\n\t\t\t\t.eq(\"id\", user.id)\n\t\t\t\t.single();\n\n\t\t\tif (error \u0026\u0026 status !== 406) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tif (data) {\n\t\t\t\tsetUsername(data.username);\n\t\t\t\tsetWebsite(data.website);\n\t\t\t\tsetAvatarUrl(data.avatar_url);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\talert(error.message);\n\t\t} finally {\n\t\t\tsetLoading(false);\n\t\t}\n\t}\n```\n\n## :cool: Features\n\n* Supabase user interface is cool to work with and they have SQL templates to create a user login etc.\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working\n* To-Do: Nothing\n\n## :clap: Inspiration\n\n* [React + Supabase Authentication Tutorial | Intro](https://www.youtube.com/watch?v=Nq12Ebchtko)\n* [React + Supabase Authentication Tutorial | Implementation](https://www.youtube.com/watch?v=x38PWNZhSEM)\n* [Diligent Dev: Supabase - The Open-source Alternative to Firebase](https://www.youtube.com/watch?v=RpnDkUMNzK0)\n* [StackOverflow: Auto Import of React Components in Visual Studio Code](https://stackoverflow.com/questions/60637561/auto-import-of-react-components-in-visual-studio-code)\n\n## :file_folder: License\n\n* N/A\n\n## :envelope: Contact\n\n* Repo created by [ABateman](https://github.com/AndrewJBateman), email: gomezbateman@yahoo.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Freact-supabase-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Freact-supabase-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Freact-supabase-auth/lists"}