Updated Folders etc (markdown)

Eric
2026-09-03 16:59:24 +10:00
parent be18634ea8
commit 9285fad91d
+11 -5
@@ -36,20 +36,18 @@ Author-specific
- folders should appear before any brew in the user page
A URI/link chould be `/user/:userId/:folder-slug`
A URI/link should be `/user/:userId/:folder-slug` or `/user/:userId/:folder-slug/:folder-slug`
### Data Model
Folders exist as entities in their own table/collection.
Each folder is owned by one user, and it only appears in the context of _their_ userpage.
It may contain references to brews owned by any user.
If the folder `isPublished` then the folder itself per se is visible on the owner's userpage by other users.
Each folder is owned by one user, and it only appears in the context of _their_ userpage. It may contain references to brews owned by any user. If the folder `isPublished` then the folder itself per se is visible on the owner's userpage by other users.
Multiple brews can be assigned to a folder by listing the `brew.shareID` in the folder entity. (This is distinct and different from a model where the association is achieved via an attribute on the brew entity).
Sub-folders are linked via a list of subfolderIds, in the same manner as how brews are linked.
Sub-folders are linked via a list of subfolderIds, in the same manner as how brews are linked. The folder graph should not be allowed to form cycles, even though folders may have multiple parents.
### Minimal Data structure
- `__Id` (mongo specific ID field, exists wether we create it or not)
@@ -117,6 +115,14 @@ Add these to the minimal data structure (above)
- ~~`brewCount`~~ -- _can/should be calculated on the fly though_
- ~~`folderCount`~~ -- _can/should be calculated on the fly though_
### Smart Folders?
Smart Folders are simply dumb folders with rules attached that show extra brews in the folder (shown, not added or moved).
They will be ordinary folders with rules layered on later, and their rules will operate only over the owner's brews, not the entire Homebrewery database.
Smart folders are well out of scope for MVP.
### Problem: multiple authors