(no title)
shiohime | 4 years ago
Frontend hosting, I decided to go with a traditional hosting solution (vercel). Nothing changing here.
Backend APIs - Was able to replace the need for dedicated backend APIs by using RPCs and GraphQL queries using a project that allows for indexing smart contract event data in a GraphQL queryable format (https://thegraph.com/en/). I also created a smart contract which lives on the Ethereum chain and allows for users to achieve the interactivity that I desired for my app (which was essentially an escrow for a scheduling application). The events are indexed by the graph, so I could efficiently query this subgraph to retrieve relevant data to display on my frontend.
Authentication - Just use web3 packages to connect users wallets to the website. No need to use OAuth+OIDC or similar approaches for authentication, just connecting wallets on the frontend works.
If I wanted to take it a step further, I could have hosted my app on permaweb (https://www.arweave.org/) which will host the content in a distributed fashion with a one time charge.
For a different example, I'm creating an NFT project that uses the NFT ownership to grant access to specialized services (launching the user's NFT in a specialized application I created in an open source gaming engine). I use similar techniques as above, still hosting on vercel, but I use the innate ability to use NFTs as proof of ownership to act as an auth token into my service. This allows for me to distribute the interactive art I've created in a way that fully grants users ownership over the art, and also allows for them to access these specialized services only available to owners. Furthermore it's trivial to detect forgeries so even if someone does the horrible act of right click saving the art, they won't actually get any of the actual value from doing so. And if someone attempts to forge the token by minting an exact copy, it still will not grant access as it's easy to detect forgeries.
It's pretty exciting imo and has been a very fun project to work on. So by leveraging the similar approach for authentication (connect wallet), and NFT proof of ownership for authorization, I've been able to create a unique project with a lot less complicated of a stack tbh.
I personally think there's value in mixing centralized services (like traditional hosting of applications) with decentralized services (like using blockchains as a database of ownership, such as with NFTs).
No comments yet.