batuhan / og-saltana

Abandon iteration for Minipage
https://www.minipagehq.com
1 stars 0 forks source link

[issue WIP] feature: Documents & Attachments #17

Open batuhan opened 3 years ago

batuhan commented 3 years ago

We currently have a documents service that's intended for stuffing arbitrary data for our platform users. It's utilized in Ratings for example. This is a nice way to quickly extend functionality so I'd like to keep it. This issue is related to an addition to that.

Documents feature is an abstraction (much like Links, described in #8), creators won't be clicking any "New Document" button. Instead, some resources will have one or more documents attached to them. Documents in this context will have Markdown content with embed blocks (like Notion), using the tech behind http://github.com/outline/outline

Documents are created for each asset (product), link with the type page and creator (for their profile page).

Assets have two documents, one for the product description and one for after checkout. In both cases, the creator will be able to drag and drop files (much like Notion) as they please and sprinkle it with some content. The idea is, after the checkout you (as a creator) can give your customers files, or some reading recommendations, thank you note or a TypeForm embed for feedback or an unlisted YouTube video embed etc. etc. Most of this embed magic happens on the frontend while the backend just stores some array.

for asset, keep the product description document in metadata.docId (and metadata._private.docId for after checkout) for user, keep it metadata.instant.docId, for link/page keep it in target.

Attachments are also an abstraction layer between our object storage and our app.