# nahdaicue/portfolio-spring_boot architecture

> Architecture diagram of the GitHub repository nahdaicue/portfolio-spring_boot, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nahdaicue/portfolio-spring_boot
- Repository: https://github.com/nahdaicue/portfolio-spring_boot

## Overview

1. **Overall shape**
   - This is a **Spring Boot backend** organized as a layered monolith.
   - The main runtime entry point is `PortfolioApplication`, with configuration in `src/main/resources/application.properties`.

2. **HTTP/API layer**
   - Incoming requests are handled by five controllers:
     - `AuthController`
     - `UserController`
     - `ProfileController`
     - `ProjectController`
     - `PortfolioController`
   - These controllers are the boundary between external clients and the application’s internal service layer.

3. **Service layer**
   - Business logic is split into domain-focused services:
     - `AuthService` for authentication and registration flow
     - `UserService`
     - `ProfileService`
     - `ProjectService`
     - `PortfolioService`
   - Each has an interface plus `Impl` implementation, which makes the domain boundary explicit and keeps controllers thin.

4. **Persistence layer**
   - Data access is handled by Spring Data repositories:
     - `UserRepository`
     - `ProfileRepository`
     - `ProjectRepository`
   - These repositories likely persist to a relational database through JPA, with entities mapped in `entitys/`.

5. **Domain model**
   - The core persistent entities are:
     - `User`
     - `Role`
     - `Profile`
     - `Project`
   - `User` and `Role` indicate authorization is role-based, while `Profile` and `Project` model portfolio content.

6. **DTO boundary**
   - The API does not appear to expose entities directly; it uses DTOs in separate packages:
     - user DTOs for create/update/password change/read
     - profile DTOs for create/update/read
     - project DTOs
     - portfolio DTOs
   - This suggests a deliberate separation between external request/response shapes and internal persistence models.

7. **Mapping layer**
   - Mapper classes (`UserMapper`, `ProfileMapper`, `ProjectMapper`) convert between DTOs and entities.
   - This gives a clean boundary: controllers deal in DTOs, services work with domain objects, and mapping is centralized instead of duplicated.

8. **Security subsystem**
   - Security is a distinct subsystem under `security/`:
     - `SecurityConfig` defines the security policy
     - `JwtAuthenticationFilter` intercepts requests
     - `JwtService` handles token creation/validation
     - `ApplicationConfig` and `CorsConfig` provide supporting security configuration
   - The presence of JWT classes indicates stateless authentication rather than server sessions.

9. **Authentication flow**
   - `AuthController` works with `LoginRequest`, `RegisterRequest`, and `AuthResponse`.
   - The request path is likely: client submits credentials → `AuthService` validates/creates user → `JwtService` generates token → token is returned and then used on subsequent requests through the filter.

10. **Cross-cutting request flow**
   - Typical flow through the application is:
     - external client → controller → service → repository → database
     - and back through mapper/DTO conversion to the API response
   - Security runs alongside this flow, enforcing authentication before protected controllers/services are reached.

11. **Configuration and environment**
   - `application.properties` is the main externalized configuration point for things like server settings, datasource, and security-related properties.
   - The repository includes Maven wrapper files, so the project is built with **Maven** and is portable across environments.

12. **Testing**
   - There is a basic Spring Boot test entry point at `PortfolioApplicationTests`.
   - That suggests the test suite currently includes at least application-context startup validation, with room for additional unit or integration tests.

13. **Architecture boundaries to draw**
   - If you are diagramming it, the clearest boundaries are:
     - **Client/API boundary**: controllers + auth endpoints
     - **Application/business boundary**: service interfaces/implementations
     - **Data boundary**: repositories + entities
     - **Security boundary**: JWT filter/config/service around all protected requests
     - **Transformation boundary**: DTOs and mappers separating API models from persistence models

Main entry points: [`src/main/java/com/nahuelcuello/portfolio/security/service/AuthService.java`](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/service/AuthService.java) (AuthService), [`src/main/java/com/nahuelcuello/portfolio/services/userService/UserService.java`](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/userService/UserService.java) (UserService), [`src/main/java/com/nahuelcuello/portfolio/services/profileService/ProfileService.java`](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/profileService/ProfileService.java) (ProfileService), [`src/main/java/com/nahuelcuello/portfolio/services/projectService/ProjectService.java`](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/projectService/ProjectService.java) (ProjectService)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API layer"]
  node_auth_controller["AuthController<br/>REST controller"]
  node_user_controller["UserController<br/>REST controller"]
  node_profile_controller["ProfileController<br/>REST controller"]
  node_project_controller["ProjectController<br/>REST controller"]
  node_portfolio_controller["PortfolioController<br/>REST controller"]
  node_user_dto["UserDTOs<br/>DTO set"]
  node_profile_dto["ProfileDTOs<br/>DTO set"]
  node_project_dto["ProjectDTO<br/>[ProjectDTO.java]"]
  node_portfolio_dto["PortfolioDTO<br/>[PortfolioDTO.java]"]
  node_auth_requests["Auth payloads<br/>auth DTOs"]
end

subgraph group_app["Application layer"]
  node_user_service["UserService<br/>domain service<br/>[UserService.java]"]
  node_profile_service["ProfileService<br/>domain service"]
  node_project_service["ProjectService<br/>domain service"]
  node_portfolio_service["PortfolioService<br/>domain service"]
  node_user_mapper{{"UserMapper<br/>[UserMapper.java]"}}
  node_profile_mapper{{"ProfileMapper<br/>[ProfileMapper.java]"}}
  node_project_mapper{{"ProjectMapper<br/>[ProjectMapper.java]"}}
end

subgraph group_data["Data layer"]
  node_user_repository[("UserRepository<br/>JPA repository")]
  node_profile_repository[("ProfileRepository<br/>JPA repository")]
  node_project_repository[("ProjectRepository<br/>JPA repository")]
  node_user_entity["User<br/>entity<br/>[User.java]"]
  node_role_entity["Role<br/>entity<br/>[Role.java]"]
  node_profile_entity["Profile<br/>entity<br/>[Profile.java]"]
  node_project_entity["Project<br/>entity<br/>[Project.java]"]
end

subgraph group_security["Security"]
  node_auth_service["AuthService<br/>auth service<br/>[AuthService.java]"]
  node_jwt_service["JwtService<br/>token service<br/>[JwtService.java]"]
  node_jwt_filter["JwtFilter<br/>security filter"]
  node_security_config["SecurityConfig<br/>security config"]
end

subgraph group_support["Support"]
  node_portfolio_application(("PortfolioApp<br/>Spring Boot entrypoint"))
  node_app_config["App config<br/>configuration"]
  node_application_properties["application.properties<br/>runtime config"]
end

node_portfolio_application -->|"loads"| node_security_config
node_portfolio_application -->|"loads"| node_app_config
node_auth_controller -->|"uses"| node_auth_service
node_auth_controller -->|"accepts/returns"| node_auth_requests
node_user_controller -->|"uses"| node_user_service
node_user_controller -->|"accepts/returns"| node_user_dto
node_profile_controller -->|"uses"| node_profile_service
node_profile_controller -->|"accepts/returns"| node_profile_dto
node_project_controller -->|"uses"| node_project_service
node_project_controller -->|"returns"| node_project_dto
node_portfolio_controller -->|"uses"| node_portfolio_service
node_portfolio_controller -->|"returns"| node_portfolio_dto
node_auth_service -->|"issues tokens"| node_jwt_service
node_jwt_filter -->|"validates"| node_jwt_service
node_security_config -->|"registers"| node_jwt_filter
node_user_service -->|"persists"| node_user_repository
node_profile_service -->|"persists"| node_profile_repository
node_project_service -->|"persists"| node_project_repository
node_user_service -->|"maps"| node_user_mapper
node_profile_service -->|"maps"| node_profile_mapper
node_project_service -->|"maps"| node_project_mapper
node_user_mapper -->|"targets"| node_user_entity
node_user_mapper -->|"targets"| node_user_dto
node_profile_mapper -->|"targets"| node_profile_entity
node_profile_mapper -->|"targets"| node_profile_dto
node_project_mapper -->|"targets"| node_project_entity
node_project_mapper -->|"targets"| node_project_dto
node_user_entity -->|"relates to"| node_role_entity
node_auth_service -->|"creates users"| node_user_repository
node_auth_service -->|"authenticates"| node_user_entity
node_application_properties -.->|"supports"| node_security_config
node_application_properties -.->|"supports"| node_app_config

