Skip to content

close #108 - generate rsa keys for JWT token#109

Open
Idodi-dev wants to merge 1 commit intoomatheusmesmo:developfrom
Idodi-dev:fix/issue108
Open

close #108 - generate rsa keys for JWT token#109
Idodi-dev wants to merge 1 commit intoomatheusmesmo:developfrom
Idodi-dev:fix/issue108

Conversation

@Idodi-dev
Copy link

@Idodi-dev Idodi-dev commented Mar 18, 2026

fix issue #108 - ability to generate local rsa keys and mount them into the docker container (including windows permission weirdness)

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced confirmation dialogs for critical actions (delete, remove).
    • Centralized notification system for success and error feedback with improved styling.
  • Bug Fixes

    • Improved error handling and messaging across the application.
    • Better error recovery in registration flows.
  • Documentation

    • Added RSA key-based JWT configuration guide for backend setup.
  • Chores

    • Security improvements: backend now runs as non-root user with proper certificate handling.
    • Refined component architecture with dependency injection updates.

@github-actions github-actions bot changed the base branch from main to develop March 18, 2026 04:00
@github-actions
Copy link
Contributor

🤖 Attention @Idodi-dev! Only the repository owner can target the 'main' branch directly. I've automatically updated your PR to target 'develop' instead. Thank you! 🚀

@coderabbitai
Copy link

coderabbitai bot commented Mar 18, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

The pull request introduces a comprehensive refactoring of Angular frontend dependency injection patterns, replacing constructor-based DI with the inject() API, and introduces centralized feedback and confirmation services to replace scattered MatSnackBar and native confirm() calls. Backend Docker configuration adds certificate support and non-root user execution.

Changes

Cohort / File(s) Summary
CI/CD & Workflow
.github/workflows/branch-enforcer.yml
Adds duplicate pull_request_target trigger and introduces duplicate error handling with sequential setFailed() calls in catch block.
Backend Infrastructure
backend/Dockerfile, backend/README.md
Dockerfile adds certificate directory creation, certificate copying, ownership changes, and non-root user execution. README documents RSA-based JWT setup with key generation steps.
New Shared Services
frontend/src/app/shared/services/feedback.service.ts, frontend/src/app/shared/services/confirm-dialog.service.ts, frontend/src/app/shared/components/confirm-dialog/*
Introduces FeedbackService wrapping MatSnackBar for success/error messaging and ConfirmDialogService providing dialog-based confirmations; adds ConfirmDialogComponent template and styles.
Management Components Refactor
frontend/src/app/list/components/categories-management/categories-management.component.ts, frontend/src/app/list/components/items-management/items-management.component.ts, frontend/src/app/list/components/units-management/units-management.component.ts, frontend/src/app/list/components/shopping-list/shopping-list.component.ts
Migrate from constructor to inject() API; replace MatSnackBar with FeedbackService; replace native confirm() with ConfirmDialogService for deletions.
Dialog Components Refactor
frontend/src/app/list/components/categories-management/category-dialog/category-dialog.component.ts, frontend/src/app/list/components/category-dialog/category-dialog.component.ts, frontend/src/app/list/components/items-management/item-dialog/item-dialog.component.ts, frontend/src/app/list/components/list-details/list-item-dialog/list-item-dialog.component.ts, frontend/src/app/list/components/list-share-dialog/list-share-dialog.component.ts, frontend/src/app/list/components/shopping-list/list-dialog/list-dialog.component.ts, frontend/src/app/list/components/units-management/unit-dialog/unit-dialog.component.ts
Migrate from constructor-based DI to inject(); replace signal-based state with direct property initialization; replace MatSnackBar with FeedbackService; refactor form initialization inline.
Shared UI Components Refactor
frontend/src/app/shared/components/category/category.component.ts, frontend/src/app/shared/components/item/item.component.ts, frontend/src/app/shared/components/list-item/list-item.component.ts, frontend/src/app/shared/components/unit/unit.component.ts, frontend/src/app/shared/components/unit/unit.component.html
Migrate from constructor to inject() API; replace MatSnackBar with FeedbackService; replace native confirm() with ConfirmDialogService; add Portuguese localization for messages; refactor form initialization.
Service Cleanup
frontend/src/app/shared/services/auth.service.ts, frontend/src/app/shared/services/category.service.ts, frontend/src/app/shared/services/list-permission.service.ts, frontend/src/app/shared/services/unit.service.ts
Remove redundant constructors and simplify error handling; remove console.error logging in auth service error handler.
Global Styling
frontend/src/styles.scss
Add .success-snackbar and .error-snackbar CSS classes with custom MDC snackbar color properties for feedback service integration.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • omatheusmesmo

Poem

🐰 A rabbit's ode to refactored code,
No snackbars scattered down the road,
With inject() fresh and dialogs clean,
The prettiest DI I've ever seen!
From constructor chains we now are free,
Hop along with FeedbackService! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'close #108 - generate rsa keys for JWT token' directly corresponds to the main objective of generating RSA keys for JWT token handling, which is reflected across multiple file changes including backend Dockerfile updates and frontend service refactoring.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can approve the review once all CodeRabbit's comments are resolved.

Enable the reviews.request_changes_workflow setting to automatically approve the review once all CodeRabbit's comments are resolved.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🤖🎉 Thank you for your contribution! Your pull request has been submitted successfully. A maintainer from the team will review it as soon as possible. We appreciate your support in making this project better!

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