Proposal: Controller Generation in Sequelize
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- express, javascript, node.js
Research direction
Start by locating the existing sequelize generate:model command and its templates. Compare the proposed -c option with the current generator behavior, then determine the framework templates, configuration options, and CRUD scope required. Done means an agreed design and implementation plan for controller generation, since this issue is currently seeking preliminary discussion.
Written by the indexing model from the issue text.
Description
Proposal: Controller Generation in Sequelize
Inspired by the Rails framework, I'm considering introducing a feature in Sequelize that would allow users to generate controllers alongside models, streamlining the development process for many.
Command and Output:
The envisioned command would be:
sequelize generate:model User -c koa
If the -c flag is followed by koa, Sequelize would generate a Koa-compatible controller. Similarly, specifying other frameworks like express or fastify would generate controllers tailored for them.
Implementation Plan:
-
Templating:
- Create templates for popular Node.js web frameworks (e.g., Express, Koa, Fastify).
- Allow users to specify their framework of choice during generation.
-
Configuration Options:
- Offer customization options for the generated controllers.
-
Basic CRUD Logic:
- Include essential CRUD operations in the generated controllers.
Seeking Preliminary Discussion:
Before diving into the development, I wanted to discuss this with you to gauge its feasibility and alignment with Sequelize's vision. I'm fully prepared to develop this PR, but I believe a preliminary discussion would be invaluable.
Your insights and feedback would be greatly appreciated. If this proposal aligns with Sequelize's direction, I'm eager to start working on it and contribute to the project.
Thank you for your time and consideration.
### Tasks
- Dominant language
- JavaScript
- Stars
- 2.6k
- Forks
- 524
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sequelize/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
curation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#186 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9852 ·
-
bug p1 tools
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 84/100