Logo

dev-resources.site

for different kinds of informations.

Pinata Filesystem and PinDrop

Published at
10/14/2024
Categories
devchallenge
pinatachallenge
webdev
api
Author
iabdsam
Author
7 person written this
iabdsam
open
Pinata Filesystem and PinDrop

This is a submission for the The Pinata Challenge

What I Built

Pinata Filesystem and PinDrop acts as a layer on top of Pinata's storage system that allows users to organise and visualise their files using folders and sub-folders.

It provides an interface and at the same time extends the features of Pinata. The users can associate files with folders, as well as do most of the general functions like creating, deleting and downloading files and folders.

Inspiration

I had instantly decided to make a fast private file sharing system right on first day of hackathon since it is something I myself needed. But the idea had to be dropped since their was too much to be done.

Fast forward to 1 day before deadline, I thought about leveraging the feature of groups. I could make use of a relational db to create a heirarchy through self-references and make it a full-fledged platform to store and organise files.

Thankfully, with no-sleep development constantly for 24 hours, I present the first version of Pinata's own filesystem.

Pindrop folder

There is a feature called PinDrop (inspired from AirDrop) that I have ideated which is supposed to be a go-to folder that is present by default in the system when a user registers.
This folder is special in that it doesn't have sub-folders, instead a user can simply push and stack files and retreive them later. This is supposed to be for instant file shares between the user's two devices. It can even have its dedicated service and routes going forward.

Demo

https://pinata-fs.vercel.app/

https://github.com/mr-loop-1/pindrop

Overview

For Future

The best thing about the database is that nothing about actual files is being stored. It is only a hierarchical representation of groups.
Currently it may seem redundant as the app asks for jwt and gateway on register but I got to know through discord that new auth provider is being developed and with that integrated, the app would be completly detached from actual user data.

tech stack

server: expressjs, knexjs, mysql, hosted on railway
frontend: vite react, tailwind, hosted on vercel

Overview

  1. The first greetings are the login/register pages. During registration, a valid pinata jwt and gateway url need to be provided. But it will never be exposed on client side and only for server operations.

  2. This is the root folder mounted at "~/". All other folders are supposed to derive from here. In pinata, this group is created when a user first signsup.

Image description

  1. Supported file types can be added using the Add File button in any folder. The file then gets added to the folder's group in pinata

Image description

  1. Similarly, except in pinDrop folder at root, new folders can be created anywhere.

Image description

  1. Clicking on a folder will navigate to it, a back button has been provided to navigate to previous folder. For navigating to root, remove the id param from url.

Image description

Image description

  1. Files and folders can be deleting using the button provided on right. pinDrop folder can't be deleted, as is root.

  2. Files can be opened in new tab using the download button provided. This is done through signed urls with expiry of 1 minute.

My Code

https://github.com/mr-loop-1/pindrop

instructions to run locally are provided. Please report any bugs/questions in comments or github issues.

More Information

Please ensure

  • Folder names can't contain spaces
  • Duplicate files/filenames can't be uploaded even in different folders as on pinata they are stored together

Way Forward

  • downloading multiple files and whole folders
  • currently delete feature of folder leaves files in subfolders dangling. i am yet to implement the query in knex as well as Pinata's sdk for recursive deletes.
  • some bug fixes and field validations
  • Currently, it requires user to manually provide jwt and gateway of their pinata accounts. I want to integrate the future pinata oauth provider to the app.
pinatachallenge Article's
30 articles in total
Favicon
French Paintings: The Intersection of Elegance, History, and Artistic Mastery at The Nicholson Gallery
Favicon
Revamped UI for NFT Artworks
Favicon
Chat with your PDF using Pinata,OpenAI and Streamlit
Favicon
The Pinata Challenge: Pinata File Hub - Seamless File Management & Uploads
Favicon
Wedding Memories: The Collaborative Wedding Album!
Favicon
Secure File Share - A safer way to share sensitive files online
Favicon
Pinata OG! | Generate beautiful OpenGraph Images with Pinata File API
Favicon
Congrats to The Pinata Challenge Winners!
Favicon
Noisy Monsters πŸŽΆπŸ‘Ύ
Favicon
Live_iy (Bring your static portraits to life)
Favicon
Image Optimizer Powered by Pinata: Secure File Storage Meets Real-Time Customization
Favicon
MINTIFY - EMPOWERING COMMUNITIES, CELEBERATING ACHIEVEMENTS!
Favicon
A decentralized file storage system using PINATA and IPFS
Favicon
ThrashBucket, store and share files anonymously
Favicon
Image Annotation for AI Model training using Pinata
Favicon
SnipShot: A Stylish Code Snippet Uploader Using Pinata IPFS
Favicon
πŸŽ¨πŸ–ŒοΈDigital Collaborative Sketchbook: A Web App for Creating and Storing Art ✎
Favicon
CrewSpace: Collaborative File Sharing & Spaces for Friends
Favicon
Pinata Filesystem and PinDrop
Favicon
Mystical Palm Reader AI
Favicon
VidSnap: Effortless Screen Recording powered by Pinata
Favicon
Decentralized Firebase Remote Config
Favicon
Pixxsha - Share Your Moments Your Way
Favicon
3D Virtual Art Museum/Gallery
Favicon
Introducing PinDrop - Your visual discovery platform
Favicon
MySQL&PostgreSQL UI client for testing and querying databases with the query+result uploaded to Pinata
Favicon
StashIt: Your Game Assets Storage Hub | Powered by Pinata πŸͺ… IPFS SDK
Favicon
Haiku Harmony: Crafting Poetry in the Cloud with Pinata
Favicon
Web App to study effectively with flashcards, space repetition, images, and audios
Favicon
PikPok – Share Your Creativity, Your Way.

Featured ones: