davellanedam / node-express-mongodb-jwt-rest-api-skeleton

This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
MIT License
899 stars 286 forks source link

Auto-generated "model" and "controller" #220

Closed exetico closed 3 years ago

exetico commented 3 years ago

Is your feature request related to a problem? Please describe. It's not a problem. I just though about an idéa for the repo, which could improve the skeleton even more.

Describe the solution you'd like Most of the people using your skeleton, will (mostly) start by replacing "City/Cities", or clone it manually, to create a new model and controller for "Vegetabels", or... anything else.

A solution to create a new model including controller for new item(s), would be great to see.

I'm not sure if there's 3rd-party tools, which could be integrated, to do that kind of magic?

Simple example: "Vegetabels" are needed in the new project, and therefore I'll run through the structure, and secure that every model and controller are cloned, renamed and alligned, so it's now "Vegetabels", instead of "City/Cities".

Hereafter, I need to do the same thing in the Vue Front-End, to secure the proper handling.

If it should be done with a simple command, the workflow will be way faster, for adding the needed data-structure/handlers.

Additional context I think it will require long time, to do a thing like this. But now I've suggested it. If there's a good way to do it today, maybe by using 3rd-party libs, that's awesome! I'm just not sure, where to start. And oh, if there is any, maybe it could be added to the documentation, too.

Thanks for awesome skeletons, for both frontend and backend.

davellanedam commented 3 years ago

This will require a CLI, honestly I don't see this coming. Thanks for the suggestion anyway :)