# yut-nori/yutnori_fe architecture

> Architecture diagram of the GitHub repository yut-nori/yutnori_fe, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yut-nori/yutnori_fe
- Repository: https://github.com/yut-nori/yutnori_fe

## Overview

##### Project type and purpose
- The project purpose is to provide a user interface that players use to interact with the Yutnori game: rolling virtual sticks, moving pieces, viewing game state, and possibly communicating with a back-end or real-time server.

##### (minimal) file structure
- The only file provided is README.md, so no explicit directories exist yet.
- In a typical FE project you would expect directories like:
- src/ (application source, divided into components, assets, styles, etc.)
- public/ or static/ (entry HTML, images)
- tests/ (unit and integration tests)
- config/ or scripts/ (build, lint, continuous integration)
- Since these aren’t present, part of the system-design exercise is to decide on a structure that supports your front-end architecture.

##### README for additional insights
- The README only contains the title "# Yutnori_FE" and no further instructions or technical stack details.

##### Elements
- Clear labels (e.g., “Browser”, “UI Component: GameBoard”, “WebSocket Service”, “Game Server”)
– Blue rectangles for front-end modules (components, services)
– Green circles for external services or servers

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Top-level client
    Browser["Browser / Client"]:::external

    %% Front-end application layer
    subgraph "Front-end Application"
        direction TB
        README["Project Documentation\nREADME.md"]:::doc
        UI["UI Components"]:::frontend
        State["State Management"]:::state
        Services["Services Layer"]:::service
        README --> UI
        UI --> State
        State --> Services
    end

    %% Break down UI Components
    subgraph "UI Components"
        direction TB
        GameBoard["GameBoard"]:::frontend
        GamePieces["GamePieces"]:::frontend
        DiceSticks["Dice/Sticks"]:::frontend
        Controls["Controls"]:::frontend
        GameBoard --> GamePieces
        GamePieces --> DiceSticks
        DiceSticks --> Controls
    end

    %% Break down Services Layer
    subgraph "Services Layer"
        direction TB
        APIService["HTTP Service (axios/fetch)"]:::service
        WSService["WebSocket Service"]:::service
        APIService --> WSService
    end

    %% State connects to inner UI and services
    State --> GameBoard
    State --> APIService
    State --> WSService

    %% Browser interactions
    Browser --> UI
    Browser --> APIService
    Browser --> WSService

    %% External systems
    GameServer["Game Server"]:::external
    Database["Database"]:::external
    AuthService["Auth Service"]:::external
    Analytics["Analytics Service"]:::external

    %% Protocols
    APIService -->|"HTTP/HTTPS"| GameServer
    WSService -->|"WebSocket"| GameServer
    APIService -->|"Token Auth"| AuthService
    UI -.->|"Event Logging"| Analytics

    %% Persistence
    GameServer --> Database

    %% Click events
    click README "https://github.com/yut-nori/yutnori_fe/blob/main/README.md"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef service fill:#fff2cc,stroke:#333,stroke-width:1px
    classDef state fill:#ffe6cc,stroke:#333,stroke-width:1px
    classDef external fill:#d5f5e3,stroke:#333,stroke-width:1px
    classDef doc fill:#e8e8e8,stroke:#333,stroke-width:1px,stroke-dasharray: 5 5
```
