Hello and welcome to the forum :)
Interesting concept. I am not sure how useful this would be for me or my projects as clicking together the apps in r3 is maybe 20%-30% of the work - with the rest being finding out (often with clients) what the software is supposed to do in the first place.
But since a solution like this does not currently exist afaik, I have no idea if it would not be really useful regardless.
To your question: What you are looking for is called the r3 "schema" - ie. the defintion of all structures in a r3 app. You can find the current schema here: https://github.com/r3-team/r3/blob/main/types/types_schema.go
In the schema, a r3 app is called a "module". As you can see in the file, every module includes all other entities (relations, attribute, forms, menus, etc.). So if you save a module, it includes everything else.
The final *.rei3 file is just a zip file (literally), that includes JSON exports of all r3 schemas that the exported r3 app depends on. You can unzip a *.rei3 file and look at it directly - it´s human-readable JSON.