-
Notifications
You must be signed in to change notification settings - Fork 313
Filecoin Pin docs: update landing page and add dApp demo and github action example #2425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 19 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
52b0c86
add pin assets
jennijuju a2fe58e
update pin page names
jennijuju 750fb0a
update pin readme:wq!
jennijuju a29bf17
Incorporating latest changes from Notion
BigLep 07b03df
Fixing links
BigLep f0fab37
Add in Github Actions doc that was in Jame's branch.
BigLep fad7240
Typo fix
BigLep 92c4e26
Minor title changes...
BigLep 9e3f8ce
Heading changes
BigLep 650760f
Adjust headings for CLI so that the table of contents renders correctly
BigLep 158c535
Updating the landing page
BigLep b2846a3
Apply suggestion from @momack2
BigLep ed2c21c
Apply suggestion from @momack2
BigLep 282992b
Update builder-cookbook/filecoin-pin/README.md
BigLep 8c6df01
Update builder-cookbook/filecoin-pin/pin-dapp.md
BigLep ffb3be7
Update builder-cookbook/filecoin-pin/pin-dapp.md
BigLep 7fe7c41
Incorporated comments. Expanded the README.
BigLep ee6fed2
Added youtube link.
BigLep 82dd3eb
Fixed description since hyperlinks don't render.
BigLep 94d65de
Update builder-cookbook/filecoin-pin/README.md
BigLep 6e7aadd
Update builder-cookbook/filecoin-pin/filecoin-pin-cli.md
BigLep a954a7b
Fixing links
BigLep 446fd3d
Trying other youtube link.
BigLep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,41 @@ | ||
| --- | ||
| description: How to use the Filecoin Pin CLI and creating GitHub Actions from the terminal | ||
| description: Pin IPFS content to Filecoin using familiar IPFS tools and workflows. | ||
| --- | ||
|
|
||
| # Filecoin Pin | ||
|
|
||
| * [filecoin-pin-cli.md](filecoin-pin-cli.md "mention") | ||
| * [host-a-website-with-filecoin-pin-using-github-actions.md](host-a-website-with-filecoin-pin-using-github-actions.md "mention") | ||
| * [store-ipfs-files-on-filecoin-a-drag-and-drop-guide.md](store-ipfs-files-on-filecoin-a-drag-and-drop-guide.md "mention") | ||
| * [faq.md](faq.md "mention") | ||
| ## Status | ||
|
|
||
| Filecoin Pin is currently **alpha software** running on Filecoin Calibration testnet. As of 2025-10-15, It is not recommended for production use yet, but it is undergoing active development and will be ready for production later in 2025Q4. | ||
|
|
||
| ## What is Filecoin Pin? | ||
|
|
||
| Filecoin Pin is a fully decentralized persistence layer for IPFS content using the global network of Filecoin storage providers with cryptographic guarantees. | ||
|
|
||
| When you use Filecoin Pin, your IPFS files gain: | ||
|
|
||
| - **Verifiable persistence** - Storage providers must cryptographically prove daily that they continue to store and serve your data | ||
| - **Economic incentives** - You only pay when storage proofs are successfully delivered and verified onchain | ||
| - **Decentralized infrastructure** - Your data can be stored across a global network of independent storage providers | ||
| - **Sovereign data** - Choose your providers, audit storage proofs and payments onchain, with no dependency on a single company | ||
| - **Seamless IPFS integration** - Continue using standard [IPFS Mainnet](https://docs.ipfs.tech/concepts/glossary/#mainnet) tooling like Kubo, Helia, and IPFS HTTP Gateways while gaining Filecoin's persistence guarantees | ||
|
|
||
| ## Who is Filecoin Pin for? | ||
|
|
||
| Filecoin Pin is designed for developers building on IPFS who need trustless, economically-incentivized persistence for their content. Whether you're building dApps, workflows, websites, AI agents, or other applications, Filecoin Pin provides the missing persistence layer for IPFS. | ||
|
|
||
| ## How to Get Started | ||
|
|
||
| Get started using Filecoin Pin today with: | ||
| 1. [Filecoin Pin CLI](filecoin-pin-cli.md) - Upload new or existing IPFS files directly to Filecoin via the command line. Perfect for developers who want to integrate Filecoin storage into scripts, workflows, or local development environments. | ||
| 2. [Filecoin Pin GitHub Actions](github-action.md) - Use GitHub Actions to automatically publish websites or build artifacts to IPFS and Filecoin as part of your CI/CD pipeline. Ideal for static websites, documentation sites, and automated deployment workflows. | ||
| 3. [Filecoin Pin dApp Demo](dapp-demo.md) - Run or fork a simple demo dApp that demonstrates Filecoin Pin in a browser-based application. Great for understanding how to integrate Filecoin Pin into web applications. | ||
|
|
||
|
|
||
| ## Learn More | ||
|
|
||
| - **[FAQ](faq.md)** - Common questions about Filecoin Pin | ||
| - **[Filecoin Pin GitHub Repository](https://github.com/filecoin-project/filecoin-pin)** - Source code and technical documentation | ||
| - **[Community and Support](https://github.com/filecoin-project/filecoin-pin?tab=readme-ov-file#community-and-support)** - Join the community for real-time developer support and updates. | ||
|
|
||
|
|
||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| --- | ||
| description: See an example of Filecoin Pin working end to end within a web context. | ||
| --- | ||
|
|
||
| # Filecoin Pin dApp Demo | ||
|
|
||
| ## What You'll Build | ||
|
|
||
| In this walkthrough, you’ll build a simple drag-and-drop file uploader that: | ||
|
|
||
| - Stores IPFS files directly on Filecoin with built-in payments, all in browser! | ||
| - Tracks real-time upload progress through each step | ||
| - Retrieves data easily from IPFS Mainnet and the underlying Filecoin Service Provider | ||
| - Verifies persistent storage with on-chain Filecoin proofs | ||
| - Multi-user support with session-based authentication | ||
| - Seamlessly integrates with React, TypeScript, and Vite | ||
|
|
||
| ## Setup | ||
|
|
||
| We will start building by [forking the *filecoin-pin-website demo repo](https://github.com/filecoin-project/filecoin-pin-website/fork).* Make sure you have **Node.js 18+** and **npm 9+** installed. The dapp works with Filecoin Calibration testnet. | ||
|
|
||
| This will take ~10min. ⏲️ | ||
|
|
||
| ### Step 1: Fork, Clone, and Install Dependencies | ||
|
|
||
| ```bash | ||
| # Fork the repo using the command below | ||
| # or visit [https://github.com/filecoin-project/filecoin-pin-website/fork](https://github.com/filecoin-project/filecoin-pin-website/fork) | ||
| gh repo fork filecoin-project/filecoin-pin-website | ||
|
|
||
| git clone https://github.com/YOUR-USERNAME/filecoin-pin-website.git | ||
| cd filecoin-pin-website | ||
| npm install | ||
| ``` | ||
|
|
||
| ### **Step 2: Set Up Your Filecoin Wallet** | ||
|
|
||
| A Filecoin wallet is needed to send transactions on Filecoin and pay for the Filecoin storage service. | ||
|
|
||
| This demo dapp supports two authentication methods: | ||
|
|
||
| - **Private Key:** easiest for local development and learning. | ||
| - **Session Key:** recommended for production deployments - allows multiple users to share one wallet safely. | ||
|
|
||
| 💡 The demo repo supports deployment with a shared session key, allowing multiple users to safely upload files using the same wallet. It has hardcoded DEFAULT_WALLET_ADDRESS and DEFAULT_SESSION_KEY that are ready to go, but please do NOT use it for production. You can override these defaults with env vars, see instructions [here](https://github.com/filecoin-project/filecoin-pin-website/blob/main/CONTRIBUTING.md#local-setup)! | ||
|
|
||
| **2.1 Get test FIL and test USDFC** | ||
|
|
||
| If you are using your own wallet, you need to get test FIL and test USDFC to pay for the Filecoin storage service and transactions. | ||
|
|
||
| 1. Create or use an existing Filecoin wallet on the ****Calibration testnet**** ([such as MetaMask](https://docs.filecoin.io/basics/assets/metamask-setup#tab-calibration)). | ||
|
|
||
| 2. Visit the [Filecoin Calibration Faucet](https://faucet.calibnet.chainsafe-fil.io/funds.html) to get free test FIL (to pay for transaction gas). | ||
|
|
||
| 3. Visit the [Filecoin USDFC faucet]([https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc](https://forest-explorer.chainsafe.dev/faucet/calibnet_usdfc?__cf_chl_tk=qFwEfa7MNFkJlhKo32IUtR9rgP99qqf_XOmTs7qhusg-1758703656-1.0.1.1-gE8b6EQEmdp0lgg0gk5j2UZhF_69vRyYAAhtt..weyA)) to get test USDFC, which is a USD stable coin backed by FIL that can be used to pay for services. | ||
|
|
||
| ### **Step 3: Run Your dApp** | ||
|
|
||
| Fire up your local development server: | ||
|
|
||
| ```bash | ||
| npm run dev | ||
| ``` | ||
|
|
||
| Visit `http://localhost:5173` and you should see your dApp running! That is all it takes to set up your app. Now, let’s upload a file to see the magic happen! | ||
|
|
||
| ## Store IPFS Files on Filecoin | ||
|
|
||
| The magic happens in one key file [**`src/hooks/use-filecoin-upload.ts`**](https://github.com/filecoin-project/filecoin-pin-website/blob/main/src/hooks/use-filecoin-upload.ts). This is where your IPFS files get uploaded to Filecoin. | ||
|
|
||
| ### Step 1: Upload the data | ||
|
|
||
| - **Prepare Service** - Validates wallet balance and gets the Filecoin Warm Storage service initialized. | ||
| - **Create CAR** - Converts your file to an IPFS CAR (Content Addressed aRchive) file. | ||
| - **Upload** - Sends the CAR file to a Filecoin Storage Provider (SP). | ||
|
|
||
|  | ||
|
|
||
| ### Step 2: Announce CIDs and confirm the transaction | ||
|
|
||
| The Filecoin SP: | ||
|
|
||
| - indexes the IPFS CAR file and publishes all the contained CIDs to the IPFS network via IPNI. | ||
| - commits to the Filecoin network via onchain transactions to store the data. Once the transaction is confirmed, your data is paid to be persisted on Filecoin. | ||
|
|
||
|  | ||
|
|
||
| ### Step 3: Download the data | ||
|
|
||
| Your data is available from both the IPFS Mainnet network using standard traditional IPFS tooling and/or directly from Filecoin SPs. | ||
|
|
||
|  | ||
|
|
||
| ### **Step 4: Verify your data storage** | ||
|
|
||
| Filecoin storage providers submit cryptographic proofs regularly onchain to prove that they are storing your data, and you can verify and see it for yourself [on the PDP Scan](https://pdp.vxb.ai/calibration). | ||
|
|
||
|  | ||
|
|
||
| That is it - you now have a dapp with a drag-and-drop interface to store IPFS Files on Filecoin! | ||
|
|
||
| ## Next Steps | ||
|
|
||
| 1. Check back on the [filecoin-pin-website repo](https://github.com/filecoin-project/filecoin-pin-website) - it will continue to be updated as new functionality is brought to filecoin-pin. | ||
| 2. Feel free to report any issues with the dApp demo to https://github.com/filecoin-project/filecoin-pin-website/issues | ||
| 3. Check out the the [other example uses of filecoin-pin](../). | ||
| 4. Ask questions or get help with filecoin-pin in the [supported communcation channels](https://github.com/filecoin-project/filecoin-pin?tab=readme-ov-file#support-info). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| description: Host a static website with Filecoin Pin using GitHub Actions | ||
| --- | ||
|
|
||
| # Filecoin Pin GitHub Action | ||
|
|
||
| `filecoin-pin` can be used in CI pipelines like GitHub Actions to upload assets to the Filecoin decentralized storage network. Static website assets are particularly good candidates, given the existing tooling within the IPFS ecosystem for static website retrieval. | ||
|
|
||
| The [Filecoin Pin repo](https://github.com/filecoin-project/filecoin-pin) has an [example upload to Filecoin GitHub Action](https://github.com/filecoin-project/filecoin-pin/tree/master/upload-action) that can be used directly or as a starting point for your own CI pipeline. | ||
|
|
||
| The example filecoin-pin upload action itself has a [usage example](https://github.com/filecoin-project/filecoin-pin/tree/master/upload-action/examples), and you can even see it in production as part of [filecoin-pin-website's CI pipeline](https://github.com/filecoin-project/filecoin-pin-website/tree/main/.github/workflows)! | ||
|
|
||
| Below is also a video walkthrough of the example GitHub Action in use! | ||
|
|
||
| {% embed url="https://www.youtube.com/watch?v=_2ZsMYXfgwI=" %} | ||
|
|
||
| Note: there is more work coming soon to add "filecoin-pin functionality" directly to the robust [ipshipyard/ipfs-deploy-action](https://github.com/ipshipyard/ipfs-deploy-action) ([tracking issue](https://github.com/ipfs/ipfs-deploy-action/issues/39)). | ||
|
|
||
|
|
2 changes: 0 additions & 2 deletions
2
...-cookbook/filecoin-pin/host-a-website-with-filecoin-pin-using-github-actions.md
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
...der-cookbook/filecoin-pin/store-ipfs-files-on-filecoin-a-drag-and-drop-guide.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.