Lädt...


🔧 pinata-whiteBoard


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

This is a submission for the The Pinata Challenge

What I Built

I built a collaborative whiteboard application called "Pinata Whiteboard" using React and Pinata IPFS services. This application allows users to draw, upload images, save their whiteboards to IPFS, and even mint their creations as NFTs

Demo

Image description

Image description

My Code

https://github.com/KUNDAN1334/pinata-whiteboard

More Details

Here are clear examples of how I used Pinata in my project:

1.Image Upload: When a user uploads an image to the whiteboard, it's stored on IPFS using Pinata's pinning service.

const handleImageUpload = async (file) => {
  const cid = await uploadFile(file);
  const url = getFileUrl(cid);
  canvasRef.current.addImage(url, 0, 0, width, height);
};

2.Saving Whiteboards: Users can save their whiteboards to IPFS, storing the entire whiteboard state.

const handleSave = async () => {
  const whiteboardData = canvasRef.current.getWhiteboardData();
  const cid = await saveWhiteboard(whiteboardData);
  alert(`Whiteboard saved! CID: ${cid}`);
};

3.Loading Whiteboards: Users can load previously saved whiteboards from IPFS.

const handleLoad = async (cid) => {
  const whiteboardData = await loadWhiteboard(cid);
  canvasRef.current.loadWhiteboardData(whiteboardData);
};

4.Listing Saved Whiteboards: The application fetches and displays a list of saved whiteboards using Pinata's Pin List API.

const listWhiteboards = async () => {
  const response = await axios.get(
    'https://api.pinata.cloud/data/pinList?status=pinned',
    {
      headers: {
        pinata_api_key: PINATA_API_KEY,
        pinata_secret_api_key: PINATA_SECRET_API_KEY,
      },
    }
  );
  return response.data.rows.filter(pin => pin.metadata.name === 'Whiteboard');
};

5.NFT Minting: Users can mint their whiteboards as NFTs, storing both the image and metadata on IPFS using Pinata.

const handleMint = async (e) => {
  e.preventDefault();
  const imageBlob = await getWhiteboardImage();
  const imageCID = await uploadFile(new File([imageBlob], 'whiteboard.png'));
  const metadata = {
    name,
    description,
    image: `ipfs://${imageCID}`,
  };
  const metadataCID = await mintNFTMetadata(metadata);
  alert(`NFT minted successfully! Metadata CID: ${metadataCID}`);
};

...

🔧 Pinata OG! | Generate beautiful OpenGraph Images with Pinata File API


📈 40.84 Punkte
🔧 Programmierung

🔧 Pinata OG! | Generate beautiful OpenGraph Images with Pinata File API


📈 40.84 Punkte
🔧 Programmierung

🔧 The Pinata Challenge: Pinata File Hub - Seamless File Management & Uploads


📈 40.84 Punkte
🔧 Programmierung

🔧 Pinata CLI: A CLI Application for the Pinata.Cloud Files Interface


📈 40.84 Punkte
🔧 Programmierung

🔧 Image Optimizer Powered by Pinata: Secure File Storage Meets Real-Time Customization


📈 20.42 Punkte
🔧 Programmierung

🔧 Join us for The Pinata Challenge: $3,000 in Prizes!


📈 20.42 Punkte
🔧 Programmierung

🔧 SnipShot: A Stylish Code Snippet Uploader Using Pinata IPFS


📈 20.42 Punkte
🔧 Programmierung

🔧 A decentralized file storage system using PINATA and IPFS


📈 20.42 Punkte
🔧 Programmierung

🐧 Horticular is a beautifully relaxing garden-restoring game inspired by Viva Pinata


📈 20.42 Punkte
🐧 Linux Tipps

🔧 Laveraging Pinata API to upload files


📈 20.42 Punkte
🔧 Programmierung

🔧 A decentralized file storage system using PINATA and IPFS


📈 20.42 Punkte
🔧 Programmierung

📰 Emily Flitter Introduces Us to the High-Net-Worth Piñata


📈 20.42 Punkte
📰 IT Security Nachrichten

🔧 Creating NFT Artworks with Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Break-Time: Digital Time Capsules with Pinata


📈 20.42 Punkte
🔧 Programmierung

🕵️ Using Ghidra to Reverse Engineer Viva Pinata for Windows


📈 20.42 Punkte
🕵️ Reverse Engineering

🔧 Creating NFT Artworks with Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Break-Time: Digital Time Capsules with Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Genith: Create Images and Videos with AI, Store with Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Image generation with DALL-E and Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Effortless Image Tag Generation: Streamline Your Workflow with Pinata and IPFS


📈 20.42 Punkte
🔧 Programmierung

🔧 Integrating Pinata for Seamless Image Uploads in Nfticket


📈 20.42 Punkte
🔧 Programmierung

🔧 ImagePro: Streamlining Figma Exports with Pinata Cloud Integration 🚀


📈 20.42 Punkte
🔧 Programmierung

🔧 Pinata Food Recipe Collaborator


📈 20.42 Punkte
🔧 Programmierung

🔧 File Upload with Pinata’s Files API


📈 20.42 Punkte
🔧 Programmierung

🔧 Pinata Food Recipe Collaborator


📈 20.42 Punkte
🔧 Programmierung

🔧 Building a Chat with PDFs using Pinata,OpenAI,, and Streamlit


📈 20.42 Punkte
🔧 Programmierung

🔧 Haiku Harmony: Crafting Poetry in the Cloud with Pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Detective Simulator - Powered by pinata


📈 20.42 Punkte
🔧 Programmierung

🔧 Meme Maker Powered by Pinata: Secure File Storage Meets Real-Time Customization


📈 20.42 Punkte
🔧 Programmierung

🔧 Introducing PinataNET: A Simple C# Wrapper for the Pinata API


📈 20.42 Punkte
🔧 Programmierung

🔧 Created a dApp storing data on Pinata - IPFS


📈 20.42 Punkte
🔧 Programmierung

🔧 FileShare| A FileSharing Platform built using Next.js and Pinata Files API


📈 20.42 Punkte
🔧 Programmierung

🔧 Congrats to The Pinata Challenge Winners!


📈 20.42 Punkte
🔧 Programmierung

🔧 Real-Time Chat Application with React and Pinata for Effortless Messaging and File Sharing


📈 20.42 Punkte
🔧 Programmierung

🔧 MySQL&PostgreSQL UI client for testing and querying databases with the query+result uploaded to Pinata


📈 20.42 Punkte
🔧 Programmierung

matomo