# engineeringsebastian-s/sudoku architecture

> Architecture diagram of the GitHub repository engineeringsebastian-s/sudoku, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-08-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/engineeringsebastian-s/sudoku
- Repository: https://github.com/engineeringsebastian-s/sudoku

## Overview

##### Project type and purpose
- This is a full-stack web application (Sudoku game) built with Spring Boot (Java) using an MVC pattern. It serves HTML pages (Thymeleaf or similar templating) and static assets (CSS) to the browser. It also configures an RMI server for remote Sudoku service access.

##### File structure
- Top-level artifacts:
- pom.xml and Maven wrapper for build and dependency management
- src/main/java/poli/engineering/sudoku: Java code, split into
– Config (RmiServerConfig.java)
– Controller (MenuController.java, SudokuController.java)
– Service (ISudokuService.java, SudokuService.java)
– Application entry point (SudokuApplication.java)
- src/main/resources:
– application.yml (Spring Boot configuration)
– static/: CSS files (board.css, main.css, menu.css, root.css)
– templates/: HTML views (menu.html, board.html)
- src/test: basic Spring Boot test class (SudokuApplicationTests.java)

##### README for additional insights
- The README only shows “# Sudoku,” confirming the core purpose: serving a Sudoku game application.

##### Elements
- Clear component labels (e.g., “SudokuController,” “SudokuService,” “RmiServerConfig”)
- HTTP requests/responses between Browser ↔ Controllers
- Method calls between Controllers → Service → (domain logic)
- RMI calls between External Client ↔ RMI Server
- Rectangles for components (controllers, services)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Clients
    Browser["Web Browser"]:::frontend
    ExtClient["External RMI Client"]:::external

    %% Backend System
    subgraph "Backend (Spring Boot Server)"
        direction TB

        subgraph "Controllers Layer"
            direction TB
            MenuCtrl["MenuController"]:::controller
            SudokuCtrl["SudokuController"]:::controller
        end

        subgraph "Service Layer"
            direction TB
            ISvc["ISudokuService"]:::service
            SvcImp["SudokuService"]:::service
        end

        subgraph "Configuration"
            direction TB
            AppYml["application.yml"]:::config
            RmiCfg["RmiServerConfig"]:::config
        end

        subgraph "Resources"
            direction TB
            Templates["Templates<br/>(menu.html, board.html)"]:::resource
            StaticRes["Static CSS<br/>(board.css, main.css,<br/>menu.css, root.css)"]:::resource
        end
    end

    %% Interactions
    Browser -->|"HTTP GET/POST"| MenuCtrl
    Browser -->|"HTTP GET/POST"| SudokuCtrl
    MenuCtrl -->|"calls"| ISvc
    SudokuCtrl -->|"calls"| ISvc
    ISvc -->|"implemented by"| SvcImp
    MenuCtrl -->|"returns view"| Templates
    SudokuCtrl -->|"returns view"| Templates
    Browser -->|"requests CSS"| StaticRes

    ExtClient -->|"RMI call"| RmiCfg
    RmiCfg -->|"exposes methods of"| SvcImp

    %% Click Events
    click MenuCtrl "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/java/poli/engineering/sudoku/Controller/MenuController.java"
    click SudokuCtrl "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/java/poli/engineering/sudoku/Controller/SudokuController.java"
    click ISvc "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/java/poli/engineering/sudoku/Service/ISudokuService.java"
    click SvcImp "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/java/poli/engineering/sudoku/Service/SudokuService.java"
    click RmiCfg "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/java/poli/engineering/sudoku/Config/RmiServerConfig.java"
    click AppYml "https://github.com/engineeringsebastian-s/sudoku/blob/main/src/main/resources/application.yml"
    click Templates "https://github.com/engineeringsebastian-s/sudoku/tree/main/src/main/resources/templates"
    click StaticRes "https://github.com/engineeringsebastian-s/sudoku/tree/main/src/main/resources/static"
    click ExtClient "https://github.com/engineeringsebastian-s/sudoku/tree/main/N/A"
    click Browser "https://github.com/engineeringsebastian-s/sudoku/tree/main/N/A"

    %% Styles
    classDef frontend fill:#B3DDF2,stroke:#333,stroke-width:1px
    classDef external fill:#F2D7D5,stroke:#333,stroke-width:1px
    classDef controller fill:#FDE9D9,stroke:#333,stroke-width:1px
    classDef service fill:#E2F0D9,stroke:#333,stroke-width:1px
    classDef config fill:#D9EAF7,stroke:#333,stroke-width:1px
    classDef resource fill:#FFF2CC,stroke:#333,stroke-width:1px
```
