This web application runs on Linked Data which is stored on IPFS.
This demonstration, despite its straightforward use case, demonstrates how distributed ledger technology and semantic web technology can be used to enhance each other's strengths and produce better and more intelligent web3 experiences.
Only a few lines of code are required to convert this application into a Linked Data application hosted on IPFS, whilst the rest of the code is mostly related to the standard setup for a React-based web application.
Working with Linked Data is made simple in the app thanks to LINCD.js and packages from the lincd.org repository. This makes dealing with Linked Data as simple as writing any other object-oriented code thanks to LINCD's Shapes feature.
For example. see createPerson() in /frontend/src/pages/Home.tsx
:
let person = new Person();
person.name = inputName;
person.save();
The app creates a list of persons which are stored as a graph on IPFS using Filebase. Ensuring the graph is stored on IPFS consists of 2 lines of code, plus the configuration settings explained below.
export const store = new FilebaseFrontendStore('_data')
Storage.setDefaultStore(store);
To put it in another way, this application demonstrates the compatibility of distributed ledgers and Linked Data.
But it also shows that with LINCD, developers don't need any specialized understanding of either of these emerging technologies in order to use and combine them in a web application
- Create an account on Filebase if you don't already have one, and set up a new bucket for this demo.
- Clone this repo
- Open
./env-cmdrc.json
and copy your filebase access keys and the name of the bucket into this file. - Run
yarn
followed byyarn start
to start the application