Inspiration

We all have those times where we want to share some quick snippets of code online; whether we're hit by Discord's 2,000 character limit, or if we want to store and share some useful code snippets we'll come back to later. For tasks like these, most people tend to use an online Pastebin.

Quite honestly, online pastebins right now suck. I haven't come across a properly decent one till date! The most popular tool currently is pastebin.com, and their website is far from something I'd enjoy using. It's absolutely literred with a million advertisements and trackers everywhere. The UI/UX is terrible, and there are millions of accessibility problems.

There's also Hastebin, which has slightly better application interface however it's lack of basic features makes the website feel rather incomplete to me.

Ibrahim and I had discussed this idea before, and we'd been wanting to create a viable alternative for Hastebin/Pastebin for quite a bit of time, and this hackathon gave us an opportunity to do just that.

What it does

At it's core, the website is minimalist. We designed it at the core with the principles of accessibility and minimalism, and we've kept as few elements on the screen as we possibly can. The greater functionality of this application resides in the command menu, which is central to the navigation of the application.

In Snip, you can paste your code and create a 'snippet', which publishes your code to the site. You can pick from over two-hundred languages, set a custom expiry time, encrypt the snip, or even edit the slug. You can then share the link with whoever, and they can view your code.

However, Snip contains many other amazing tools for power users. Other than the utility we've already mentioned, we've built a full login system with Courier and Supabase authentication which you can use to keep track of your pastes, along with.

How we built it

Initially, we built this project back in Oct 2022, but it was rather rushed. We hadn't kept a clear roadmap, and the application lacked polish.

As previously mentioned, speed is crucial for this application. We decided to build the backend in Rust, powered by Netlify serverless functions. Combined, they have cold-boot times under twenty milliseconds which are almost ten to fifteen times faster than Node.js or Deno functions. We also used Supabase heavily in the backend, and utilised in-built storage buckets, database, and authentication features.

For the frontend, we decided upon Next.js with Tailwind CSS. Additionally, we used a library which I authored, called 'kmenu', which is what powers the command menu for our site.

Challenges we ran into

We had no shortage of challenges whilst building this product. In fact, due to issues with Rust and Windows, Ibrahim had to re-install his entire operating system in the middle of the hackathon. In the end, after two all-nighters, a re-install of Windows, and all odds of us finishing this project, we managed to finish this and turn it in before the submission deadline. We hope you'll enjoy it as much as we enjoyed using Courier.

Accomplishments that we're proud of

We're proud of...

  • Effectively integrating Courier into our application without much prior experience
  • Being able to submit a project for this hackathon with our busy schedules
  • Being able to use Netlify Rust functions without any prior experience to create an application of this scale
  • Finishing this project against all odds
  • Being able to efficiently work in a team

What we learned

This experience was very valuable for both of us, and helped us improve our teamwork skills. Through making sacrifices/compromises, communicating effectively, and imbuing quality, our coordinated and collective efforts led to some great things. We also learned some new technologies, such as Supabase, Netlify serverless, and Courier.

What's next for snip

We plan to work on improving Snip even more. We're planning to use Courier to add improved notification logging into the application, along with expanding upon the initial set of features to truly make it the best Pastebin there ever was.

Built With

Share this project:

Updates