Skip to content

Refactor Routes and Models into Separate Files #200

@0vai5

Description

@0vai5

Description

I want to organize the codebase by separating the user-related routes (such as /login and /register) and the user model into different files. This will enhance the maintainability and clarity of the project structure.

Tasks:

  • Create a new file for the user model (e.g., UserModel.js) in the /models directory.
  • Create a new file for authentication routes (e.g., authRoutes.js) in the /routes directory.
  • Implement the corresponding user registration and login logic in a separate controller file (e.g., authController.js) in the /controllers directory.

Steps to Reproduce:

  • Review the existing code for user routes and models in the main application file.
  • Create the necessary files in the appropriate directories.
  • Move the existing code to the new files while ensuring that everything functions correctly.
  • Expected Behavior: The application should work seamlessly after restructuring, with routes and models organized in separate files.

Actual Behavior:

Currently, routes and models are mixed within the main application file, making the codebase cluttered and harder to manage.

Please assign it to me.
label it as gssoc-ext and level-2

@Kritika30032002

Screenshots

No response

Checklist

  • I have starred the repository
  • I have checked the existing issues
  • I have read the discussion tab thoroughly and got the project idea
  • I am willing to work on this issue (optional)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions