Here we briefly explain how the marketplace works. However, for a deeper understanding the principles, especially if you want to create your own Databases and share them with another people, we refer you to the FAQ section.
To fully understand how the IPFSBay works, first it is necessary to understand how the IPFS network works.
1. How the IPFS network works
The InterPlanetary File System (IPFS) is a protocol and peer-to-peer (P2P) network for storing and sharing data (files, images, videos, even whole websites) in a distributed file system.
As opose to HTTP protocol (communication protocol of internet nowdyas), the IPFS protocol changes understanding how data is accessed from internet.
IPFS uses
content-addressing instead of location-based addressing, so data is accessed based on content itself.
This means that data can exist on many places (nodes) in the network at the same time and can be accessed from any node who hold it by the conten identifier (CID). A content identifier (CID) is a label used to point to content in the IPFS network.
It doesn't indicate where the content is stored, but it forms a kind of address based on the content itself. CIDs are short, regardless of the size of their underlying content. CIDs are based on the content’s cryptographic hash. That means any difference in the content will produce a different CID and the same content added to two different IPFS nodes using the same settings will produce the same CID.
This has several interesting implications.
If the content located in the IPFS network can exist on many places at the same time, it is very hard to censore such content. The absence of any single centralized server who hold the data makes such data and the IPFS network censorship resilient. If the data is shared by several nodes and someone removes it from some, the data can be accecessed from other nodes who still hold it. If someone removes data from all nodes, the data can be still pinned ("uploaded") into the network again and can be simply accessed by its CID.
2. Let's back to the IPFSBay marketplace
Think, what is the
key data from the point of view of big marketplace like a eBay or Amazon ?
The key data is an information "who sell what" , "description of goods", "information about price", "shipping methods", "images of goods" etc.
These pieces of information are structured and stored in a database on the server and if requested they are downloaded to web browser which displays it.
This is the centralized approach. Once the eBay (or anyone else) decides to remove your content and fire you out, he can easily do so, because he operates the database. He is the owner of the database.
If the database fails or is hacked, the data is gone or, in the worst case, misused.
But what if we use IPFS to store the key data ? The situation dramaticaly changes, because now we use distributed network to store data instead of single server operated by one authority.
And practically?
Once someone goes to the IPFSBay marketplace, a web browser retrieves key data from the IPFS network and displays it in the default template. That is the idea of the IPFSBay marketplace - separate content and form. The content (key data describing each product) is stored distributed in the IPFS network in form of small files (we call these files Product cards and Databases) and the rest of code, which process that data, is kept outside the IPFS network in form of front-end code able to run in a web browser. This code natively does not require any centrallized server. And what does it all mean? If file with the key data represents some product or a product database, and if the file is spread among sufficient amount of IPFS nodes, it is very hard to censor such file (content) and prevent anyone from to access it. There is no authority able to do it. If the file is located (pinned) in the IPFS network, anyone who use IPFSBay marketplace is able to access it ever. It is important to note that the server ipfsbay.com only provides code which runs in a web browser and all communication between web browser and IPFS network, even subsequent data proccessing, is done without ipfsbay.com. The operator does not see what data is accessed by the visitors through the marketplace, because all communication and all data proccesing is done without his influence.
3. What files marketplace stores in the IPFS network
The marketplace is designed to operate with two types of files.
The
Product cards and the
Databases. Both are
JSON files and bothe are distributed in the IPFS network. The Product card(s) referes to one product and the Database(s) referes to the set of products structured and organized into the
categories and
subcategories.
Yes, simple and efficient. First, have a look at the Product cards.
The
Product card is a simple file that containes all information about the product (and also includes base64 encoded images). You can easily create it
here. It is for free, fully anonymouse and it does not require any personal data.
Once you create the Product card, you can download it and pin it into the IPFS network yourself (you can use any free IPFS pinning services , e.g. Pinata Cloud or Temporal, pinning from Brave browser etc.), or the marketplace do it for you.
If you provide us its CID, we can add it into the our public database and your Product card becomes accesible for everyone (this is paid service).
The pinning is an important proccess in the IPFS network and you should properly understand it before you make a Product card.
We can pin the Product card for you on our IPFS node, but it is up to you to spread your Product card over as many nodes as possible.
Keep in mind that the more nodes shares your card, the faster it will load on the marketplace. Thats the nature of IPFS.
Database organizes the CIDs of the Product cards into the categories and subcategories in a JSON file which is also distributed in the IPFS network. The IPFSBay marketplace holds public database which is available for eveyone and everyone can add or edit records to it (the term "add" or "edit" is not fully correct, because as mentioned above any changes in the file produces new CID. The marketplace holds and publish the latest CID as well as all the previous CIDs of the Database). You are also free to create your own Database with whatever Product cards, categories and subcategories you wish, the database absolutely independent of us and load it from the IPFS network through the marketplace.
4. How the marketplace retrieves the data from the IPFS
The marketplace can access the data in the IPFS network from any web browser without the need of any server code.
You can choose from three access options. The first option and the fastest it to use our IPFS gateway which is operated by the IPFSBay community. You can also choose from the IPFS gateways operated by IPFS community or 3rd party gateways, but their ability to handle the requests can be limited. A second option is to use JS-IPFS API. This is the native connection to the IPFS network which implements IPFS protocol in the browser and is written in JavaScript. The last one is to use Brave browser which integrates IPFS protocol directly.
If you share links to your Product cards or Databases, we reccomand you to point it to the default IPFS gateway or the 3rd party fastest gateways.
Thats the fastest option and the best one for those who are not familiar with IPFS.