# nikolastyl/my-fantasy-tournament architecture

> Architecture diagram of the GitHub repository nikolastyl/my-fantasy-tournament, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nikolastyl/my-fantasy-tournament
- Repository: https://github.com/nikolastyl/my-fantasy-tournament

## Overview

This repository is an analysis-stage fantasy tournament platform with a partial Spring Boot backend. Its implemented path is currently limited to application startup, bootstrap initialization, and service/repository persistence for seasons, tournament entities, and users; no API or frontend source appears in the tree. The README also describes fantasy gameplay and broader match-statistics capabilities, but these are not represented by sampled runtime modules. Edges below follow indexed imports and documented architecture; unverified framework wiring is dashed.

Main entry points: [`src/main/java/com/fantasy/fantasy_tournament/domain/season/Season.java`](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/season/Season.java) (Season model), [`src/main/java/com/fantasy/fantasy_tournament/FantasyTournamentApplication.java`](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/FantasyTournamentApplication.java) (Spring Boot app), [`src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java`](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java) (User initializer), [`src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java`](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java) (Season initializer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup &amp; Bootstrap"]
  node_application["Spring Boot app"]
  node_app_init["User initializer"]
  node_season_init["Season initializer"]
end

subgraph group_season["Season Management"]
  node_season_service["Season service"]
  node_season_repo["Season repository"]
  node_season_model["Season model<br/>[Season.java]"]
end

subgraph group_tournament["Tournament Management"]
  node_tournament_services["Team, round, match services"]
  node_tournament_repos["Tournament repositories"]
  node_tournament_models["Teams, players, fixtures"]
end

subgraph group_users["Users &amp; Persistence"]
  node_user_service["User service"]
  node_user_repo["User repository"]
  node_user_model["User and role<br/>[User.java]"]
  node_base_entity["Audit fields<br/>[BaseEntity.java]"]
end

node_operator(("Platform operator"))
node_database[("PostgreSQL")]
node_fantasy_features["Fantasy gameplay capabilities<br/>[README.md]"]

node_operator -.->|"starts"| node_application
node_application -.->|"initializes"| node_app_init
node_application -.->|"initializes"| node_season_init
node_app_init -->|"creates user"| node_user_service
node_app_init -->|"assigns role"| node_user_model
node_season_init -->|"saves season"| node_season_service
node_season_init -->|"builds season"| node_season_model
node_season_service -->|"queries and saves"| node_season_repo
node_season_service -->|"handles"| node_season_model
node_season_repo -->|"persists"| node_season_model
node_tournament_services -->|"queries and saves"| node_tournament_repos
node_tournament_services -->|"handles"| node_tournament_models
node_tournament_repos -->|"persists"| node_tournament_models
node_tournament_models -->|"belongs to season"| node_season_model
node_user_service -->|"queries and saves"| node_user_repo
node_user_service -->|"handles"| node_user_model
node_user_repo -->|"persists"| node_user_model
node_season_repo -.->|"stores records"| node_database
node_tournament_repos -.->|"stores records"| node_database
node_user_repo -.->|"stores records"| node_database
node_fantasy_features -.->|"uses season rules"| node_season_model

click node_application "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/FantasyTournamentApplication.java"
click node_app_init "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java"
click node_season_init "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java"
click node_season_service "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/service/season/SeasonServiceImpl.java"
click node_season_repo "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/repository/SeasonRepository.java"
click node_season_model "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/season/Season.java"
click node_tournament_services "https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/service/tournament"
click node_tournament_repos "https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/repository"
click node_tournament_models "https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/domain/tournament"
click node_user_service "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/service/user/UserServiceImpl.java"
click node_user_repo "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/repository/UserRepository.java"
click node_user_model "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/user/User.java"
click node_base_entity "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/shared/BaseEntity.java"
click node_fantasy_features "https://github.com/nikolastyl/my-fantasy-tournament/blob/main/README.md"

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_application,node_app_init,node_season_init toneBlue
class node_season_service,node_season_repo,node_season_model,node_database toneAmber
class node_tournament_services,node_tournament_repos,node_tournament_models toneMint
class node_user_service,node_user_repo,node_user_model,node_base_entity toneRose
class node_operator toneIndigo
class node_fantasy_features toneTeal
```

## Components

### Startup & Bootstrap

- [Spring Boot app](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/FantasyTournamentApplication.java): `src/main/java/com/fantasy/fantasy_tournament/FantasyTournamentApplication.java`
- [User initializer](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java): `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java`
- [Season initializer](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java): `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java`

### Season Management

- [Season service](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/service/season/SeasonServiceImpl.java): `src/main/java/com/fantasy/fantasy_tournament/service/season/SeasonServiceImpl.java`
- [Season repository](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/repository/SeasonRepository.java): `src/main/java/com/fantasy/fantasy_tournament/repository/SeasonRepository.java`
- [Season model](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/season/Season.java): `src/main/java/com/fantasy/fantasy_tournament/domain/season/Season.java`

### Tournament Management

- [Team, round, match services](https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/service/tournament): `src/main/java/com/fantasy/fantasy_tournament/service/tournament`
- [Tournament repositories](https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/repository): `src/main/java/com/fantasy/fantasy_tournament/repository`
- [Teams, players, fixtures](https://github.com/nikolastyl/my-fantasy-tournament/tree/main/src/main/java/com/fantasy/fantasy_tournament/domain/tournament): `src/main/java/com/fantasy/fantasy_tournament/domain/tournament`

### Users & Persistence

- [User service](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/service/user/UserServiceImpl.java): `src/main/java/com/fantasy/fantasy_tournament/service/user/UserServiceImpl.java`
- [User repository](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/repository/UserRepository.java): `src/main/java/com/fantasy/fantasy_tournament/repository/UserRepository.java`
- [User and role](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/user/User.java): `src/main/java/com/fantasy/fantasy_tournament/domain/user/User.java`
- [Audit fields](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/src/main/java/com/fantasy/fantasy_tournament/domain/shared/BaseEntity.java): `src/main/java/com/fantasy/fantasy_tournament/domain/shared/BaseEntity.java`

### Other components

- **Platform operator**
- **PostgreSQL**
- [Fantasy gameplay capabilities](https://github.com/nikolastyl/my-fantasy-tournament/blob/main/README.md): `README.md`

## Connections

- Platform operator → Spring Boot app: starts
- Spring Boot app → User initializer: initializes
- Spring Boot app → Season initializer: initializes
- User initializer → User service: creates user (evidence: `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java`)
- User initializer → User and role: assigns role (evidence: `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/AppDataInitializer.java`)
- Season initializer → Season service: saves season (evidence: `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java`)
- Season initializer → Season model: builds season (evidence: `src/main/java/com/fantasy/fantasy_tournament/config/bootstrap/SeasonInitializer.java`)
- Season service → Season repository: queries and saves (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/season/SeasonServiceImpl.java`)
- Season service → Season model: handles (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/season/SeasonServiceImpl.java`)
- Season repository → Season model: persists (evidence: `src/main/java/com/fantasy/fantasy_tournament/repository/SeasonRepository.java`)
- Team, round, match services → Tournament repositories: queries and saves (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/tournament/MatchServiceImpl.java`)
- Team, round, match services → Teams, players, fixtures: handles (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/tournament/MatchService.java`)
- Tournament repositories → Teams, players, fixtures: persists (evidence: `src/main/java/com/fantasy/fantasy_tournament/repository/MatchRepository.java`)
- Teams, players, fixtures → Season model: belongs to season (evidence: `src/main/java/com/fantasy/fantasy_tournament/domain/tournament/Round.java`)
- User service → User repository: queries and saves (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/user/UserServiceImpl.java`)
- User service → User and role: handles (evidence: `src/main/java/com/fantasy/fantasy_tournament/service/user/UserServiceImpl.java`)
- User repository → User and role: persists (evidence: `src/main/java/com/fantasy/fantasy_tournament/repository/UserRepository.java`)
- Season repository → PostgreSQL: stores records (evidence: `README.md`)
- Tournament repositories → PostgreSQL: stores records (evidence: `README.md`)
- User repository → PostgreSQL: stores records (evidence: `README.md`)
- Fantasy gameplay capabilities → Season model: uses season rules
