The current get_current_user dependency in app/dependencies is tightly coupled with database queries. This violates separation of concerns.
Move all daatbas eoperations into a new class named DatabaseOps. This will keep the codebase clean and will enable each file to have one single responsibility,. Using the service-repository pattern.
Replace FastAPI HTTP constants with a Global Exception Handler.
Make sure authentication flows to be injectable via dependencies.
The current get_current_user dependency in app/dependencies is tightly coupled with database queries. This violates separation of concerns.
Move all daatbas eoperations into a new class named DatabaseOps. This will keep the codebase clean and will enable each file to have one single responsibility,. Using the service-repository pattern.
Replace FastAPI HTTP constants with a Global Exception Handler.
Make sure authentication flows to be injectable via dependencies.