Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Add files

Terry Sutton270a875b093b
diff --git a/apps/docs/components/GithubCard.js b/apps/docs/components/GithubCard.js
new file mode 100644
index 00000000000..8780bbd0af6
--- /dev/null
+++ b/apps/docs/components/GithubCard.js
@@ -0,0 +1,17 @@
+import React from 'react'
+
+export default function GithubCard({ title, description, href, stars, handle }) {
+ return (
+ <a className="h-full" href={href}>
+ <div className="card__body">
+ <h4 className="uppercase my-2 font-semibold">{title}</h4>
+ <span className="text-sm">{description}</span>
+ </div>
+ <hr className="my-2" />
+ <div className="flex justify-between py-2 text-xs">
+ <div>@{handle}</div>
+ <div>{stars} ★</div>
+ </div>
+ </a>
+ )
+}
diff --git a/apps/docs/components/Sponsors.js b/apps/docs/components/Sponsors.js
new file mode 100644
index 00000000000..0daa82e77d3
--- /dev/null
+++ b/apps/docs/components/Sponsors.js
@@ -0,0 +1,69 @@
+import React from 'react'
+import sponsors from '../data/sponsors.json'
+
+export default function Sponsors() {
+ const tiers = [
+ {
+ tier_name: '$5,000 a month',
+ heading: 'Enterprise: $5,000 per month',
+ transactions: sponsors.filter((x) => x.tier == '$5,000 a month'),
+ },
+ {
+ tier_name: '$2,500 a month',
+ heading: 'Agency: $2,500 per month',
+ transactions: sponsors.filter((x) => x.tier == '$2,500 a month'),
+ },
+ {
+ tier_name: '$1,000 a month',
+ heading: 'Startup: $1,000 per month',
+ transactions: sponsors.filter((x) => x.tier == '$1,000 a month'),
+ },
+ {
+ tier_name: '$49 a month',
+ heading: 'Evangelist: $49 per month',
+ transactions: sponsors.filter((x) => x.tier == '$49 a month'),
+ },
+ {
+ tier_name: '$19 a month',
+ heading: 'Supporter: $19 per month',
+ transactions: sponsors.filter((x) => x.tier == '$19 a month'),
+ },
+ {
+ tier_name: '$5 a month',
+ heading: 'Contributor: $5 per month',
+ transactions: sponsors.filter((x) => x.tier == '$5 a month'),
+ },
+ ]
+
+ return (
+ <div>
+ {tiers.map(
+ (t, index) =>
+ !!t.transactions.length && (
+ <div key={index}>
+ <h4 className="font-bold">{t.heading}</h4>
+ <div className="grid sm:grid-cols-3 grid-cols-3 gap-4 pl-4">
+ {t.transactions.map((x, index) => (
+ <div className="" key={index}>
+ <a
+ className="flex items-center gap-4 shadow-none"
+ href={`https://github.com/${x.sponsor}`}
+ >
+ <img
+ className="mt-4 mb-4 rounded-full w-12 h-12"
+ src={`https://github.com/${x.sponsor}.png`}
+ />
+ <div className="flex items-center flex-col justify-center text-center">
+ <h5 className="avatar__name">{x.sponsor}</h5>
+ </div>
+ </a>
+ </div>
+ ))}
+ </div>
+ <br />
+ </div>
+ )
+ )}
+ </div>
+ )
+}
diff --git a/apps/docs/pages/oss.tsx b/apps/docs/pages/oss.tsx
new file mode 100644
index 00000000000..e37c40b2340
--- /dev/null
+++ b/apps/docs/pages/oss.tsx
@@ -0,0 +1,134 @@
+import React, { useEffect } from 'react'
+import { Octokit } from '@octokit/core'
+import Layout from '~/layouts/Default'
+import maintainers from '../data/maintainers.json'
+import { menuItems } from '~/components/Navigation/Navigation.constants'
+import GithubCard from '../components/GithubCard'
+import Sponsors from '../components/Sponsors'
+
+export default function Oss({ meta }) {
+ const octokit = new Octokit()
+
+ const [activePill, setActivePill] = React.useState('All')
+ const [repos, setRepos] = React.useState([])
+
+ const maintainerTags = maintainers
+ .reduce((acc, x) => acc.concat(x.tags), []) // get all tags
+ .filter((v, i, a) => a.indexOf(v) === i) // remove duplicates
+ .sort((a, b) => a.localeCompare(b)) // alphabetical
+ const maintainerPills = ['All'].concat(maintainerTags)
+
+ useEffect(async () => {
+ const reposResponse = await octokit.request('GET /orgs/{org}/repos', {
+ org: 'supabase',
+ type: 'public',
+ per_page: 6,
+ page: 1,
+ })
+
+ setRepos(
+ reposResponse.data
+ .filter((r) => !!r.stargazers_count)
+ .sort((a, b) => b.stargazers_count - a.stargazers_count)
+ )
+ })
+
+ return (
+ <Layout meta={meta} menuItems={menuItems['docs']} currentPage="docs">
+ <section className={'section-lg'}>
+ <div className="container">
+ <div className="flex items-center">
+ <div className="col">
+ <h2 className="with-underline">Open source</h2>
+ <p className="">
+ Supabase is an open source company, supporting existing open source tools and
+ communities wherever possible.
+ </p>
+ </div>
+ </div>
+ </div>
+ </section>
+
+ {/* Sponsors */}
+ <section className={'section-lg'}>
+ <div className="container">
+ <h2 className="with-underline">Sponsors</h2>
+ <Sponsors />
+ </div>
+ </section>
+
+ {/* Core */}
+ <section>
+ <div className="">
+ <h2>Community Maintainers</h2>
+
+ <ul className="flex gap-4 items-center overflow-auto p-0">
+ {maintainerPills.map((x) => (
+ <li
+ key={x}
+ className={`mx-4 rounded-sm inline-block p-2 cursor-pointer hover:text-brand-800 ${
+ activePill == x ? 'bg-gray-400 text-brand-800' : ''
+ }`}
+ onClick={() => setActivePill(x)}
+ >
+ {x}
+ </li>
+ ))}
+ </ul>
+
+ <div className="grid sm:grid-cols-3 grid-cols-3 gap-4">
+ {maintainers
+ .filter((x) => activePill == 'All' || x.tags.includes(activePill))
+ .sort((a, b) => a.handle.localeCompare(b.handle))
+ .map((x, idx) => (
+ <div className="" key={idx}>
+ <a
+ className="shadow-none flex gap-4"
+ href={`https://github.com/${x.handle}`}
+ target="_blank"
+ rel="noreferrer"
+ >
+ <div className="grow bg-gray-200 p-4">
+ <div className="flex gap-4">
+ <img
+ className="rounded-full w-16 h-16 my-0"
+ alt={x.handle}
+ src={`https://github.com/${x.handle}.png`}
+ />
+ <div className="">
+ <h4 className="text-xl my-0">@{x.handle}</h4>
+ <span className="text-sm">{x.description}</span>
+ </div>
+ </div>
+ </div>
+ </a>
+ </div>
+ ))}
+ </div>
+ </div>
+ </section>
+
+ {/* OSS */}
+ <section>
+ <div>
+ <h2>Repositories</h2>
+ <div className="grid gap-4">
+ {repos.length < 1 && <div></div>}
+ {repos.length >= 1 &&
+ repos.map((props, idx) => (
+ <div className="bg-gray-200 p-4" key={idx}>
+ <GithubCard
+ title={props.name}
+ description={props.description}
+ href={props.html_url}
+ stars={props.stargazers_count}
+ handle={props.full_name}
+ />
+ </div>
+ ))}
+ </div>
+ </div>
+ </section>
+ </Layout>
+ )
+}