# rikvalix/arcane architecture

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

- Interactive diagram: https://gitdiagram.com/rikvalix/arcane
- Repository: https://github.com/rikvalix/arcane

## Overview

Arcane is a web application for browsing Arcane characters, factions, and places, with JWT-based registration and login. Users navigate the Vue interface; its forms and API clients send authentication requests to Spring controllers, which delegate account work to authentication services and repositories. Character and faction browsing is another documented product branch, with sampled controller-to-repository and frontend character-fetch relationships. PostgreSQL and Prometheus/Grafana are documented stack capabilities; monitoring wiring and some browsing paths are not shown in the excerpts, so those links are marked unverified or omitted.

Main entry points: [`arcane_vue/src/api/libs/auth.ts`](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/auth.ts) (Auth API client), [`arcane_vue/src/components/form/AuthenticationForm.vue`](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/AuthenticationForm.vue) (Login/register forms), [`arcane_vue/src/api/libs/character.ts`](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/character.ts) (Character API client), [`arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java`](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java) (Auth endpoints)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue interface"]
  node_auth_view["Authentication view<br/>[Authentication.vue]"]
  node_auth_forms["Login/register forms"]
  node_login_form["Login form<br/>[LoginForm.vue]"]
  node_register_form["Registration form<br/>[RegisterForm.vue]"]
  node_auth_client["Auth API client<br/>[auth.ts]"]
  node_api_client["HTTP client<br/>[api.ts]"]
  node_home["Home view<br/>[Home.vue]"]
  node_gallery["Gallery view<br/>[Gallery.vue]"]
  node_universe["Universe view<br/>[Universe.vue]"]
  node_character_client["Character API client<br/>[character.ts]"]
  node_character_card["Character card<br/>[CharacterCard.vue]"]
  node_faction_card["Faction card<br/>[FactionCard.vue]"]
end

subgraph group_backend["Spring API"]
  node_auth_controller["Auth endpoints"]
  node_character_controller["Character endpoints"]
  node_faction_controller["Faction endpoints"]
end

subgraph group_identity["Authentication"]
  node_auth_service["Account service"]
  node_jwt_service["JWT service<br/>[JwtService.java]"]
  node_jwt_filter["JWT request filter"]
  node_user_repo["User repository"]
end

subgraph group_domain["Arcane catalog"]
  node_character_entity["Character model<br/>[Character.java]"]
  node_character_repo["Character repository"]
  node_faction_entity["Faction model<br/>[Faction.java]"]
  node_faction_repo["Faction repository"]
  node_place_model["Place data<br/>[Place.java]"]
end

node_visitor(("Site visitor"))
node_postgres[("PostgreSQL")]
node_monitoring["Prometheus/Grafana"]

node_visitor -.->|"opens"| node_auth_view
node_auth_view -->|"renders"| node_auth_forms
node_auth_forms -->|"switches to"| node_login_form
node_auth_forms -->|"switches to"| node_register_form
node_login_form -->|"submits login"| node_auth_client
node_register_form -->|"submits signup"| node_auth_client
node_auth_client -->|"uses"| node_api_client
node_api_client -.->|"HTTP requests"| node_auth_controller
node_auth_controller -->|"delegates"| node_auth_service
node_auth_controller -->|"creates token"| node_jwt_service
node_auth_service -->|"saves and finds"| node_user_repo
node_auth_service -.->|"persists users"| node_postgres
node_jwt_filter -->|"validates token"| node_jwt_service
node_jwt_service -.->|"issues JWT"| node_auth_client
node_home -->|"fetches characters"| node_character_client
node_character_client -->|"uses"| node_api_client
node_home -->|"renders"| node_character_card
node_character_client -.->|"HTTP requests"| node_character_controller
node_character_controller -->|"queries"| node_character_repo
node_character_repo -->|"loads"| node_character_entity
node_character_repo -.->|"reads catalog"| node_postgres
node_faction_controller -->|"queries"| node_faction_repo
node_faction_controller -->|"maps DTO"| node_faction_entity
node_faction_repo -.->|"reads catalog"| node_postgres
node_gallery -.->|"displays factions"| node_faction_card
node_universe -.->|"browses places"| node_place_model
node_monitoring -.->|"observes metrics"| node_postgres

