Skip to content

Enforce Proper MVC Architecture in Backend πŸš€Β #312

@SandipGyawali

Description

@SandipGyawali

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions