Frontend Meeting 02 - 2024/02/07


@Iskak had some questions about the whole frontend architecture that we addressed. I will try to summarize the answers we discussed:
the webImporting method is actually a procedure defined using trpc. In the app we are using a GRPC API to communicate with the daemon backend and GraphQL to everything related to Payments.
the GRPC API is defined by the daemon using .proto files. this are the API definitions we also use to create react hooks and use hooks in the UI.
What DB we are using and who is interacting with it?
we are using SQLite for the DB and the ones mutating and changingdata in the DB are the frontend app and also the whole P2P network everytime syncs with other peers.
Currently in the app, we are rendering publications with our own document renderer in both apps (desktop and site). you can find it in the codebase in publication-content.tsx file.
This renderer needs to consider that in both apps (desktop and site) we access data in two different ways:
Desktop app hits the GRPC client directly
Sites uses a TRPC implementation of the API.
because of this, we are using a Container component pattern structure inside the renderer for each block type, which let us separate the logic of accessing data from the presentation. Both apps define their container components (app-embeds.tsx and site-embeds.tsx) but we only have one presentation component for each block type.
Feel free to review publication-content.tsx and ask us more questions!
The way packages are structure in the project right now is not the best. the goal here is to only make it required to build the apps, but not individual packages. and right now the way TS detects this is causing errors. we need to work on this asap.

Next steps

@Iskak will be writing about his process of building the new Code block project. It should serve as documentation on how to create new block type and what are the things that needs to consider when building new block types.
@horacio will write about the Application release process and everything that needs to be in place in order to create Application distributions for all platforms (MacOS, Windows and Linux)
We will ask @eric if he can join next week, so we can learn more about how TRPC is being used in sites and the app.
Next steps
First Version
Open in Mintter app