Welcome to New Web3 Devs!

Presentation for first time devs to RAIRprotocol

About RAIRprotocol

RAIRprotocol was originally closed source enterprise SaaS dApp infrastructure in development since 2020. Original product was an NFT marketplace and digital rights management engine. Production codebase used by Sony and other large enterprises. We went 100% Open Source May 2024! Now have 2k+ followers on Github with 1k+ forks!

  • 5000 commit history migrated to Github. 25+ original core developers contributed

  • Typescript and vite.js refractor. Modern deployment (Docker)

  • Full API with open source backend

Web3 Development Isn't Scary!

  1. All “dApps” (distributed applications) are just like web2 "apps"

  • Offchain database (we use MongoDB)

except need some extra components to interface with the blockchain

  • Syncing engine (we can sync with native RPC or with the help of Alchemy)

  • Onchain execution engine (we use solidity based logic as the EVM has the largest developer network and thus most functionality)

  • + your unique Frontend!

  1. 95% of the tooling is web2 not web3 (Docker, GCP, Hashicorp) You do not need to know Solidity or interact directly with the blockchain to be a Web3 developer!

  2. API based deployment. You also don’t need to know how Alchemy, or other web3 services work at the infrastructure level, you only need their API keys and basic familiarity with their UIs!

Structure of Our Repository

Basic overview of RAIRprotocol microservices. We run each as its own Docker image.

  • RAIR-Node (backend) - don’t change this. Can use premade dummy fields if you want to save custom data to the MongoDB

  • RAIR-Front (REACT frontend) - Start here. Can modify the frontend

  • RAIR-Sync (syncing engine) - You only need to change the alchemy key in the env file

  • RAIR-Media - Harder to use. needs hashicorp and k8s setup to work

+

  • RAIR-Infra - all the manifest files and other scalable cloud infrastructure. You can build a single VM deployment first, and only need Kubernetes to create auto scaling dApps that can handle significant usage.

  • REDIS and MongoDB docker images. These are prebuilt and are not part of our repo but you'll need them.

Installation

We need to run Docker inside of a Ubuntu Linux machine. This can be locally (Localhost. WSL. 8 gb ram requirement) or in the cloud. At scale we need to make many Docker containers using Kubernetes for scaling and reliability.

We are providing empty contabo vms to winners! Over time you can configure ssl and firewall ports to deploy a real dApp online for anyone to use

Two sample dapps you can use

  • Thirdweb cat attack - 16gb ram req.

  • Simple dapp - modified frontend that hides functionality

Non docker frontend deployment

  • Vite configuration proxy field: by default frontend starts from localhost. You can modify to call a remote rair-node backend (eg api.rair.market)

  • Docker version of frontend uses port 8088. Docker down for docker version. Then start command for non docker version with same port.

  • For starting rair-front locally: npm i to install all dependencies npm start to start the local frontendTo change the backend proxy check the rair-front/vite.config.ts file , the proxy setting has a target value configured by default to http://localhost:5000 , the docker backend, you can modify this value to connect to other backends. For example they can change it to http://rairprotocol.xyz:5000 to connect to that server's backend.

Problem Sets

See readme file in library for details. Problems:

  1. Metadata dApps (medical records, IOT devices, Carbon Credits, etc)

  2. Zoom dApps (Note: API is deprecated. Can use this logic to charge tokens to unlock meetings with experts: Therapy, Coding help, etc)

  3. Hardhat deployment to new EVM (guide.md in rair-solidity repo) Automated scripts to call with settings correctly

  4. Akash Chat: Example dApp to detail today. How can you mint AI chats as NFTs and save the provenance of the conversation on chain. Allows you to monetize and memorialize chats.

Akash Chat How to Guide Example dApp

Basic steps to use RAIRprotocol to make any new kind of dApp 10x faster

  1. Create a new route in the frontend

  2. Investigate integrations SDK (Akash chat) Run Akash Chat natively

  3. Get API endpoint for export data from Akash Chat.

  4. Translate json to opensea metadata format standard <- This is new logic needed

Questions and Open Forum for Discussion

Thank you for participating!

We look forward to seeing you next week and will have our amazing Devops and QA engineer Suresh onsite to help!

Last updated