Hey @syabro please check out this open issue and leave a comment I think that is what you are looking for. This way we can make this a priority. I think it has been in the backlog for quite a while. Currently, I don’t think it is possible to generate components into whatever path you. Although you could generate them and move them into whatever feature folder you want. I believe you can specify a path with the scaffolds though.
I don’t feel like there’s really any limitation to this in Redwood… but to think of it, your router might end up being quite the stuff :-\.
At SportOffice we’ve transitioned from an exclusive service based API to a src/lib/domain/model/verb+subject structure, which promotes pure function style a lot and scales very well. We didn’t do this early on but it proves easier to migrate there than it might look. But that’s for API side, web side, which sounds like your interest here, is another story, a topic that’s also discussed within the Contributors group.
Anyway, great point @syabro and welcome to our community \o/
@noire.munich linked to a thread in a previous post that’s locked, so not everyone can access it.
I’m lifting my two latest posts from that thread
Someone came on to Discord a while ago as a new RW user and provided some initial feedback. Getting fresh users’ perspective on things is good. Sometimes we get used to what we already have and don’t see what we could have.
Here’s his feedback that’s relevant to what we’re discussing in this thread
I think the code organization was a bit jarring to me initially.
the naming structure and organization seemed a bit off. I would love to just encapsulate all of those components into the same folder. Something like,
Let’s say you want a “Books” page. So you run yarn rw g page Books . Now, what if there was an option to specify --page Books when generating cells and components that would make those end up inside the src/pages/BooksPage/ folder? For the cell generator maybe we could even make it default to that if you have a page with the same name as the cell. So if you run yarn rw g cell Books and you already have a BooksPage then that cell will be generated in there by default.
TBH I’m actually kind of proud of myself for that last post I think the idea still holds up.