click node_portfolio_application "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/PortfolioApplication.java"
click node_auth_controller "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/AuthController.java"
click node_user_controller "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/UserController.java"
click node_profile_controller "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/ProfileController.java"
click node_project_controller "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/ProjectController.java"
click node_portfolio_controller "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/PortfolioController.java"
click node_auth_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/service/AuthService.java"
click node_jwt_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/service/JwtService.java"
click node_jwt_filter "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/jwt/JwtAuthenticationFilter.java"
click node_security_config "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/SecurityConfig.java"
click node_user_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/userService/UserService.java"
click node_profile_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/profileService/ProfileService.java"
click node_project_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/projectService/ProjectService.java"
click node_portfolio_service "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/portfolioService/PortfolioService.java"
click node_user_repository "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/UserRepository.java"
click node_profile_repository "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/ProfileRepository.java"
click node_project_repository "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/ProjectRepository.java"
click node_user_entity "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/User.java"
click node_role_entity "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Role.java"
click node_profile_entity "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Profile.java"
click node_project_entity "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Project.java"
click node_user_mapper "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/UserMapper.java"
click node_profile_mapper "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/ProfileMapper.java"
click node_project_mapper "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/ProjectMapper.java"
click node_user_dto "https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/DTO/userDTO"
click node_profile_dto "https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/DTO/profileDTO"
click node_project_dto "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/DTO/projectDTO/ProjectDTO.java"
click node_portfolio_dto "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/DTO/portfolioDTO/PortfolioDTO.java"
click node_auth_requests "https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/security/auth"
click node_app_config "https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/security/config"
click node_application_properties "https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/resources/application.properties"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_auth_controller,node_user_controller,node_profile_controller,node_project_controller,node_portfolio_controller,node_user_dto,node_profile_dto,node_project_dto,node_portfolio_dto,node_auth_requests toneBlue
class node_user_service,node_profile_service,node_project_service,node_portfolio_service,node_user_mapper,node_profile_mapper,node_project_mapper toneAmber
class node_user_repository,node_profile_repository,node_project_repository,node_user_entity,node_role_entity,node_profile_entity,node_project_entity toneMint
class node_auth_service,node_jwt_service,node_jwt_filter,node_security_config toneRose
class node_portfolio_application,node_app_config,node_application_properties toneIndigo
```

## Components

### API layer

HTTP entrypoints and request/response contracts

- [AuthController](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/AuthController.java): REST controller · Authentication and registration endpoints · `src/main/java/com/nahuelcuello/portfolio/controller/AuthController.java`
- [UserController](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/UserController.java): REST controller · User management endpoints · `src/main/java/com/nahuelcuello/portfolio/controller/UserController.java`
- [ProfileController](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/ProfileController.java): REST controller · Profile endpoints · `src/main/java/com/nahuelcuello/portfolio/controller/ProfileController.java`
- [ProjectController](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/ProjectController.java): REST controller · Project endpoints · `src/main/java/com/nahuelcuello/portfolio/controller/ProjectController.java`
- [PortfolioController](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/controller/PortfolioController.java): REST controller · Portfolio summary endpoints · `src/main/java/com/nahuelcuello/portfolio/controller/PortfolioController.java`
- [UserDTOs](https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/DTO/userDTO): DTO set · Create, update, password, and read shapes · `src/main/java/com/nahuelcuello/portfolio/DTO/userDTO`
- [ProfileDTOs](https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/DTO/profileDTO): DTO set · Create, update, and read shapes · `src/main/java/com/nahuelcuello/portfolio/DTO/profileDTO`
- [ProjectDTO](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/DTO/projectDTO/ProjectDTO.java): DTO · Project response shape · `src/main/java/com/nahuelcuello/portfolio/DTO/projectDTO/ProjectDTO.java`
- [PortfolioDTO](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/DTO/portfolioDTO/PortfolioDTO.java): DTO · Portfolio response shape · `src/main/java/com/nahuelcuello/portfolio/DTO/portfolioDTO/PortfolioDTO.java`
- [Auth payloads](https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/security/auth): auth DTOs · Login, register, and auth response shapes · `src/main/java/com/nahuelcuello/portfolio/security/auth`

### Application layer

Business services and orchestration

- [UserService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/userService/UserService.java): domain service · User use cases · `src/main/java/com/nahuelcuello/portfolio/services/userService/UserService.java`
- [ProfileService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/profileService/ProfileService.java): domain service · Profile use cases · `src/main/java/com/nahuelcuello/portfolio/services/profileService/ProfileService.java`
- [ProjectService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/projectService/ProjectService.java): domain service · Project use cases · `src/main/java/com/nahuelcuello/portfolio/services/projectService/ProjectService.java`
- [PortfolioService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/services/portfolioService/PortfolioService.java): domain service · Portfolio composition use cases · `src/main/java/com/nahuelcuello/portfolio/services/portfolioService/PortfolioService.java`
- [UserMapper](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/UserMapper.java): mapper · Maps user DTOs and entities · `src/main/java/com/nahuelcuello/portfolio/mapper/UserMapper.java`
- [ProfileMapper](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/ProfileMapper.java): mapper · Maps profile DTOs and entities · `src/main/java/com/nahuelcuello/portfolio/mapper/ProfileMapper.java`
- [ProjectMapper](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/mapper/ProjectMapper.java): mapper · Maps project DTOs and entities · `src/main/java/com/nahuelcuello/portfolio/mapper/ProjectMapper.java`

### Data layer

Persistence and domain entities

- [UserRepository](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/UserRepository.java): JPA repository · Persists users · `src/main/java/com/nahuelcuello/portfolio/repository/UserRepository.java`
- [ProfileRepository](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/ProfileRepository.java): JPA repository · Persists profiles · `src/main/java/com/nahuelcuello/portfolio/repository/ProfileRepository.java`
- [ProjectRepository](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/repository/ProjectRepository.java): JPA repository · Persists projects · `src/main/java/com/nahuelcuello/portfolio/repository/ProjectRepository.java`
- [User](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/User.java): entity · Account and identity model · `src/main/java/com/nahuelcuello/portfolio/entitys/User.java`
- [Role](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Role.java): entity · Authorization role model · `src/main/java/com/nahuelcuello/portfolio/entitys/Role.java`
- [Profile](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Profile.java): entity · Public profile model · `src/main/java/com/nahuelcuello/portfolio/entitys/Profile.java`
- [Project](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/entitys/Project.java): entity · Portfolio project model · `src/main/java/com/nahuelcuello/portfolio/entitys/Project.java`

### Security

JWT authentication and request protection

- [AuthService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/service/AuthService.java): auth service · Validates login and registration · `src/main/java/com/nahuelcuello/portfolio/security/service/AuthService.java`
- [JwtService](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/service/JwtService.java): token service · Creates and validates JWTs · `src/main/java/com/nahuelcuello/portfolio/security/service/JwtService.java`
- [JwtFilter](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/jwt/JwtAuthenticationFilter.java): security filter · Protects requests using JWT auth · `src/main/java/com/nahuelcuello/portfolio/security/jwt/JwtAuthenticationFilter.java`
- [SecurityConfig](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/security/SecurityConfig.java): security config · Defines access policy and filter chain · `src/main/java/com/nahuelcuello/portfolio/security/SecurityConfig.java`

### Support

Configuration, bootstrapping, and shared infrastructure

- [PortfolioApp](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/java/com/nahuelcuello/portfolio/PortfolioApplication.java): Spring Boot entrypoint · Main application bootstrap · `src/main/java/com/nahuelcuello/portfolio/PortfolioApplication.java`
- [App config](https://github.com/nahdaicue/portfolio-spring_boot/tree/main/src/main/java/com/nahuelcuello/portfolio/security/config): configuration · Application and CORS support config · `src/main/java/com/nahuelcuello/portfolio/security/config`
- [application.properties](https://github.com/nahdaicue/portfolio-spring_boot/blob/main/src/main/resources/application.properties): runtime config · Externalized Spring configuration · `src/main/resources/application.properties`

## Connections

- PortfolioApp → SecurityConfig: loads · Bootstraps the security setup
- PortfolioApp → App config: loads · Starts application with supporting config
- AuthController → AuthService: uses · Delegates authentication flow
- AuthController → Auth payloads: accepts/returns · Uses login, register, and auth response payloads
- UserController → UserService: uses · Delegates user operations
- UserController → UserDTOs: accepts/returns · Uses user request and response DTOs
- ProfileController → ProfileService: uses · Delegates profile operations
- ProfileController → ProfileDTOs: accepts/returns · Uses profile request and response DTOs
- ProjectController → ProjectService: uses · Delegates project operations
- ProjectController → ProjectDTO: returns · Uses project response DTOs
- PortfolioController → PortfolioService: uses · Builds portfolio views
- PortfolioController → PortfolioDTO: returns · Uses portfolio response DTOs
- AuthService → JwtService: issues tokens · Creates JWTs after auth succeeds
- JwtFilter → JwtService: validates · Parses and validates bearer tokens
- SecurityConfig → JwtFilter: registers · Adds JWT filter to the security chain
- UserService → UserRepository: persists · Reads and writes users
- ProfileService → ProfileRepository: persists · Reads and writes profiles
- ProjectService → ProjectRepository: persists · Reads and writes projects
- UserService → UserMapper: maps · Converts between user DTOs and entity
- ProfileService → ProfileMapper: maps · Converts between profile DTOs and entity
- ProjectService → ProjectMapper: maps · Converts between project DTOs and entity
- UserMapper → User: targets · Maps into user domain objects
- UserMapper → UserDTOs: targets · Maps into user API shapes
- ProfileMapper → Profile: targets · Maps into profile domain objects
- ProfileMapper → ProfileDTOs: targets · Maps into profile API shapes
- ProjectMapper → Project: targets · Maps into project domain objects
- ProjectMapper → ProjectDTO: targets · Maps into project API shapes
- User → Role: relates to · User authorization is role-based
- AuthService → UserRepository: creates users · Registration flow stores new accounts
- AuthService → User: authenticates · Loads user identity during login
- application.properties → SecurityConfig: supports · Provides externalized runtime settings
- application.properties → App config: supports · Feeds datasource and app settings
