Logo

dev-resources.site

for different kinds of informations.

How dAppling uses Filebase

Published at
7/11/2023
Categories
decentralization
filebase
ipfs
learning
Author
dappling
Author
8 person written this
dappling
open
How dAppling uses Filebase

At the core of dAppling, we both build code and host the completed app, ensuring a convenient experience for our users and one akin to centralized hosting for their users.

We interact with Filebase in two ways: putting things into the bucket and taking things out of the bucket.

Into the Bucket

In a way, we use 'storage' in the sense popularized by Amazon because Filebase supports s3 APIs to store content. When a build is complete, we generate build artifacts and upload them to Filebase via the API. Once this process completes, we receive a 'receipt' containing the content identifier (CID) or hash of the uploaded content. This CID is stored with the project for use later when content needs to be accessed.

This process is outlined in the following diagram in which a Uniswap developer wants to use dAppling.

Request diagram of a dappling code build - how do you build a decentralized app

Out of the Bucket

When it comes to content access, there are two main methods. Users can either directly access the content via the CID using their local IPFS node or a gateway, or they can use an auto-updating URL created by dAppling. This URL could be an auto-generated link such as garden-daisy.dappling.network, or a custom domain configured by the user, like ipfs.uniswap.org.

An aside of configuring a custom domain

custom domain request diagram using dappling

In the first case of accessing the CID directly, the content may or may not be downloaded via Filebase. This is because some other IPFS nodes may have cached the content. However, if the content does not exist, the "pinned" files will be ultimately retrieved at Filebase's nodes.

In the second case, we use Filebase's gateway directly to retrieve the content.

request diagram of accessing Firebase content via dappling

How could this be improved?

Replace the Record Handling

Currently, we use a CDN in front of Filebase's gateway, which also functions as a CDN. This process appears to involve one extra step. But how else could we allow users to use a custom domain that maps to an updatable CID?

I think it might look something like:

  • Filebase handles DNS records somehow. I know it involves certificate provisioning, which is a bummer. It would be nice to request a domain ipfs.uniswap.org and have it return the records for a user to update.
  • Filebase allows updating the CID associated with the domain programmatically. So when the Uniswap code is updated, we can update the domain.

Subdomain gateways

As I detailed in my article about IPFS and resource paths, it's crucial to stay as close to the user's development environment as possible. Therefore, we stay away from anything hosted at a "path".

From consensys IPFS security article,

TL;DR: Path-based IPFS gateways have a critical flaw: They effectively disable one of the essential security features of modern browsers: the same-origin policy.

We therefore prefer having the user bring their domain to host, like using ipfs.uniswap.org, or our preview domain like garden-daisy.dappling.network. Because of this, we have sites that will not work on path gateways such as gateway.dappling.network/<CID hash>. We would prefer the gateway support the subdomain version a la <CID hash>.gateway.dappling.network.

It would be ideal if Filebase supported these subdomains as the access is much faster than any other gateway, but meanwhile we will direct our users towards a subdomain version like <CID hash>.ipfs.cf-ipfs.com

ipfs Article's
30 articles in total
Favicon
How to work with CAR files with NestJS
Favicon
🎃🚀 Storacha Halloween Hackathon 2024: Time to Store Some Skeletons and Build Spooky Tech! 💻👻
Favicon
Ditch the Server, Own Your Words: Building a Decentralized Blog with IPFS
Favicon
Decentralized blog via ipfs
Favicon
How to Run Your Own IPFS Node and Share Files
Favicon
Hosting Websites on IPFS
Favicon
How to Deploy a Next JS App on IPFS (InterPlanetary File System) and automate using Fleek
Favicon
IPFS (InterPlanetary File System) Explained
Favicon
uploading file into pinata
Favicon
DRepo: A Decentralized Version Control System- Day 3
Favicon
Deploy Your HTML Website on IPFS with GitHub and Fleek
Favicon
O que é IPFS?
Favicon
Bakeree IPFS stands at the forefront of IPFS NFT Storage innovation.
Favicon
Simplifying IPFS with Spheron Network Effortless Web Hosting
Favicon
Top Tips for Successfully Hosting Your Static Site on IPFS
Favicon
Simplifying Comprehensive IPNS Management With Spheron Network
Favicon
Exploring Storage Options in Web3: Cloud, IPFS and On-Chain
Favicon
Navigating the IPFS Landscape: An Insider's Perspective
Favicon
Building a Decentralized Web Application with IPFS: A Step-by-Step Guide
Favicon
Step-by-Step Guide How to Store your data on IPFS with Spheron Browser SDK
Favicon
How to Use IPFS with Ethereum
Favicon
IPFS Bootcamp
Favicon
Incognfto: A Private NFT Gallery
Favicon
Innovating Web3 Infrastructure: Spheron X DripVerse Partnership
Favicon
How dAppling uses Filebase
Favicon
How to: IPNS on my Domain?
Favicon
Hosting Static Sites on IPFS
Favicon
Embracing Decentralised Web Hosting: A New Approach to Securing Web3 and DeFi Applications
Favicon
Setup IPFS images cache server in 5 min
Favicon
How to Add a Meson Cloud to Home Screen on iOS and Android?

Featured ones: