Skip to content

harshhhdev/snip

Repository files navigation

snip

πŸŒ€ The gamma variant of Pastebin

Courier Hackathon Β· Demo

✨ Team

Harsh Singh β€’ Frontend (TypeScript) β€’ GitHub β€’ Twitter

Ibrahim Hisham β€’ Backend (Rust) β€’ GitHub β€’ Twitter

πŸš€ 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 Courier

  • Create an account at courier.com.
  • Enable and configure the Gmail extension.
  • Substitute COURIER_API_KEY in the .env file with your API.

You should be set to go. For further tools and information, check out the Courier documentation.

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