Anton Kosykh
Jul 26, 2017 · 1 min read

A few thoughts about that

I think it will be better if you just set roles array and put available role names into that. It’s easier to check. Router example

And checking access in beforeEach

P.S. I also hate unnecessary nesting

And about folder structure. I use that

I have two different apps for admin and client here and common folder for common components/store modules/etc. You also can add a single entry point for that, just put your App.vue and main.js into the root folder.

But I think that client shouldn’t know what’s going in admin, and we just created two different apps.

Written by

YOLO JavaScript developer | Currently CTO at FrameNinja

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade