# ggixiy/catchclass architecture

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

- Interactive diagram: https://gitdiagram.com/ggixiy/catchclass
- Repository: https://github.com/ggixiy/catchclass

## Overview

CatchClass’s evidenced, working product flow is account access and profile management: users register or log in, receive an access token, and can view or update profile details and photos. The backend also supports email verification and password recovery; registration and recovery publish events, but the provided excerpts do not establish their notification wiring. Chat, meetings, and rooms appear only as package markers, so their runtime capabilities cannot be described from this evidence. The map focuses on implemented frontend and backend paths; no README was provided.

Main entry points: [`backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java) (Auth workflows), [`backend/src/main/java/com/catchclass/user/internal/service/UserService.java`](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/service/UserService.java) (Profile service), [`frontend/src/app/router.tsx`](https://github.com/ggixiy/catchclass/blob/main/frontend/src/app/router.tsx) (Page router), [`frontend/src/features/auth/api/authApi.ts`](https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/auth/api/authApi.ts) (Auth API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_router["Page router<br/>[router.tsx]"]
  node_auth_pages["Auth pages"]
  node_auth_client["Auth API client<br/>[authApi.ts]"]
  node_profile_page["Profile page<br/>[ProfilePage.tsx]"]
  node_user_client["User API client<br/>[userApi.ts]"]
  node_http["HTTP client<br/>[http.ts]"]
  node_token_store["Access token store<br/>[tokenStore.ts]"]
end

subgraph group_auth["Authentication"]
  node_auth_controller["Auth endpoints"]
  node_auth_service["Auth workflows<br/>[AuthService.java]"]
  node_jwt["JWT service<br/>[JwtService.java]"]
  node_token_hasher["Token hashing<br/>[TokenHasher.java]"]
  node_auth_config["Auth settings"]
  node_action_tokens["Action tokens<br/>[ActionToken.java]"]
  node_refresh_tokens["Refresh tokens<br/>[RefreshToken.java]"]
  node_refresh_repo["Refresh token repository"]
  node_action_repo["Action token repository"]
end

subgraph group_profile["User profiles"]
  node_user_api["User contract<br/>[UserApi.java]"]
  node_user_controller["Profile endpoints"]
  node_photo_controller["Photo endpoints"]
  node_user_service["Profile service<br/>[UserService.java]"]
  node_user_repo["User repository"]
  node_photo_repo["Photo repository"]
  node_user_entity["User record<br/>[User.java]"]
  node_photo_entity["Photo record<br/>[Photo.java]"]
end

subgraph group_shared["Shared backend"]
  node_current_user["Current user context<br/>[CurrentUser.java]"]
  node_api_exception["API errors<br/>[ApiException.java]"]
end

node_person(("User"))

node_person -->|"uses"| node_app
node_app -->|"mounts"| node_router
node_router -->|"routes"| node_auth_pages
node_router -->|"routes"| node_profile_page
node_auth_pages -.->|"requests"| node_auth_client
node_profile_page -->|"requests"| node_user_client
node_auth_client -->|"sends requests"| node_http
node_auth_client -->|"stores token"| node_token_store
node_person -.->|"submits credentials"| node_auth_controller
node_auth_controller -->|"delegates"| node_auth_service
node_auth_service -->|"manages accounts"| node_user_api
node_auth_service -->|"issues tokens"| node_jwt
node_jwt -->|"reads settings"| node_auth_config
node_auth_service -->|"hashes tokens"| node_token_hasher
node_auth_service -->|"uses"| node_action_repo
node_auth_service -->|"uses"| node_refresh_repo
node_action_repo -->|"persists"| node_action_tokens
node_refresh_repo -->|"persists"| node_refresh_tokens
node_user_api -->|"implemented by"| node_user_service
node_user_controller -->|"delegates"| node_user_service
node_photo_controller -->|"delegates"| node_user_service
node_user_controller -->|"gets identity"| node_current_user
node_photo_controller -->|"gets identity"| node_current_user
node_user_service -->|"reads and writes"| node_user_repo
node_user_service -->|"reads and writes"| node_photo_repo
node_user_repo -->|"persists"| node_user_entity
node_photo_repo -->|"persists"| node_photo_entity
node_user_service -->|"raises errors"| node_api_exception

click node_app "https://github.com/ggixiy/catchclass/blob/main/frontend/src/app/App.tsx"
click node_router "https://github.com/ggixiy/catchclass/blob/main/frontend/src/app/router.tsx"
click node_auth_pages "https://github.com/ggixiy/catchclass/tree/main/frontend/src/features/auth/pages"
click node_auth_client "https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/auth/api/authApi.ts"
click node_profile_page "https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/user/pages/ProfilePage.tsx"
click node_user_client "https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/user/api/userApi.ts"
click node_http "https://github.com/ggixiy/catchclass/blob/main/frontend/src/shared/api/http.ts"
click node_token_store "https://github.com/ggixiy/catchclass/blob/main/frontend/src/shared/api/tokenStore.ts"
click node_auth_controller "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/controller/AuthController.java"
click node_auth_service "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java"
click node_jwt "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/security/JwtService.java"
click node_token_hasher "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/security/TokenHasher.java"
click node_auth_config "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/config/AuthProperties.java"
click node_action_tokens "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/entity/ActionToken.java"
click node_refresh_tokens "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/entity/RefreshToken.java"
click node_refresh_repo "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/repository/RefreshTokenRepository.java"
click node_action_repo "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/repository/ActionTokenRepository.java"
click node_user_api "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/UserApi.java"
click node_user_controller "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/controller/UserController.java"
click node_photo_controller "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/controller/UserPhotoController.java"
click node_user_service "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/service/UserService.java"
click node_user_repo "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/repository/UserRepository.java"
click node_photo_repo "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/repository/PhotoRepository.java"
click node_user_entity "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/entity/User.java"
click node_photo_entity "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/entity/Photo.java"
click node_current_user "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/shared/security/CurrentUser.java"
click node_api_exception "https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/shared/web/ApiException.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_app,node_router,node_auth_pages,node_auth_client,node_profile_page,node_user_client,node_http,node_token_store,node_person toneBlue
class node_auth_controller,node_auth_service,node_jwt,node_token_hasher,node_auth_config,node_action_tokens,node_refresh_tokens,node_refresh_repo,node_action_repo toneAmber
class node_user_api,node_user_controller,node_photo_controller,node_user_service,node_user_repo,node_photo_repo,node_user_entity,node_photo_entity toneMint
class node_current_user,node_api_exception toneRose
```

## Components

### Web application

- [App bootstrap](https://github.com/ggixiy/catchclass/blob/main/frontend/src/app/App.tsx): `frontend/src/app/App.tsx`
- [Page router](https://github.com/ggixiy/catchclass/blob/main/frontend/src/app/router.tsx): `frontend/src/app/router.tsx`
- [Auth pages](https://github.com/ggixiy/catchclass/tree/main/frontend/src/features/auth/pages): `frontend/src/features/auth/pages`
- [Auth API client](https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/auth/api/authApi.ts): `frontend/src/features/auth/api/authApi.ts`
- [Profile page](https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/user/pages/ProfilePage.tsx): `frontend/src/features/user/pages/ProfilePage.tsx`
- [User API client](https://github.com/ggixiy/catchclass/blob/main/frontend/src/features/user/api/userApi.ts): `frontend/src/features/user/api/userApi.ts`
- [HTTP client](https://github.com/ggixiy/catchclass/blob/main/frontend/src/shared/api/http.ts): `frontend/src/shared/api/http.ts`
- [Access token store](https://github.com/ggixiy/catchclass/blob/main/frontend/src/shared/api/tokenStore.ts): `frontend/src/shared/api/tokenStore.ts`

### Authentication

- [Auth endpoints](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/controller/AuthController.java): `backend/src/main/java/com/catchclass/auth/internal/controller/AuthController.java`
- [Auth workflows](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java): `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`
- [JWT service](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/security/JwtService.java): `backend/src/main/java/com/catchclass/auth/internal/security/JwtService.java`
- [Token hashing](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/security/TokenHasher.java): `backend/src/main/java/com/catchclass/auth/internal/security/TokenHasher.java`
- [Auth settings](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/config/AuthProperties.java): `backend/src/main/java/com/catchclass/auth/internal/config/AuthProperties.java`
- [Action tokens](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/entity/ActionToken.java): `backend/src/main/java/com/catchclass/auth/internal/entity/ActionToken.java`
- [Refresh tokens](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/entity/RefreshToken.java): `backend/src/main/java/com/catchclass/auth/internal/entity/RefreshToken.java`
- [Refresh token repository](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/repository/RefreshTokenRepository.java): `backend/src/main/java/com/catchclass/auth/internal/repository/RefreshTokenRepository.java`
- [Action token repository](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/auth/internal/repository/ActionTokenRepository.java): `backend/src/main/java/com/catchclass/auth/internal/repository/ActionTokenRepository.java`

### User profiles

- [User contract](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/UserApi.java): `backend/src/main/java/com/catchclass/user/UserApi.java`
- [Profile endpoints](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/controller/UserController.java): `backend/src/main/java/com/catchclass/user/internal/controller/UserController.java`
- [Photo endpoints](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/controller/UserPhotoController.java): `backend/src/main/java/com/catchclass/user/internal/controller/UserPhotoController.java`
- [Profile service](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/service/UserService.java): `backend/src/main/java/com/catchclass/user/internal/service/UserService.java`
- [User repository](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/repository/UserRepository.java): `backend/src/main/java/com/catchclass/user/internal/repository/UserRepository.java`
- [Photo repository](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/repository/PhotoRepository.java): `backend/src/main/java/com/catchclass/user/internal/repository/PhotoRepository.java`
- [User record](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/entity/User.java): `backend/src/main/java/com/catchclass/user/internal/entity/User.java`
- [Photo record](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/user/internal/entity/Photo.java): `backend/src/main/java/com/catchclass/user/internal/entity/Photo.java`

### Shared backend

- [Current user context](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/shared/security/CurrentUser.java): `backend/src/main/java/com/catchclass/shared/security/CurrentUser.java`
- [API errors](https://github.com/ggixiy/catchclass/blob/main/backend/src/main/java/com/catchclass/shared/web/ApiException.java): `backend/src/main/java/com/catchclass/shared/web/ApiException.java`

### Other components

- **User**

## Connections

- User → App bootstrap: uses
- App bootstrap → Page router: mounts (evidence: `frontend/src/app/App.tsx`)
- Page router → Auth pages: routes (evidence: `frontend/src/app/router.tsx`)
- Page router → Profile page: routes (evidence: `frontend/src/app/router.tsx`)
- Auth pages → Auth API client: requests (evidence: `frontend/src/features/auth/pages/SignUpPage.tsx`)
- Profile page → User API client: requests (evidence: `frontend/src/features/user/pages/ProfilePage.tsx`)
- Auth API client → HTTP client: sends requests (evidence: `frontend/src/features/auth/api/authApi.ts`)
- Auth API client → Access token store: stores token (evidence: `frontend/src/features/auth/api/authApi.ts`)
- User → Auth endpoints: submits credentials
- Auth endpoints → Auth workflows: delegates (evidence: `backend/src/main/java/com/catchclass/auth/internal/controller/AuthController.java`)
- Auth workflows → User contract: manages accounts (evidence: `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`)
- Auth workflows → JWT service: issues tokens (evidence: `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`)
- JWT service → Auth settings: reads settings (evidence: `backend/src/main/java/com/catchclass/auth/internal/security/JwtService.java`)
- Auth workflows → Token hashing: hashes tokens (evidence: `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`)
- Auth workflows → Action token repository: uses (evidence: `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`)
- Auth workflows → Refresh token repository: uses (evidence: `backend/src/main/java/com/catchclass/auth/internal/service/AuthService.java`)
- Action token repository → Action tokens: persists (evidence: `backend/src/main/java/com/catchclass/auth/internal/repository/ActionTokenRepository.java`)
- Refresh token repository → Refresh tokens: persists (evidence: `backend/src/main/java/com/catchclass/auth/internal/repository/RefreshTokenRepository.java`)
- User contract → Profile service: implemented by (evidence: `backend/src/main/java/com/catchclass/user/internal/service/UserService.java`)
- Profile endpoints → Profile service: delegates (evidence: `backend/src/main/java/com/catchclass/user/internal/controller/UserController.java`)
- Photo endpoints → Profile service: delegates (evidence: `backend/src/main/java/com/catchclass/user/internal/controller/UserPhotoController.java`)
- Profile endpoints → Current user context: gets identity (evidence: `backend/src/main/java/com/catchclass/user/internal/controller/UserController.java`)
- Photo endpoints → Current user context: gets identity (evidence: `backend/src/main/java/com/catchclass/user/internal/controller/UserPhotoController.java`)
- Profile service → User repository: reads and writes (evidence: `backend/src/main/java/com/catchclass/user/internal/service/UserService.java`)
- Profile service → Photo repository: reads and writes (evidence: `backend/src/main/java/com/catchclass/user/internal/service/UserService.java`)
- User repository → User record: persists (evidence: `backend/src/main/java/com/catchclass/user/internal/repository/UserRepository.java`)
- Photo repository → Photo record: persists (evidence: `backend/src/main/java/com/catchclass/user/internal/repository/PhotoRepository.java`)
- Profile service → API errors: raises errors (evidence: `backend/src/main/java/com/catchclass/user/internal/service/UserService.java`)
