Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: qse add <args> command #47

Open
IAmRiteshKoushik opened this issue Nov 17, 2024 · 4 comments
Open

Suggestion: qse add <args> command #47

IAmRiteshKoushik opened this issue Nov 17, 2024 · 4 comments
Assignees
Labels
AMWOC feature Planned feature of software.

Comments

@IAmRiteshKoushik
Copy link

IAmRiteshKoushik commented Nov 17, 2024

Proposal

A user may start with a particular template but then feel like extending it. A basic express template can be extended with a Postgres, MySQL or Redis as an add-on. In such a scenario, it would be helpful to have the add function which can bring forth some boiler-plate and associated folder-structure to the repository.

Potential set of add-ons:

  1. SQL Databases
  2. NoSQL Databases
  3. Socket.io (or) ws
  4. Redis
  5. ORMs
  6. Kafka

@Ashrockzzz2003 @Abhinav-ark

@IAmRiteshKoushik IAmRiteshKoushik changed the title Suggestion: qse add <args> Suggestion: qse add <args> command Nov 17, 2024
@Ashrockzzz2003
Copy link
Member

Sounds interesting!

@GMHarish285
Copy link
Contributor

@Ashrockzzz2003
Can I take this up?

@Ashrockzzz2003
Copy link
Member

Yes
but we need to have a clear idea on how the experience is gonna be for the user.
Come up with a flow. Once we finalize that, we'll move to implementing it

@GMHarish285
Copy link
Contributor

GMHarish285 commented Jan 28, 2025

@Ashrockzzz2003

First, I will rename variable and file names will be updated to follow a consistent naming convention.

When user enters command qse add <template1> <template2> ...,

  • .env, package.json, appConfig.js, initLog.js, index.js will be automatically updated. Conflicting variable names will be resolved by appending its template name before the variables.

  • Folders with same name are moved into sub-folders with template name appended to their name. These are put under a folder with the original name. eg. mysql: router/sampleRouter.js and mongo: router/sampleRouter.js become router/router_mysql/sampleRouter.js and router/router_mongo/sampleRouter.js.

  • Imports will be fixed based on the new file layout.

  • index.js and initLog.js will be combined with their content arranged to make sense logically.

  • Conflicting routes will be fixed by prefixing the routes with the template name in index.js

  • List of all changes will be shown to the user after completion.

I am not sure we need any user interaction at all.
Maybe we can provide an option to install/not install the new template's dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AMWOC feature Planned feature of software.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants