I'm developing an app similar to notion, But I want to get it right from the beginning but I don't know how notion manages to have so much customization in their app, How are the templates created and stored in the database, How is a note so much customizable? i.e I want to know how the database structure of an app like notion would look like in postgres? Please help.
I'm pretty sure they use documents as the base for pages.
Notion is almost a custom viewer for Markdown and CSVs files, all very well bound together.
So, my guess is that they are storing JSON documents in a relational DB, or they might be using a document-based database, like MongoDB or Firebase's Firestore or the likes.