Skip to content

add redis and postgress for DevelopMode#13

Merged
RafaelKC merged 5 commits intomainfrom
gu/docker
Oct 4, 2025
Merged

add redis and postgress for DevelopMode#13
RafaelKC merged 5 commits intomainfrom
gu/docker

Conversation

@Passossss
Copy link
Collaborator

dei merge da FIN-26 na minha gu/docker
por isso a quantidade de alterações no code
validar para seguir

@Passossss Passossss added the documentation Improvements or additions to documentation label Sep 24, 2025
Copy link

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 PR adds Docker Compose support for PostgreSQL and Redis in development mode, along with refactoring user credential creation and notification system enhancements.

  • Adds Docker infrastructure with PostgreSQL 16 and Redis 7 Alpine for development environments
  • Refactors UserCredential entity to use a factory pattern for better maintainability
  • Enhances notification system with severity levels, links, and improved WebSocket handling

Reviewed Changes

Copilot reviewed 35 out of 47 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docker-compose.yml Adds PostgreSQL and Redis containers for development
docker.md Documentation for Docker setup and usage
UserCredentialFactory.cs New factory pattern for creating user credentials
UserCredential.cs Refactored entity with public setters and removed constructors
NotificationDeliveryService.cs Enhanced notification handling with better error handling and Firebase improvements
UnitOfWork.cs Improved transaction management with proper disposal pattern
Files not reviewed (1)
  • Fin.Infrastructure/Migrations/20250922223535_adding_severity_link_on_notification.Designer.cs: Language not supported
Comments suppressed due to low confidence (1)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +79 to +80
| allowedWaysToSend.Contains(NotificationWay.Message)
| allowedWaysToSend.Contains(NotificationWay.Push)
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Using bitwise OR operator '|' instead of logical OR '||' for boolean conditions. This should use '||' for proper short-circuit evaluation.

Suggested change
| allowedWaysToSend.Contains(NotificationWay.Message)
| allowedWaysToSend.Contains(NotificationWay.Push)
|| allowedWaysToSend.Contains(NotificationWay.Message)
|| allowedWaysToSend.Contains(NotificationWay.Push)

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +18
public string EncryptedEmail { get; set; }
public string EncryptedPassword { get; set; }

public string GoogleId { get; set; }

public string ResetToken { get; set; } = "";
public int FailLoginAttempts { get; private set; }
public int FailLoginAttempts { get; set; }

public Guid UserId { get; private set; }
public Guid UserId { get; set; }
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Making security-sensitive properties like EncryptedEmail, EncryptedPassword, and UserId publicly settable reduces encapsulation and could lead to unintended modifications. Consider using private setters with factory methods or init-only setters.

Copilot uses AI. Check for mistakes.
Comment on lines +10 to +18
public string EncryptedEmail { get; set; }
public string EncryptedPassword { get; set; }

public string GoogleId { get; set; }

public string ResetToken { get; set; } = "";
public int FailLoginAttempts { get; private set; }
public int FailLoginAttempts { get; set; }

public Guid UserId { get; private set; }
public Guid UserId { get; set; }
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Making security-sensitive properties like EncryptedEmail, EncryptedPassword, and UserId publicly settable reduces encapsulation and could lead to unintended modifications. Consider using private setters with factory methods or init-only setters.

Copilot uses AI. Check for mistakes.
public int FailLoginAttempts { get; set; }

public Guid UserId { get; private set; }
public Guid UserId { get; set; }
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

Making security-sensitive properties like EncryptedEmail, EncryptedPassword, and UserId publicly settable reduces encapsulation and could lead to unintended modifications. Consider using private setters with factory methods or init-only setters.

Suggested change
public Guid UserId { get; set; }
public Guid UserId { get; private set; }

Copilot uses AI. Check for mistakes.
@RafaelKC RafaelKC mentioned this pull request Oct 4, 2025
Copy link
Collaborator

@RafaelKC RafaelKC left a comment

Choose a reason for hiding this comment

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

Aproved with reviewer changes.

@RafaelKC RafaelKC self-assigned this Oct 4, 2025
@RafaelKC RafaelKC merged commit 6c37cb0 into main Oct 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants