Refactor backend services to reduce technical debt#151
Open
google-labs-jules[bot] wants to merge 15 commits intomainfrom
Open
Refactor backend services to reduce technical debt#151google-labs-jules[bot] wants to merge 15 commits intomainfrom
google-labs-jules[bot] wants to merge 15 commits intomainfrom
Conversation
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services.
for more information, see https://pre-commit.ci
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies.
for more information, see https://pre-commit.ci
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies.
for more information, see https://pre-commit.ci
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies.
for more information, see https://pre-commit.ci
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies. - Fixed an `ImportError` in `app/auth/__init__.py`.
for more information, see https://pre-commit.ci
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies. - Fixed an `ImportError` in `app/auth/__init__.py`.
for more information, see https://pre-commit.ci
This commit addresses several areas of technical debt in the backend: - Separated development and production dependencies into `requirements.txt` and `requirements-dev.txt`. - Refactored the configuration in `app/config.py` to improve security and clarity. - Simplified the CORS configuration in `main.py`. - Introduced a `BaseService` class to handle common CRUD operations and reduce code duplication. - Refactored `UserService`, `ExpenseService`, `GroupService`, and `AuthService` to use the `BaseService` and dependency injection. - Updated all API routers to use dependency injection for the services. - Updated the CI workflow to install development dependencies. - Fixed an `ImportError` in `app/auth/__init__.py`. - Fixed a patch in `tests/conftest.py`.
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses several areas of technical debt in the backend, making the codebase more maintainable, scalable, and secure. The key changes include:
requirements-dev.txtandrequirements.txtrespectively.BaseServicehas been introduced to abstract common database operations. All services (UserService,ExpenseService,GroupService,AuthService) have been refactored to use this base service and FastAPI's dependency injection, removing singleton patterns and direct database access.These changes improve the overall architecture of the backend, reduce code duplication, and make the application easier to test and maintain.