|
| 1 | +import React from "react"; |
| 2 | +import type { NextPage } from "next"; |
| 3 | +import Head from "next/head"; |
| 4 | +import { useQuery } from "urql"; |
| 5 | +import { gql } from "../gql"; |
| 6 | +import { Container } from "../lib/container"; |
| 7 | +import { FeedItem } from "../lib/feed-item"; |
| 8 | +import { MainSection } from "../lib/main-section"; |
| 9 | +import { noopUUID } from "../lib/noop-uuid"; |
| 10 | + |
| 11 | +const About: NextPage = () => { |
| 12 | + return ( |
| 13 | + <Container> |
| 14 | + <Head> |
| 15 | + <title>supanews | About</title> |
| 16 | + <meta name="description" content="What is hot?" /> |
| 17 | + <link rel="icon" href="/favicon.ico" /> |
| 18 | + </Head> |
| 19 | + |
| 20 | + <MainSection> |
| 21 | + <section className="text-gray-600 body-font overflow-hidden w-full"> |
| 22 | + <div className="container px-3 py-24 mx-auto"> |
| 23 | + <div className="-my-8"> |
| 24 | + <h1 className="text-2xl py-6">Supabase PG GraphQL Example App</h1> |
| 25 | + |
| 26 | + <p> |
| 27 | + A basic HackerNews-like clone where posts can be submitted with |
| 28 | + url links and then up and down voted. |
| 29 | + </p> |
| 30 | + |
| 31 | + <h2 className="text-xl pt-4">Showcase</h2> |
| 32 | + |
| 33 | + <h3 className="text-lg py-6"> Backend pg_graphql / supabase</h3> |
| 34 | + <ul> |
| 35 | + <li>CRUD (Query + Mutation Operations)</li> |
| 36 | + <li>Cursor Based Pagination</li> |
| 37 | + <li>Authorization / RLS</li> |
| 38 | + </ul> |
| 39 | + <h3 className="text-lg py-6">Frontend</h3> |
| 40 | + <ul> |
| 41 | + <li> |
| 42 | + [Next.js](https://nextjs.org) <li></li>React Framework |
| 43 | + </li> |
| 44 | + <li> |
| 45 | + [TypeScript](https://www.typescriptlang.org) TypeScript is a |
| 46 | + strongly typed programming language that builds on JavaScript, |
| 47 | + giving you better tooling at any scale. |
| 48 | + </li> |
| 49 | + <li> |
| 50 | + [graphql-code-generator](https://www.graphql-code-generator.com){" "} |
| 51 | + <li></li>Generate code from your GraphQL schema and operations |
| 52 | + with a simple CLI |
| 53 | + </li> |
| 54 | + <li> |
| 55 | + [gql-tag-operations-preset](https://www.graphql-code-generator.com/plugins/gql-tag-operations-preset){" "} |
| 56 | + <li></li>This code gen preset generates typings for your |
| 57 | + inline gql function usages, without having to manually specify |
| 58 | + import statements for the documents |
| 59 | + </li> |
| 60 | + <li> |
| 61 | + [urql](https://formidable.com/open-source/urql/) <li></li>A |
| 62 | + highly customizable and versatile GraphQL client |
| 63 | + </li> |
| 64 | + <li> |
| 65 | + [Gravatar](https://en.gravatar.com) <li></li>Default avatar |
| 66 | + profile images from Gravatar |
| 67 | + </li> |
| 68 | + </ul> |
| 69 | + <h3 className="text-lg py-6">Backend</h3> |
| 70 | + <ul> |
| 71 | + <li> |
| 72 | + [Supabase](https://supabase.com) <li></li>Create a backend in |
| 73 | + less than 2 minutes. Start your project with a Postgres |
| 74 | + Database, Authentication, instant APIs, Realtime subscriptions |
| 75 | + and Storage. |
| 76 | + </li> |
| 77 | + <li> |
| 78 | + [pg_graphql](https://supabase.com/blog/2021/12/03/pg-graphql){" "} |
| 79 | + <li></li>A native [PostgreSQL |
| 80 | + extension](https://supabase.github.io/pg_graphql/) adding |
| 81 | + [GraphQL support](https://graphql.org). The extension keeps |
| 82 | + schema generation, query parsing, and resolvers all neatly |
| 83 | + contained on your database server requiring no external |
| 84 | + services. |
| 85 | + </li> |
| 86 | + <li> |
| 87 | + [Postgres |
| 88 | + Triggers](https://supabase.com/blog/2021/07/30/supabase-functions-updates) |
| 89 | + and [Postgres |
| 90 | + Functions](https://supabase.com/docs/guides/database/functions){" "} |
| 91 | + <li></li>When votes are in, use triggers to invoke a Postgres |
| 92 | + function that calculates a post score to rank the feed |
| 93 | + </li> |
| 94 | + <li> |
| 95 | + [Postgres Enumerated |
| 96 | + Types](https://www.postgresql.org/docs/14/datatype-enum.html){" "} |
| 97 | + <li></li>Enums help defined the direction of a vote: UP or |
| 98 | + DOWN. |
| 99 | + </li> |
| 100 | + </ul> |
| 101 | + <h3 className="text-lg py-6">Functionality</h3> |
| 102 | + <ul> |
| 103 | + <li>Registration</li> |
| 104 | + <li>Get a ranked feed of posts</li> |
| 105 | + <li>Create Post</li> |
| 106 | + <li>Delete Post</li> |
| 107 | + <li>Create Comment</li> |
| 108 | + <li>Delete Comment</li> |
| 109 | + <li>Upvote/Downvote Post</li> |
| 110 | + <li>View Profile (Account)</li> |
| 111 | + <li>View Profile (Public)</li> |
| 112 | + <li>Pagination (Posts, Comments)</li> |
| 113 | + </ul> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + </section> |
| 117 | + </MainSection> |
| 118 | + </Container> |
| 119 | + ); |
| 120 | +}; |
| 121 | + |
| 122 | +export default About; |
0 commit comments