The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Adds a mock of the dev tutorials
Coppleacb77219b238
diff --git a/apps/web/.eslintrc.js b/apps/tutorials/.eslintrc.jssimilarity index 100%rename from apps/web/.eslintrc.jsrename to apps/tutorials/.eslintrc.jsdiff --git a/apps/web/README.md b/apps/tutorials/README.mdsimilarity index 100%rename from apps/web/README.mdrename to apps/tutorials/README.mddiff --git a/apps/web/next-env.d.ts b/apps/tutorials/next-env.d.tssimilarity index 100%rename from apps/web/next-env.d.tsrename to apps/tutorials/next-env.d.tsdiff --git a/apps/web/next.config.js b/apps/tutorials/next.config.jssimilarity index 100%rename from apps/web/next.config.jsrename to apps/tutorials/next.config.jsdiff --git a/apps/web/package.json b/apps/tutorials/package.jsonsimilarity index 95%rename from apps/web/package.jsonrename to apps/tutorials/package.jsonindex dc1e52ad0b2..0617f75e998 100644--- a/apps/web/package.json+++ b/apps/tutorials/package.json@@ -1,5 +1,5 @@{- "name": "web",+ "name": "tutorials","version": "0.0.0","private": true,"scripts": {diff --git a/apps/tutorials/postcss.config.js b/apps/tutorials/postcss.config.jsnew file mode 100644index 00000000000..29c447cb54b--- /dev/null+++ b/apps/tutorials/postcss.config.js@@ -0,0 +1 @@+module.exports = require('config/postcss.config')diff --git a/apps/tutorials/src/pages/index.tsx b/apps/tutorials/src/pages/index.tsxnew file mode 100644index 00000000000..7a9fbb9e83c--- /dev/null+++ b/apps/tutorials/src/pages/index.tsx@@ -0,0 +1,22 @@+import { fetchPosts, DevPost } from '../utils/api'++export default function Tutorials({ posts }: { posts: DevPost[] }) {+ return (+ <div>+ <h1>Tutorials</h1>+ {posts.map((x) => (+ <div>+ <h2>{x.title}</h2>+ <p>{x.description}</p>+ </div>+ ))}+ </div>+ )+}++export async function getServerSideProps() {+ const posts = await fetchPosts()+ return {+ props: { posts },+ }+}diff --git a/apps/tutorials/src/utils/api.ts b/apps/tutorials/src/utils/api.tsnew file mode 100644index 00000000000..13c5bd9041f--- /dev/null+++ b/apps/tutorials/src/utils/api.ts@@ -0,0 +1,55 @@+const username = 'supabase'+const postsUrl = `https://dev.to/api/articles?username=${username}`++// Defines a Post returned from the DEV API+export type DevPost = {+ id: Number+ title: string+ description: string+ slug: string+ url: string+ path: string+ readable_publish_date: string+ published_at: string+ tags: string+ tag_list: string[]+ comments_count: Number+ public_reactions_count: Number+ positive_reactions_count: Number+ published: boolean+ first_published_at: string+ edited_at: string+ user: {+ username: string+ name: string+ profile_image_90: string+ cover_image_90: string+ profile_image_original: string+ cover_image_original: string+ location: string+ website: string+ bio: string+ twitter_username: string+ github_username: string+ dribbble_username: string+ path: string+ }+ organization: {+ id: Number+ name: string+ slug: string+ profile_image_90: string+ profile_imag: string+ }+}++export async function fetchPosts() {+ try {+ const res = await fetch(postsUrl)+ const data: DevPost[] = await res.json()+ return data+ } catch (err) {+ console.log(err)+ return []+ }+}diff --git a/apps/tutorials/tailwind.config.js b/apps/tutorials/tailwind.config.jsnew file mode 100644index 00000000000..9c2af498997--- /dev/null+++ b/apps/tutorials/tailwind.config.js@@ -0,0 +1 @@+module.exports = require('config/tailwind.config')diff --git a/apps/web/tsconfig.json b/apps/tutorials/tsconfig.jsonsimilarity index 100%rename from apps/web/tsconfig.jsonrename to apps/tutorials/tsconfig.jsondiff --git a/apps/web/src/pages/index.tsx b/apps/web/src/pages/index.tsxdeleted file mode 100644index 6ec0887ce02..00000000000--- a/apps/web/src/pages/index.tsx+++ /dev/null@@ -1,10 +0,0 @@-import { Button } from "ui";--export default function Web() {- return (- <div>- <h1>Web</h1>- <Button />- </div>- );-}