shiohime
Joined 9 years ago
Joined 9 years ago
Oh well, I just hope that when I release my project next month that I can prove that it's an incredibly unique experience that some group of people find it to be an exciting product.
Although it is fascinating to see more parts of the webstack increasingly decentralized, I also do not fully buy into the "decentralize everything" ideology that some people in the space have. Some people may not call projects "web3" if they run on traditional infra like AWS, but there is absolutely value in a hybrid model in my mind that leverages a decentralized ledger for proof of digital ownership on top of more traditional infra. I don't think for instance that making a platform to replace existing web2 websites like twitter / FB / your favorite website is the way to look at it, but rather to figure out new ideas and products, maybe fully decentralized, maybe not. To me it doesn't matter, I just want unique, streamlined user experiences that provide value to users who want to participate in the ecosystem. Even if it is just a small community, it's fun.
If you're curious and want to try out the flow, you can download a web3 wallet like MetaMask - https://metamask.io/ - this is a popular web wallet extension for Ethereum and EVM platforms. If you want to try out Solana, I recommend https://phantom.app/
I personally like Solana more than EVM chains at the moment but it doesn't cost anything for you to try either.
Once you have the extension and create your wallet, you can navigate to an NFT marketplace, and connect your wallet.
Ethereum: https://opensea.io/ - The most popular Ethereum NFT marketplace
Solana: https://solanart.io/ - One of the most popular Solana NFT marketplaces
You can then click on the connect / select wallet button, and it will allow for you to connect your wallet to the website. This will authenticate you into their website, there's some additional steps on Opensea IIRC if you want to construct a full profile, but the base authentication only requires this. And like I mentioned, you can authenticate in this manner without owning a single dollar worth of crypto.
For the projects that allow for you to interface with chains / wallets, I've used these:
For ethereum: https://github.com/ChainSafe/web3.js
For solana: https://github.com/solana-labs/solana-web3.js
Essentially what it comes down to is a user has a wallet, that is typically a web wallet via extension, but you can of course use hardware wallets if you'd like, however those do require you to own one, so if you just want to play around with the ecosystem, these extensions are the easiest to use. These above projects are javascript APIs that allow for interacting with wallets and onchain programs.
Note that both of these are frontend solutions. There are backend solutions for both chains.
EDIT - also there is this provided from solana labs as an adapter for many different wallet types: https://github.com/solana-labs/wallet-adapter
As a solo developer making applications in the ecosystem, it's a breath of fresh air to not deal with Oauth+OIDC workflows and utilize wallet connectivity + token authorization to very elegantly handle these scenarios on smaller projects. End user experiences are pretty great too, I quite enjoy being able to authenticate into a website without needing to associate everything with my email address and/or rely on 3rd parties to provide trust solutions such as SSO via Google/FB/Okta/whatever.
And yes, the risk is higher in a decentralized model because if my private keys are compromised on most wallet types, then I can lose my funds / identity. There are solutions to help lower this risk however.
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).