Hacker News new | ask | show | jobs
by fredwu 3670 days ago
Awesome effort! I love the folder structure, very easy to follow.

A small feedback: I just generated a React-based stack with a few Auth options - Email, Facebook, Google and Twitter.

The resulting `user.js` controller is 550 LoC.

It would be great if by default some of these logic are encapsulated in a service layer rather than littered in the controller itself. :)

1 comments

Thanks for the feedback! Agreed, it makes sense to refactor those routes into its own Auth controller. I will open a GitHub issue. However, some of the code is intentionally written that way to keep things stupid simple and easy to understand for developers of all skill levels, which you would normally encapsulate into a service in your own app.
You can call it "refactor-ready." ;)