click node_auth_view "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Authentication.vue"
click node_auth_forms "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/AuthenticationForm.vue"
click node_login_form "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/LoginForm.vue"
click node_register_form "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/RegisterForm.vue"
click node_auth_client "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/auth.ts"
click node_api_client "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/api.ts"
click node_home "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Home.vue"
click node_gallery "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Gallery.vue"
click node_universe "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Universe.vue"
click node_character_client "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/character.ts"
click node_character_card "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/card/CharacterCard.vue"
click node_faction_card "https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/card/FactionCard.vue"
click node_auth_controller "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java"
click node_character_controller "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/CharacterController.java"
click node_faction_controller "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/FactionController.java"
click node_auth_service "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/services/AuthenticationService.java"
click node_jwt_service "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/services/JwtService.java"
click node_jwt_filter "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/config/JwtAuthenticationFilter.java"
click node_user_repo "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/UserRepository.java"
click node_character_entity "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Character.java"
click node_character_repo "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/CharacterRepository.java"
click node_faction_entity "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Faction.java"
click node_faction_repo "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/FactionRepository.java"
click node_place_model "https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Place.java"

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_view,node_auth_forms,node_login_form,node_register_form,node_auth_client,node_api_client,node_home,node_gallery,node_universe,node_character_client,node_character_card,node_faction_card toneBlue
class node_auth_controller,node_character_controller,node_faction_controller,node_postgres toneAmber
class node_auth_service,node_jwt_service,node_jwt_filter,node_user_repo toneMint
class node_character_entity,node_character_repo,node_faction_entity,node_faction_repo,node_place_model toneRose
class node_visitor,node_monitoring toneIndigo
```

## Components

### Vue interface

- [Authentication view](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Authentication.vue): `arcane_vue/src/views/Authentication.vue`
- [Login/register forms](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/AuthenticationForm.vue): `arcane_vue/src/components/form/AuthenticationForm.vue`
- [Login form](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/LoginForm.vue): `arcane_vue/src/components/form/LoginForm.vue`
- [Registration form](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/form/RegisterForm.vue): `arcane_vue/src/components/form/RegisterForm.vue`
- [Auth API client](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/auth.ts): `arcane_vue/src/api/libs/auth.ts`
- [HTTP client](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/api.ts): `arcane_vue/src/api/api.ts`
- [Home view](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Home.vue): `arcane_vue/src/views/Home.vue`
- [Gallery view](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Gallery.vue): `arcane_vue/src/views/Gallery.vue`
- [Universe view](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/views/Universe.vue): `arcane_vue/src/views/Universe.vue`
- [Character API client](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/api/libs/character.ts): `arcane_vue/src/api/libs/character.ts`
- [Character card](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/card/CharacterCard.vue): `arcane_vue/src/components/card/CharacterCard.vue`
- [Faction card](https://github.com/rikvalix/arcane/blob/main/arcane_vue/src/components/card/FactionCard.vue): `arcane_vue/src/components/card/FactionCard.vue`

### Spring API

- [Auth endpoints](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java): `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java`
- [Character endpoints](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/CharacterController.java): `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/CharacterController.java`
- [Faction endpoints](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/FactionController.java): `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/FactionController.java`

### Authentication

- [Account service](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/services/AuthenticationService.java): `arcane_backend/src/main/java/com/arcane/backend/services/AuthenticationService.java`
- [JWT service](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/services/JwtService.java): `arcane_backend/src/main/java/com/arcane/backend/services/JwtService.java`
- [JWT request filter](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/config/JwtAuthenticationFilter.java): `arcane_backend/src/main/java/com/arcane/backend/config/JwtAuthenticationFilter.java`
- [User repository](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/UserRepository.java): `arcane_backend/src/main/java/com/arcane/backend/repositories/UserRepository.java`

### Arcane catalog

- [Character model](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Character.java): `arcane_backend/src/main/java/com/arcane/backend/entities/Character.java`
- [Character repository](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/CharacterRepository.java): `arcane_backend/src/main/java/com/arcane/backend/repositories/CharacterRepository.java`
- [Faction model](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Faction.java): `arcane_backend/src/main/java/com/arcane/backend/entities/Faction.java`
- [Faction repository](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/repositories/FactionRepository.java): `arcane_backend/src/main/java/com/arcane/backend/repositories/FactionRepository.java`
- [Place data](https://github.com/rikvalix/arcane/blob/main/arcane_backend/src/main/java/com/arcane/backend/entities/Place.java): `arcane_backend/src/main/java/com/arcane/backend/entities/Place.java`

### Other components

- **Site visitor**
- **PostgreSQL**
- **Prometheus/Grafana**

## Connections

- Site visitor → Authentication view: opens
- Authentication view → Login/register forms: renders (evidence: `arcane_vue/src/views/Authentication.vue`)
- Login/register forms → Login form: switches to (evidence: `arcane_vue/src/components/form/AuthenticationForm.vue`)
- Login/register forms → Registration form: switches to (evidence: `arcane_vue/src/components/form/AuthenticationForm.vue`)
- Login form → Auth API client: submits login (evidence: `arcane_vue/src/components/form/LoginForm.vue`)
- Registration form → Auth API client: submits signup (evidence: `arcane_vue/src/components/form/RegisterForm.vue`)
- Auth API client → HTTP client: uses (evidence: `arcane_vue/src/api/libs/auth.ts`)
- HTTP client → Auth endpoints: HTTP requests (evidence: `arcane_vue/src/api/api.ts`)
- Auth endpoints → Account service: delegates (evidence: `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java`)
- Auth endpoints → JWT service: creates token (evidence: `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/AuthenticationController.java`)
- Account service → User repository: saves and finds (evidence: `arcane_backend/src/main/java/com/arcane/backend/services/AuthenticationService.java`)
- Account service → PostgreSQL: persists users
- JWT request filter → JWT service: validates token (evidence: `arcane_backend/src/main/java/com/arcane/backend/config/JwtAuthenticationFilter.java`)
- JWT service → Auth API client: issues JWT
- Home view → Character API client: fetches characters (evidence: `arcane_vue/src/views/Home.vue`)
- Character API client → HTTP client: uses (evidence: `arcane_vue/src/api/libs/character.ts`)
- Home view → Character card: renders (evidence: `arcane_vue/src/views/Home.vue`)
- Character API client → Character endpoints: HTTP requests
- Character endpoints → Character repository: queries (evidence: `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/CharacterController.java`)
- Character repository → Character model: loads (evidence: `arcane_backend/src/main/java/com/arcane/backend/repositories/CharacterRepository.java`)
- Character repository → PostgreSQL: reads catalog
- Faction endpoints → Faction repository: queries (evidence: `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/FactionController.java`)
- Faction endpoints → Faction model: maps DTO (evidence: `arcane_backend/src/main/java/com/arcane/backend/controller/api/v1/FactionController.java`)
- Faction repository → PostgreSQL: reads catalog
- Gallery view → Faction card: displays factions
- Universe view → Place data: browses places
- Prometheus/Grafana → PostgreSQL: observes metrics
