daccotta-org / daccotta

A social network for movies.
https://app.daccotta.com
MIT License
84 stars 42 forks source link

Enforce Proper MVC Architecture in Backend 🚀 #312

Open SandipGyawali opened 1 week ago

SandipGyawali commented 1 week ago

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.

github-actions[bot] commented 1 week ago

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

SandipGyawali commented 1 week ago

@AshuKr22 can you review this issue ??

AshuKr22 commented 1 week ago

go ahead @SandipGyawali