--- tags: v2, magesmiths, dev rel --- # v2 Architecture Tour - 95% of our frontend data comes from The Graph - Any times where a user is editing metadata and signs a message goes to our API - Metadata, custom theme, adding boosts, playlists - Can be accessed via `data.daohaus.club/dao/` with DAO address and returns JSON object with data - Nothing exposed for updating -- there are checks in place for signatures - Always planned to deprecate this (will be replaced with Poster eventually) - A lot of what we index and serve to the API are done by indexer jobs that make it available to the frontend - Token balances are queried by jobs for the frontend so that it doesn't have to fetch it all the time - We hide keys via Lambdas - Hit Gnosis API directly during Safe Minion setup - Data fetching happens throughout the app, but can look in the `utils` folder (such as `requests.js`) for many of the API calls - Some are in specific files (such as Superfluid) - Much of this is very specific to our app (and not as related to Boosts dev) - AWS Lambdas can get a lot of the data from the API to send to the frontend ## Poster - https://github.com/onPoster/contract - Contract that has a single function that emits an Event: - address of sender - string of content - encoded tag that helps with indexing - App will call `NewPost` sent by Member submitting it and content will be the JSON - Listen on the subgraph and index it - Hit the subgraph to get all the metadata entities associated with the DAO with the content string with all of the information (who updated/created, content, etc) and will have the DAO's metadata - On chain content is verified via Etherscan (by viewing the Poster contract) - Tags: - We'll have tags such as `daohaus.member.boost` - Scoped to `daohaus` by a `member` (or `baal`, `minion`) for validation, and then `boost` is the type - Informs how to parse and where to put it in the subgraph - metadata Entity has a `table` property that will be similar to a database - Can then query the `table` property to get all the `metadata` for the DAO - Logs are verified but not used for consensus - Poster is a single function call so it's fairly cheap (slightly more expensive than transferring from one person to another -- could be ~$5 on Mainnet) - Not state data (verified by consensus on every block) - Verified as transactions but aren't part of the consensus ## Internal Use - How many active DAOs? Active member count? Loot/share holders? Boosts installed? Etc. - This would be a really useful app for us to have -- the data is *around* but it's scattered in several places - Token balances is pretty difficult because they're not indexed well by address - Minion banks aren't tracked -- this is why we have our indexers -