Model Tree Structures with an Array of Ancestors with MeteorJS

Hi everyone. I am creating an e-commerce site for my education task. I am using model tree structures with an array of ancestors. I created an constructor for it.


AncestorSchema = new SimpleSchema({
  categoryId: SimpleSchema.RegEx.Id,
});

CategorySchema = new SimpleSchema({
  name: String,
  parentCategory: {
    type: SimpleSchema.RegEx.Id,
    defaultValue: null,
  },
  ancestors: Array,
  "ancestors.$": AncestorSchema,
});

My question is what is the best way to manage route operations.
I am using ostrio:flow-router-extra package.

Thanks.

What do you use for your front-end? Blaze?

Yes. I use blaze for front-end.