# mkkz7/web-lab3 architecture

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

- Interactive diagram: https://gitdiagram.com/mkkz7/web-lab3
- Repository: https://github.com/mkkz7/web-lab3

## Overview

This appears to be a JSF web app for plotting coordinate points and checking whether they fall within a selectable area, with results displayed in a table. The visible browser workflow draws the region, converts a canvas click to coordinates, and submits them; the Java tree indicates corresponding controller, checking, and persistence layers, though their call relationships are not shown in the supplied excerpts. The app also includes a clock and syntax-highlighting components. Backend links are omitted where source evidence is unavailable.

Main entry points: [`src/main/webApp/resources/scripts/main.js`](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/main.js) (Graph interaction), [`src/main/webApp/resources/scripts/index.js`](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/index.js) (Clock updater), [`src/main/webApp/resources/scripts/utils.js`](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/utils.js) (Clock utility)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_point_ui["Point page<br/>[main.xhtml]"]
  node_graph_script["Graph interaction<br/>[main.js]"]
  node_submission["Coordinate submission"]
end

subgraph group_domain["Point checking"]
  node_controller["Page controller"]
  node_area_check["Area check<br/>[AreaCheckBean.java]"]
  node_area_checker["Area checker<br/>[AreaChecker.java]"]
  node_y_validator["Y validation<br/>[ValidatorY.java]"]
  node_coordinate["Coordinate data"]
end

subgraph group_storage["Result persistence"]
  node_result["Result entity<br/>[Results.java]"]
  node_result_dao["Result DAO<br/>[ResultDAO.java]"]
  node_database[("Database")]
end

subgraph group_extras["Additional features"]
  node_clock_page["Landing page<br/>[index.xhtml]"]
  node_clock_script["Clock updater<br/>[index.js]"]
  node_clock_utils["Clock utility<br/>[utils.js]"]
  node_highlight_page["Highlight view<br/>[highlight.xhtml]"]
  node_highlight_component["Highlight component"]
  node_syntax_parser["Syntax parser"]
  node_parser_interface["Parser interface"]
  node_code_input["Code input bean"]
  node_clock_bean["Clock bean<br/>[ClockBean.java]"]
  node_service_bean["Service bean<br/>[ServiceBean.java]"]
end

node_user(("User"))

node_user -->|"clicks canvas"| node_graph_script
node_graph_script -->|"sends coordinates"| node_submission
node_clock_script -->|"imports updater"| node_clock_utils

click node_point_ui "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/main.xhtml"
click node_graph_script "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/main.js"
click node_controller "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ControllerBean.java"
click node_area_check "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/AreaCheckBean.java"
click node_area_checker "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/utils/AreaChecker.java"
click node_y_validator "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/utils/ValidatorY.java"
click node_coordinate "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/entities/CoordinateBean.java"
click node_result "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/entities/Results.java"
click node_result_dao "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/db/ResultDAO.java"
click node_clock_page "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/index.xhtml"
click node_clock_script "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/index.js"
click node_clock_utils "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/utils.js"
click node_highlight_page "https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/highlight/highlight.xhtml"
click node_highlight_component "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/HighlightTagComponent.java"
click node_syntax_parser "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/JavaSyntaxHighlighterParser.java"
click node_parser_interface "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/SyntaxHighlighterParser.java"
click node_code_input "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/StringCodeToHighlightBean.java"
click node_clock_bean "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ClockBean.java"
click node_service_bean "https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ServiceBean.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_point_ui,node_graph_script,node_submission,node_user toneBlue
class node_controller,node_area_check,node_area_checker,node_y_validator,node_coordinate toneAmber
class node_result,node_result_dao,node_database toneMint
class node_clock_page,node_clock_script,node_clock_utils,node_highlight_page,node_highlight_component,node_syntax_parser,node_parser_interface,node_code_input,node_clock_bean,node_service_bean toneRose
```

## Components

### Web interface

- [Point page](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/main.xhtml): `src/main/webApp/main.xhtml`
- [Graph interaction](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/main.js): `src/main/webApp/resources/scripts/main.js`
- **Coordinate submission**

### Point checking

- [Page controller](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ControllerBean.java): `src/main/java/org/example/mbeans/ControllerBean.java`
- [Area check](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/AreaCheckBean.java): `src/main/java/org/example/mbeans/AreaCheckBean.java`
- [Area checker](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/utils/AreaChecker.java): `src/main/java/org/example/utils/AreaChecker.java`
- [Y validation](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/utils/ValidatorY.java): `src/main/java/org/example/utils/ValidatorY.java`
- [Coordinate data](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/entities/CoordinateBean.java): `src/main/java/org/example/entities/CoordinateBean.java`

### Result persistence

- [Result entity](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/entities/Results.java): `src/main/java/org/example/entities/Results.java`
- [Result DAO](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/db/ResultDAO.java): `src/main/java/org/example/db/ResultDAO.java`
- **Database**

### Additional features

- [Landing page](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/index.xhtml): `src/main/webApp/index.xhtml`
- [Clock updater](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/index.js): `src/main/webApp/resources/scripts/index.js`
- [Clock utility](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/scripts/utils.js): `src/main/webApp/resources/scripts/utils.js`
- [Highlight view](https://github.com/mkkz7/web-lab3/blob/main/src/main/webApp/resources/highlight/highlight.xhtml): `src/main/webApp/resources/highlight/highlight.xhtml`
- [Highlight component](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/HighlightTagComponent.java): `src/main/java/org/example/tags/HighlightTagComponent.java`
- [Syntax parser](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/JavaSyntaxHighlighterParser.java): `src/main/java/org/example/tags/JavaSyntaxHighlighterParser.java`
- [Parser interface](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/SyntaxHighlighterParser.java): `src/main/java/org/example/tags/SyntaxHighlighterParser.java`
- [Code input bean](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/tags/StringCodeToHighlightBean.java): `src/main/java/org/example/tags/StringCodeToHighlightBean.java`
- [Clock bean](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ClockBean.java): `src/main/java/org/example/mbeans/ClockBean.java`
- [Service bean](https://github.com/mkkz7/web-lab3/blob/main/src/main/java/org/example/mbeans/ServiceBean.java): `src/main/java/org/example/mbeans/ServiceBean.java`

### Other components

- **User**

## Connections

- User → Graph interaction: clicks canvas (evidence: `src/main/webApp/resources/scripts/main.js`)
- Graph interaction → Coordinate submission: sends coordinates (evidence: `src/main/webApp/resources/scripts/main.js`)
- Clock updater → Clock utility: imports updater (evidence: `src/main/webApp/resources/scripts/index.js`)
