{"id":18614886,"url":"https://github.com/andrewjbateman/next-tailwind-supabase","last_synced_at":"2026-04-11T17:34:21.436Z","repository":{"id":96860790,"uuid":"484494017","full_name":"AndrewJBateman/next-tailwind-supabase","owner":"AndrewJBateman","description":":clipboard: Next.js PWA to display data from a Supabase PostgreSQL database ","archived":false,"fork":false,"pushed_at":"2022-04-23T15:55:13.000Z","size":3956,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T08:55:17.269Z","etag":null,"topics":["nextjs","pwa","react","react17","supabase","tailwind-css"],"latest_commit_sha":null,"homepage":"http://next-tailwind-supabase-nu.vercel.app","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/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":"2022-04-22T16:04:15.000Z","updated_at":"2022-04-27T09:18:53.000Z","dependencies_parsed_at":"2023-03-30T11:36:38.734Z","dependency_job_id":null,"html_url":"https://github.com/AndrewJBateman/next-tailwind-supabase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AndrewJBateman/next-tailwind-supabase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-tailwind-supabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-tailwind-supabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-tailwind-supabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-tailwind-supabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewJBateman","download_url":"https://codeload.github.com/AndrewJBateman/next-tailwind-supabase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewJBateman%2Fnext-tailwind-supabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31689762,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["nextjs","pwa","react","react17","supabase","tailwind-css"],"created_at":"2024-11-07T03:27:19.606Z","updated_at":"2026-04-11T17:34:21.408Z","avatar_url":"https://github.com/AndrewJBateman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :zap: Next Tailwind Supabase\n\n* Next.js PWA to display data from a Supabase PostgreSQL database\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/next-tailwind-supabase?style=plastic)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/AndrewJBateman/next-tailwind-supabase?style=plastic)\n![GitHub Repo stars](https://img.shields.io/github/stars/AndrewJBateman/next-tailwind-supabase?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/AndrewJBateman/next-tailwind-supabase?style=plastic)\n\n## :page_facing_up: Table of contents\n\n* [:zap: Next Tailwind Supabase](#zap-next-tailwind-supabase)\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](#computer-code)\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 PostgreSQL instead of document database. Database is realtime \u0026 can use SQL joins. Realtime notifications via Websockets. RESTful API requires no backend code.\n* Next.js uses React v17\n* [Progressive Web App](https://en.wikipedia.org/wiki/Progressive_web_application) with a service worker for programmable content caching and a web manifest so app can be found by search engines.\n\n## :camera: Screenshots\n\n![Example screenshot](./img/lighthouse.png)\n\n## :signal_strength: Technologies\n\n* [Next.js v12](https://nextjs.org/) React framework\n* [React v17](https://reactjs.org/) Javascript library\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* [TailwindCSS v3](https://www.npmjs.com/package/tailwindcss) CSS framework that helps create very light build packages\n* [@tailwindcss/aspect-ratio](https://www.npmjs.com/package/@tailwindcss/aspect-ratio) used to give elements different fixed aspect ratios depending on screen width\n* [next-secure-headers v2](https://www.npmjs.com/package/next-secure-headers) to set secure response headers\n\n## :floppy_disk: Setup\n\n* `npm i` to install dependencies then...\n* Create free account with Supabase and create table\n* Add data to table - I found image URLs from [Pinterest](https://www.pinterest.com.mx/). Data was exported from Supabase as a CSV file - see `images_allRows.csv`. It is easy to import this into a new Supabase table and set id as the Primary Key. Database also requires a Function Hook to be added so database changes are shown in the deployed app\n* Create `.env.local` then add your Supabase API Authentication credentials as shown in `.env.example.local`\n* `npm run dev` for a dev server. Navigate to `http://localhost:3000/` - app will automatically reload if you change any of the source files\n* `npm run build` for a build folder - not necessary as Vercel creates build files during Deployment\n\n## :flashlight: Testing\n\n* Tests not set up\n\n## :computer: Code\n\n* `index.tsx` function to get data from Supabase database\n\n```typescript\nexport async function getStaticProps() {\n  const supabaseAccess = createClient(\n    process.env.SUPABASE_URL || '',\n    process.env.SUPABASE_KEY || ''\n  )\n\n  const { data } = await supabaseAccess.from('images').select('*').order('id')\n  return {\n    props: {\n      images: data,\n    },\n  }\n}\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* Changes to the Supabase data are automatically displayed in the deployed app using a Supabase Function Hook\n* 100% perfect Lighthouse score\n\n## :clipboard: Status \u0026 To-Do List\n\n* Status: Working PWA, deployed to Vercel. 100% Lighthouse score\n* To-Do: Nothing\n\n## :clap: Inspiration\n\n* [Youtube: Lee Robinson: Building an Image Gallery with Next.js, Supabase, and Tailwind CSS](https://www.youtube.com/watch?v=BSoRXk1FIw8) but with my own database data, other modifications for a perfect Lighthouse score, including conversion to PWA.\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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnext-tailwind-supabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewjbateman%2Fnext-tailwind-supabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewjbateman%2Fnext-tailwind-supabase/lists"}