Skip to content

Merge develop to main - #26

Closed
felipemelozx wants to merge 215 commits into
mainfrom
develop
Closed

felipemelozx wants to merge 215 commits into
mainfrom
develop

Conversation

@felipemelozx

Copy link
Copy Markdown
Owner

Updates from develop branch

felipemelozx and others added 30 commits November 18, 2025 10:04
initialize project structure with Spring Boot and PostgreSQL setup
- Added `JwtGateway` and `JwtGatewayImpl` for JWT token generation, validation, and extraction.
- Introduced `LoginUseCase` and `LoginUseCaseImpl` for handling user login requests.
- Updated `UserRepository` to correctly return `UserEntity` instead of `User`.
- Added `api.secret.key` property to application configuration.
- Introduced `SecurityConfig` for configuring Spring Security with stateless session management and endpoint authorization rules.
- Added `SecurityFilter` to validate and authenticate requests using JWT tokens.
- Added `login` and `refresh` endpoints in `AuthController` for handling authentication and token renewal.
- Introduced DTOs `LoginRequest`, `RefreshTokenRequest`, and `AuthTokens` for request/response models.
- Updated `BeansConfig` to include `LoginUseCase` bean initialization.
- Enhanced `UserGatewayImp` to map `UserEntity` to `User` in `findByEmail` method.
- Added `AuthRequest` for encapsulating login request data.
Implementation the User Registration and Login (JWT) #2
- Added `CorsConfig` to allow cross-origin requests from the frontend.
- Updated `SecurityConfig` to enable CORS and disable CSRF protection.
- Introduced `front.url` property in `application.properties` for dynamic origin configuration.
felipemelozx and others added 29 commits January 5, 2026 17:21
Add comprehensive unit tests for all metrics use cases:
- GetMetricsUseCaseImplTest: tests total books, average progress,
  pages remaining and estimated days to finish
- GetReadingSessionMetricsUseCaseImplTest: tests reading session
  statistics including total sessions, minutes and averages
- GetBooksByCategoryUseCaseImplTest: tests book count grouping by category
- GetReadingEvolutionUseCaseImplTest: tests reading evolution data
  for different time periods (30d, 3m, 6m, 12m)
All tests use Mockito for gateway mocking and verify correct behavior
including edge cases like empty data and null returns.
Total: 22 tests covering all metrics functionality
Add comprehensive table cleanup in @beforeeach to avoid foreign
key constraint issues. Clean all related tables in correct order:
1. notes (depends on books)
2. reading_sessions (depends on books)
3. books (depends on categories and users)
4. categories
This ensures test isolation and prevents data leakage between tests.
Add reading statistics and analytics system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant