DEV Community

Ted Larsson
Ted Larsson

Posted on

1

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

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay