DEV Community

Ted Larsson
Ted Larsson

Posted on

need trello mongodb schema

So I've been trying to find the schemas that trello use for their backend. I have an assignment in my backend course to create a trello clone but with less features, now all i want to know is if they use arrays to keep references
(Example: boardSchema {title: string,
Lists[
mongoose.Types.ObjectId,
ref: List
]}) or if they only keep a reference to the parent
(Example:
ListSchema {
Title: string
BoardId:
mongoose.Type.ObjectId,
Ref: Board
})

Anybody got any ideas?

Top comments (2)

Collapse
 
francismarcus profile image
francismarcus • Edited

Hey Ted,

Edit: seems like you found it
I would presume that in order to avoid mutating the array they store the reference inside the list.
Further reading: docs.mongodb.com/manual/tutorial/m...

If you would like to know more about data modelling in MongoDB you might find this link helpful: docs.mongodb.com/manual/core/data-...

Lycka till!

Collapse
 
larssonted profile image
Ted Larsson

well they are pretty open with their API and i've managed to find this: developer.atlassian.com/cloud/trel...
however they dont have the list object there nor user so i was wondering if someone here had more info