I'm working on a personal project to get started with learning web3, its a simple app where users can connect their wallets and load a dashboard that displays a feed of transactions based on wallets they've decided to follow. Somewhat similar to functionality zapper.fi has with its address book or token watchlist. I'm using react for my front end but am trying to decide which backend framework to use to store the addresses an address has on there watchlist. Was wondering if there's something that's commonly used in the industry alongside web3 for storing simple info about a connected address. I wouldn't think anything too crazy would be necessary as the data isn't complex at all and though I do plan on this being in production, I don't plan on it needing to scale that far. Any advice or resources someone could point me towards?
2 Answers
The simplest way I've found so far to do these is to use the Moralis SDK which uses a PostgreSQL database in the backend to handle caching blockchain data on behalf of their web app. They have a free tier as well as their own node service like Alchemy or Infura for connecting to the blockchain as well. There's a sample that would meet your use case of "getting token balances from an account" at https://docs.moralis.io/moralis-server/web3-sdk/account#gettokenbalances which you can jump back from to their "Create a DApp" tutorial to see if this works for you, but I found it's a good starting point coming from Web2 to Web3 myself. You can also check out the BuildSpace tutorials at https://buildspace.so which give you actual projects to go thru if you want to also get deeper into the raw Solidity contract writing bits and want some exposure to tooling like Hardhat as well. Hope this helps