Sometime ago I was trying to come up with a scalable folder structure for my Vue app and I had to solve a problem with loading routes from different route files in different directories.

Normally we will define all our routes in a single route file like this:

const routes = [
{ path: '/foo', component: Foo },
{ path: '/bar', component: Bar },
// and so on...
]

This may be fine for small projects but when the project grows, our route file will continue to grow…


We all know that developing a solid API from scratch is time consuming so if you are agreeing with me, read on.

Every time you are going to build a decent API even while using a good framework like Laravel as your starting point you need to prepare and implement many features like:

  • A solid architecture
  • API versioning
  • Authentication
  • Administrative features like RBAC (Role based access control)
  • Documentation generator
  • Localization
  • Data caching
  • And the list just goes on…

And after you did all of that then you have just reached a point where you are able to begin writing your first real business logics. …

Mohammad Alavi

Full stack web developer — Looking for remote job opportunities

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store