🌀 The gamma variant of Pastebin

Overview

snip

🌀 The gamma variant of Pastebin

Supabase Hackathon · Demo

Team

Harsh Singh • Frontend (TypeScript) • GitHubTwitter

Ibrahim Hisham • Backend (Rust) • GitHubTwitter

🚀 Quickstart

Run the website locally

git clone https://github.com/harshhhdev/snip.git

Setting up the development environment

cd snip

# Install deps
yarn

Setting up the database

NOTE: This project uses PostgreSQL on Supabase to store data. Things like authentication are handled by Supabase.

Currently, according to the Supabase documentation, there isn't any 'right' way to do migrations, however you can initialise your database with the initdb.sql file located at the root of the project.

Authentication

This application uses Supabase's Authentication with the GitHub and GitLab. Refer to the linked guides for how to create an OAuth application and connect it with your account.

Starting server

# Start the server
yarn dev

Server should now be running on localhost

If you would also like to run the Netlify serverless functions, you can start with the netlify dev command.

# Start the Netlify server
netlify dev

...and your local development server should now be running on localhost:8888.

🔧 Tools Used

Frontend

Backend

Miscellaneous

🤞 Contributing

After setting up the project, and making changes:

git add .
git commit -m "commit message"
git push YOUR_REPO_URL YOUR_BRANCH
Comments
  • Running migration fails on supabase sql editor

    Running migration fails on supabase sql editor

    Describe the bug Running initdb.sql sql commands fails on supabase sql editor.

    To Reproduce Steps to reproduce the behavior:

    1. Copy initdb.sql content
    2. Open supabase sql editor
    3. Paste initdb.sql content
    4. Observe error: Failed to validate sql query: syntax error at or near "user"

    Expected behavior No errors

    opened by timagixe 0
  • [FEATURE] Viewing pastes by other users

    [FEATURE] Viewing pastes by other users

    Is your feature request related to a problem? Please describe. There is no way to view all the pastest by a specific user.

    Describe the solution you'd like Restructure the user system to allow for this as user IDs are sensitive information that aren't meant to be given to other users.

    enhancement 
    opened by ibra 0
  • [FEATURE] Migrate onto React 18

    [FEATURE] Migrate onto React 18

    Is your feature request related to a problem? Please describe. Currently, we're unable to use features such as Suspense because Next.js does not support it on React versions that are below 18.

    Describe the solution you'd like I would like to upgrade this repository to use React 18.

    Additional context None.

    enhancement help wanted good first issue 
    opened by harshhhdev 7
  • Migrate onto supabase-js v2

    Migrate onto supabase-js v2

    This repository migrates the library onto Supabase's new v2 JavaScript client.

    It introduces a new hook called useUser, and we add a context around our application where we mount our user onto the application inside our useEffect hook.

    This also fixes #7 and will close #8.

    enhancement help wanted 
    opened by harshhhdev 1
  • [FEATURE] Migrate project over onto Supabase's new JavaScript client

    [FEATURE] Migrate project over onto Supabase's new JavaScript client

    Is your feature request related to a problem? Please describe. Recently, Supabase released the v2 of their JavaScript client. This solves issues with things such as #7 as I've tested on another branch.

    Describe the solution you'd like Migrate this repository over onto the new RFC version of @supabase/supabase-js.

    Additional context I initially wanted to do this during the hackathon, but due to a time constraint I decided to revert back to the old version using v1.35.6.

    enhancement 
    opened by harshhhdev 0
  • [BUG] User not detected on first load

    [BUG] User not detected on first load

    Describe the bug When a user signs in, they aren't shown as authenticated by default. They'll have to reload the page.

    To Reproduce Steps to reproduce the behavior:

    1. Go to snip
    2. Go into the command menu
    3. Click on 'Continue With ...'
    4. See error

    Expected behavior I'd expect the user to be detected by default, and not have to reload the page.

    Desktop (please complete the following information):

    • OS: Linux
    • Browser: Brave/Chromium
    • Version v1.42.97

    Additional context If the user just signs in and creates a paste, their account is associated with the paste although the website doesn't detect that they're logged into their account. Strange 🤔.

    bug help wanted good first issue 
    opened by harshhhdev 0
Owner
Harsh Singh
16yo fullstack web developer building tools and writing articles about technology, fostering a better digital world 💙
Harsh Singh
Plugin for the Steam Deck, to adjust color settings, like saturation or gamma

vibrantDeck A Steam Deck plugin (for Decky Loader) to adjust screen saturation / vibrancy. Build instrutions Clone the repository to use as an example

libvibrant 48 Jan 8, 2023
A TailwindCSS variant for class-based dark mode with CSS Modules.

A TailwindCSS variant for class-based dark mode with Svelte's scoped stylesheets and CSS modules. If you've ever tried to use TailwindCSS dark mode wi

Bryan Lee 13 Dec 1, 2022
Variant types in Roblox TypeScript - Ported from Vanilla TypeScript

Variant (for Roblox) This is a roblox typescript variant (heh, pun) of Variant. See the Variant documentation on how to use Variant. A variant type is

Australis 2 Jun 3, 2022
HanAssist - Utilities to ease Chinese variant handling in user scripts and gadgets.

HanAssist 代码文档 HanAssist 是帮助中文维基百科及其他 MediaWiki 网站上的用户脚本和小工具更优雅地处理中文变体消息的实用程序。 本程序的目标是取代wgULS()和wgUVS()小工具。 HanAssist.localize( { hans: '一天一苹果,医生远离我。'

Diskdance 3 Oct 29, 2022
They stole our free learn feature, so it's now time for an open source variant

Quizletbutfree This project was generated using Nx. ?? Smart, Fast and Extensible Build System Quick Start & Documentation Nx Documentation 10-minute

zerxal 2 Nov 13, 2022
⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

⚡️Blitz 12.5k Jan 4, 2023
A minimal & self-hostable alternative to pastebin intended for code

minBin A minimal & self-hostable alternative to pastebin intended for code Use ⌨️ A public instance is available at https://bin.kio.dev/ Building ?? n

Kio 4 Dec 29, 2022
Plugin for the Steam Deck, to adjust color settings, like saturation or gamma

vibrantDeck A Steam Deck plugin (for Decky Loader) to adjust screen saturation / vibrancy. Build instrutions Clone the repository to use as an example

libvibrant 48 Jan 8, 2023
Slide-element - A ~700 byte Promise-based library for animating elements with dynamic heights open & closed. Basically, a modern variant of jQuery's slideUp(), slideDown(), and slideToggle().

slide-element A tiny, accessible, Promise-based, jQuery-reminiscent library for sliding elements with dynamic heights open & closed. To see it in acti

Alex MacArthur 165 Dec 12, 2022
A TailwindCSS variant for class-based dark mode with CSS Modules.

A TailwindCSS variant for class-based dark mode with Svelte's scoped stylesheets and CSS modules. If you've ever tried to use TailwindCSS dark mode wi

Bryan Lee 13 Dec 1, 2022
Variant types in Roblox TypeScript - Ported from Vanilla TypeScript

Variant (for Roblox) This is a roblox typescript variant (heh, pun) of Variant. See the Variant documentation on how to use Variant. A variant type is

Australis 2 Jun 3, 2022
HanAssist - Utilities to ease Chinese variant handling in user scripts and gadgets.

HanAssist 代码文档 HanAssist 是帮助中文维基百科及其他 MediaWiki 网站上的用户脚本和小工具更优雅地处理中文变体消息的实用程序。 本程序的目标是取代wgULS()和wgUVS()小工具。 HanAssist.localize( { hans: '一天一苹果,医生远离我。'

Diskdance 3 Oct 29, 2022
They stole our free learn feature, so it's now time for an open source variant

Quizletbutfree This project was generated using Nx. ?? Smart, Fast and Extensible Build System Quick Start & Documentation Nx Documentation 10-minute

zerxal 2 Nov 13, 2022