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

Enforce Proper MVC Architecture in Backend 🚀 #312

Open
SandipGyawali opened this issue Nov 8, 2024 · 3 comments
Open

Enforce Proper MVC Architecture in Backend 🚀 #312

SandipGyawali opened this issue Nov 8, 2024 · 3 comments
Assignees
Labels

Comments

@SandipGyawali
Copy link
Contributor

SandipGyawali commented Nov 8, 2024

The backend architecture currently violates the MVC (Model-View-Controller) pattern by including logic within route files. To enhance code clarity and maintainability, refactor the codebase to strictly adhere to MVC principles:

Remove Logic from Routes: Ensure routes only handle request routing, with all logic moved to controllers or services.
Standardize Naming Conventions: Use professional, consistent naming across all components.
Example: In the provided image, logic is embedded in routes, breaking the MVC pattern. Refactor to ensure a clean separation of responsibilities.
Also update the eslint and pretter if not working.

Example;

image

Here's the small reference you can check
https://github.com/pradipchaudhary/node-mvc-boilerplate

Note: In above picture the logic is implemented violating the mvc patter fix all the issues that violates this format in the backend part.

Copy link

github-actions bot commented Nov 8, 2024

👋 Thank you @SandipGyawali for raising an issue! We appreciate your effort in helping us improve. Our team will review it shortly. Stay tuned!

@SandipGyawali
Copy link
Contributor Author

@AshuKr22 can you review this issue ??

@AshuKr22
Copy link
Contributor

AshuKr22 commented Nov 9, 2024

go ahead @SandipGyawali

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants