I'm working on a NestJS REST API that will maintain a study platform.
I initially have three modules: a user module, an authentication module, and a career module.
The authentication module handles the following use cases: Register user, login user, and logout user.
The user module handles the following use cases: Create user, retrieve all users, retrieve a user by ID.
In the Career module, I handle the following use cases: Create a career, retrieve all careers, and retrieve a user's careers.
I'm experiencing a circular dependency problem in my modules. When creating a user in the user module, it receives the user data and a career ID, which it must obtain from the career module. When retrieving a user's careers in the career module, it receives a user ID, which it must obtain from the user module.
I don't know how to approach, manage, and resolve this circular dependency problem.