Skip to content

Add cache#11

Closed
NourAlPha wants to merge 47 commits intodevfrom
add-cache
Closed

Add cache#11
NourAlPha wants to merge 47 commits intodevfrom
add-cache

Conversation

@NourAlPha
Copy link
Copy Markdown
Contributor

Add Redis caching support and update Docker configuration for Redis service

NourAlPha and others added 20 commits April 27, 2025 14:05
Implement foundational authentication features, including user and role management, JWT-based authentication, and role-based security configurations. Add REST endpoints for login, signup, and logout, along with a Dockerized development setup, CI/CD workflows, and logging configurations.
Implement foundational authentication features, including user and role management, JWT-based authentication, and role-based security configurations. Add REST endpoints for login, signup, and logout, along with a Dockerized development setup, CI/CD workflows, and logging configurations.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oller.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…oller.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request integrates Redis caching support and updates the Docker configuration to include Redis along with related logging and CI/CD workflow improvements.

  • Added new repository interfaces and model entities related to user authentication and token management.
  • Updated Docker configuration to include Redis, Loki, Promtail, Grafana, and other related services.

Reviewed Changes

Copilot reviewed 29 out of 33 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/java/com/podzilla/auth/repository/RoleRepository.java Added RoleRepository interface for role lookups.
src/main/java/com/podzilla/auth/repository/RefreshTokenRepository.java Added RefreshTokenRepository for token management queries.
src/main/java/com/podzilla/auth/model/User.java Introduced the User entity with associations for roles and tokens.
src/main/java/com/podzilla/auth/model/Role.java Added Role entity with ERole enumeration support.
src/main/java/com/podzilla/auth/model/RefreshToken.java Added RefreshToken entity with auditing support.
src/main/java/com/podzilla/auth/model/ERole.java Defined user role constants as an enum.
src/main/java/com/podzilla/auth/dto/SignupRequest.java Created DTO for user sign-up.
src/main/java/com/podzilla/auth/dto/LoginRequest.java Created DTO for user login.
src/main/java/com/podzilla/auth/controller/* Introduced authentication, resource, and admin controllers.
src/main/java/com/podzilla/auth/AuthApplication.java Configures the application with caching enabled.
promtail-config.yml Configured Promtail for log collection.
docker-compose.yml Updated to add Redis and related service containers.
.github/workflows/* Added CI/CD and linter workflow configurations.
Files not reviewed (4)
  • .gitattributes: Language not supported
  • mvnw: Language not supported
  • mvnw.cmd: Language not supported
  • pom.xml: Language not supported
Comments suppressed due to low confidence (1)

src/main/java/com/podzilla/auth/model/RefreshToken.java:26

  • Ensure that JPA auditing is enabled (e.g., by adding @EnableJpaAuditing in your main configuration) to support the @CreatedDate annotation functionality.
@EntityListeners(AuditingEntityListener.class)

Comment thread docker-compose.yml Outdated
… User and RefreshToken; enhance logout functionality to expire refresh tokens
@NourAlPha NourAlPha requested a review from Copilot April 30, 2025 10:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds Redis caching support to the authentication service and updates the Docker configuration to include a dedicated Redis caching service.

  • Introduces new model, DTO, and exception classes for authentication workflows.
  • Implements Redis caching by enabling caching annotations in the main application and adding a Redis service in the Docker Compose file.
  • Updates CI/CD and linter GitHub workflows.

Reviewed Changes

Copilot reviewed 32 out of 36 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/java/com/podzilla/auth/model/RefreshToken.java New entity for refresh tokens supporting caching/auditing.
src/main/java/com/podzilla/auth/model/ERole.java Introduces user role enum.
src/main/java/com/podzilla/auth/exception/*.java New custom exceptions and a global exception handler.
src/main/java/com/podzilla/auth/dto/*.java DTOs for sign up and login endpoints.
src/main/java/com/podzilla/auth/controller/*.java REST controllers for authentication and admin operations.
src/main/java/com/podzilla/auth/AuthApplication.java Main application enabling caching.
promtail-config.yml Logging configuration for Promtail.
docker-compose.yml Adds/updates services: backend, Redis cache, DB, Loki, etc.
.github/workflows/linter.yml & ci-cd.yml GitHub workflows for linting and CI/CD.
Files not reviewed (4)
  • .gitattributes: Language not supported
  • mvnw: Language not supported
  • mvnw.cmd: Language not supported
  • pom.xml: Language not supported

Comment thread docker-compose.yml
…serDetails class, update login and registration logic, and configure Redis cache manager
…ervice

# Conflicts:
#	src/main/java/com/podzilla/auth/service/CustomUserDetailsService.java
…rs; update .gitignore to exclude logs and sensitive files
… User and RefreshToken; enhance logout functionality to expire refresh tokens
…serDetails class, update login and registration logic, and configure Redis cache manager
@NourAlPha NourAlPha self-assigned this May 2, 2025
@NourAlPha NourAlPha closed this May 2, 2025
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.

2 participants