feat(transactions): complete module with CRUD operations and budget calculations & fix auth validation#8
Open
feat(transactions): complete module with CRUD operations and budget calculations & fix auth validation#8
Conversation
…ojects in build.gradle.kts
…te range, and all transactions
…expenses, and balance
…mount calculations
…fy deleteTransaction method
… domain objects directly
…w request models and improved endpoint structure
…d Transaction entities
…proved query structure and new request models
…ns and refactor repository methods
… category services with test configurations
…nullable spentAmount and improved query logic
…ices with spending calculations and token validation
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.
Summary
This PR establishes the core foundation of the transactions module by introducing full CRUD capabilities, essential database entities, and architectural refactoring. Additionally, it resolves a critical validation issue in the authentication flow to ensure secure access.
Key Changes:
Auth Security Fix: Updated AuthService to validate passwords using passwordEncoder.matches() and throw InvalidCredentialsException for incorrect credentials.
Module Refactoring: Renamed the categories package to transactions to align with the new system architecture.
Database Setup: Created Transaction entity, TransactionType enum, and TransactionRepository with required custom queries.
Transactions & Categories CRUD APIs: - Implemented full CRUD operations (POST, GET, PATCH, DELETE) matching the project's @AuthenticationPrincipal security standard.
Added Request/Response DTOs with strict validation for creating and updating records.
Created clean data Mappers using Kotlin extension functions.
Implemented @Transactional- service logic for secure batch saving, updating, and soft-deleting of entries.
Integrated budget calculation logic seamlessly with the retrieval APIs.