# kryakryateam/cinagloria-frontend architecture

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

- Interactive diagram: https://gitdiagram.com/kryakryateam/cinagloria-frontend
- Repository: https://github.com/kryakryateam/cinagloria-frontend

## Overview

CinaGloria is a Next.js frontend for a competition and team platform. Users can browse competition listings and details, register, and browse or create teams; authenticated users also have profile and notification features. Administrators manage competitions and users. The sampled hooks show competition actions flowing through request objects into client-side stores, while the pages expose the user-facing stages. Authentication and notification capabilities are present in the tree, but their full runtime wiring was not sampled.

Main entry points: [`src/core/requests/network/NetworkRequest.ts`](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/requests/network/NetworkRequest.ts) (Network requests), [`src/hooks/useCompetition.ts`](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/useCompetition.ts) (Competition actions), [`src/state/LoadMachine/LoadState.ts`](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/LoadMachine/LoadState.ts) (Load coordinator), [`src/hooks/admin/useChangeCompetitionForm.hook.ts`](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/admin/useChangeCompetitionForm.hook.ts) (Competition editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_competition_pages["Competition pages"]
  node_team_pages["Team pages"]
  node_auth_pages["Authentication pages"]
  node_profile_pages["Profile pages"]
  node_admin_pages["Admin pages"]
  node_landing["Landing page<br/>[page.tsx]"]
end

subgraph group_competition["Competition domain"]
  node_competition_actions["Competition actions<br/>[useCompetition.ts]"]
  node_competition_model["Competition model<br/>[Competion.ts]"]
  node_competition_state["Competition stores"]
  node_admin_competition["Competition editing"]
end

subgraph group_identity["Identity and teams"]
  node_team_actions["Team management<br/>[useTeamPage.ts]"]
  node_team_state["Team state<br/>[TeamState.ts]"]
  node_user_actions["User profile actions<br/>[useMe.hook.ts]"]
  node_user_state["User state<br/>[UserState.ts]"]
  node_notification_hooks["Notification actions"]
  node_notification_state["Notification state"]
end

subgraph group_platform["Client platform"]
  node_load_state["Load coordinator<br/>[LoadState.ts]"]
  node_request_layer["Network requests<br/>[NetworkRequest.ts]"]
  node_container["Dependency container<br/>[Container.ts]"]
end

node_visitor(("Visitor"))
node_member(("Signed-in member"))
node_backend{{"CinaGloria backend"}}

node_visitor -->|"browses"| node_competition_pages
node_visitor -->|"browses"| node_team_pages
node_visitor -.->|"signs up"| node_auth_pages
node_visitor -->|"opens"| node_landing
node_member -->|"views profile"| node_profile_pages
node_member -.->|"manages alerts"| node_notification_hooks
node_competition_pages -->|"loads competition"| node_competition_actions
node_competition_actions -->|"updates"| node_competition_state
node_competition_actions -->|"creates model"| node_competition_model
node_competition_actions -->|"executes requests"| node_request_layer
node_admin_pages -.->|"edits competition"| node_admin_competition
node_admin_competition -->|"executes requests"| node_request_layer
node_admin_competition -->|"reads store"| node_competition_state
node_team_pages -->|"manages team"| node_team_actions
node_team_actions -->|"reads team"| node_team_state
node_team_actions -->|"executes requests"| node_request_layer
node_profile_pages -->|"loads profile"| node_user_actions
node_user_actions -->|"reads and updates"| node_user_state
node_user_actions -->|"executes requests"| node_request_layer
node_notification_hooks -->|"updates"| node_notification_state
node_load_state -->|"loads data"| node_request_layer
node_load_state -->|"stores teams"| node_team_state
node_load_state -->|"resolves services"| node_container
node_container -->|"binds requests"| node_request_layer
node_request_layer -.->|"sends API requests"| node_backend

click node_competition_pages "https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/(ssr)/competitions"
click node_team_pages "https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/teams"
click node_auth_pages "https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/auth"
click node_profile_pages "https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/profile"
click node_admin_pages "https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/admin"
click node_competition_actions "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/useCompetition.ts"
click node_competition_model "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/domain/entity/Competion.ts"
click node_competition_state "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/CompetitionState.ts"
click node_admin_competition "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/admin/useChangeCompetitionForm.hook.ts"
click node_team_actions "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/team/useTeamPage.ts"
click node_team_state "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/TeamState.ts"
click node_user_actions "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/user/useMe.hook.ts"
click node_user_state "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/UserState.ts"
click node_notification_hooks "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/notification/useNotification.hook.ts"
click node_notification_state "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/NotificationStore.ts"
click node_load_state "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/LoadMachine/LoadState.ts"
click node_request_layer "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/requests/network/NetworkRequest.ts"
click node_container "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/Container.ts"
click node_landing "https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/app/page.tsx"

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_competition_pages,node_team_pages,node_auth_pages,node_profile_pages,node_admin_pages,node_landing toneBlue
class node_competition_actions,node_competition_model,node_competition_state,node_admin_competition toneAmber
class node_team_actions,node_team_state,node_user_actions,node_user_state,node_notification_hooks,node_notification_state toneMint
class node_load_state,node_request_layer,node_container toneRose
class node_visitor,node_member,node_backend toneIndigo
```

## Components

### User experience

- [Competition pages](https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/(ssr)/competitions): `src/app/(ssr)/competitions`
- [Team pages](https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/teams): `src/app/app/teams`
- [Authentication pages](https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/auth): `src/app/auth`
- [Profile pages](https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/profile): `src/app/app/profile`
- [Admin pages](https://github.com/kryakryateam/cinagloria-frontend/tree/main/src/app/app/admin): `src/app/app/admin`
- [Landing page](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/app/page.tsx): `src/app/page.tsx`

### Competition domain

- [Competition actions](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/useCompetition.ts): `src/hooks/useCompetition.ts`
- [Competition model](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/domain/entity/Competion.ts): `src/core/domain/entity/Competion.ts`
- [Competition stores](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/CompetitionState.ts): `src/state/CompetitionState.ts`
- [Competition editing](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/admin/useChangeCompetitionForm.hook.ts): `src/hooks/admin/useChangeCompetitionForm.hook.ts`

### Identity and teams

- [Team management](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/team/useTeamPage.ts): `src/hooks/team/useTeamPage.ts`
- [Team state](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/TeamState.ts): `src/state/TeamState.ts`
- [User profile actions](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/user/useMe.hook.ts): `src/hooks/user/useMe.hook.ts`
- [User state](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/UserState.ts): `src/state/UserState.ts`
- [Notification actions](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/hooks/notification/useNotification.hook.ts): `src/hooks/notification/useNotification.hook.ts`
- [Notification state](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/NotificationStore.ts): `src/state/NotificationStore.ts`

### Client platform

- [Load coordinator](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/state/LoadMachine/LoadState.ts): `src/state/LoadMachine/LoadState.ts`
- [Network requests](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/requests/network/NetworkRequest.ts): `src/core/requests/network/NetworkRequest.ts`
- [Dependency container](https://github.com/kryakryateam/cinagloria-frontend/blob/main/src/core/Container.ts): `src/core/Container.ts`

### Other components

- **Visitor**
- **Signed-in member**
- **CinaGloria backend**

## Connections

- Visitor → Competition pages: browses (evidence: `src/app/(ssr)/competitions/[id]/page.tsx`)
- Visitor → Team pages: browses (evidence: `src/app/app/teams/browse/page.tsx`)
- Visitor → Authentication pages: signs up
- Visitor → Landing page: opens (evidence: `src/app/page.tsx`)
- Signed-in member → Profile pages: views profile (evidence: `src/app/app/profile/information/page.tsx`)
- Signed-in member → Notification actions: manages alerts
- Competition pages → Competition actions: loads competition (evidence: `src/app/(ssr)/competitions/[id]/page.tsx`)
- Competition actions → Competition stores: updates (evidence: `src/hooks/useCompetition.ts`)
- Competition actions → Competition model: creates model (evidence: `src/hooks/useCompetition.ts`)
- Competition actions → Network requests: executes requests (evidence: `src/hooks/useCompetition.ts`)
- Admin pages → Competition editing: edits competition
- Competition editing → Network requests: executes requests (evidence: `src/hooks/admin/useChangeCompetitionForm.hook.ts`)
- Competition editing → Competition stores: reads store (evidence: `src/hooks/admin/useChangeCompetitionForm.hook.ts`)
- Team pages → Team management: manages team (evidence: `src/app/app/teams/browse/page.tsx`)
- Team management → Team state: reads team (evidence: `src/hooks/team/useTeamPage.ts`)
- Team management → Network requests: executes requests (evidence: `src/hooks/team/useTeamPage.ts`)
- Profile pages → User profile actions: loads profile (evidence: `src/app/app/profile/information/page.tsx`)
- User profile actions → User state: reads and updates (evidence: `src/hooks/user/useMe.hook.ts`)
- User profile actions → Network requests: executes requests (evidence: `src/hooks/user/useMe.hook.ts`)
- Notification actions → Notification state: updates (evidence: `src/hooks/notification/useNotification.hook.ts`)
- Load coordinator → Network requests: loads data (evidence: `src/state/LoadMachine/LoadState.ts`)
- Load coordinator → Team state: stores teams (evidence: `src/state/LoadMachine/LoadState.ts`)
- Load coordinator → Dependency container: resolves services (evidence: `src/state/LoadMachine/LoadState.ts`)
- Dependency container → Network requests: binds requests (evidence: `src/core/Container.ts`)
- Network requests → CinaGloria backend: sends API requests
