Nested set behaviour Category with mongoDB

I want to creat a category with mongodb and nest set behaviour , has anybody made one , please help me on how to creat model , controller please