# danberx/polynoms architecture

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

- Interactive diagram: https://gitdiagram.com/danberx/polynoms
- Repository: https://github.com/danberx/polynoms

## Overview

This is a Qt desktop polynomial calculator. The application starts a main window; users manage a polynomial collection and request operations such as arithmetic, comparison, root finding, differentiation, and point evaluation. The GUI dispatches work to the polynomial model and displays results. The excerpts show collection updates and several operation calls, but omit much of the handler logic; file import/export is visible only as declared UI actions, so no storage relationship is asserted.

Main entry points: [`polynoms.cpp`](https://github.com/danberx/polynoms/blob/main/polynoms.cpp) (Polynomial actions), [`main.cpp`](https://github.com/danberx/polynoms/blob/main/main.cpp) (Qt startup), [`backend.h`](https://github.com/danberx/polynoms/blob/main/backend.h) (Polynomial model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_startup["Qt startup<br/>[main.cpp]"]
  node_window["Main window<br/>[polynoms.cpp]"]
  node_actions["Polynomial actions<br/>[polynoms.cpp]"]
end

subgraph group_domain["Polynomial domain"]
  node_polynomial["Polynomial model<br/>[backend.h]"]
  node_validation["Input validation<br/>[backend.h]"]
end

subgraph group_state["Polynomial collection"]
  node_collection["Polynomial collection<br/>[backend.h]"]
end

node_user(("User"))

node_user -->|"launches"| node_startup
node_startup -->|"creates"| node_window
node_user -->|"uses"| node_window
node_window -->|"dispatches"| node_actions
node_actions -->|"invokes operations"| node_polynomial
node_actions -->|"reads and updates"| node_collection
node_actions -->|"validates input"| node_validation

click node_startup "https://github.com/danberx/polynoms/blob/main/main.cpp"
click node_window "https://github.com/danberx/polynoms/blob/main/polynoms.cpp"
click node_actions "https://github.com/danberx/polynoms/blob/main/polynoms.cpp"
click node_polynomial "https://github.com/danberx/polynoms/blob/main/backend.h"
click node_validation "https://github.com/danberx/polynoms/blob/main/backend.h"
click node_collection "https://github.com/danberx/polynoms/blob/main/backend.h"

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_startup,node_window,node_actions,node_user toneBlue
class node_polynomial,node_validation toneAmber
class node_collection toneMint
```

## Components

### Desktop interface

- [Qt startup](https://github.com/danberx/polynoms/blob/main/main.cpp): `main.cpp`
- [Main window](https://github.com/danberx/polynoms/blob/main/polynoms.cpp): `polynoms.cpp`
- [Polynomial actions](https://github.com/danberx/polynoms/blob/main/polynoms.cpp): `polynoms.cpp`

### Polynomial domain

- [Polynomial model](https://github.com/danberx/polynoms/blob/main/backend.h): `backend.h`
- [Input validation](https://github.com/danberx/polynoms/blob/main/backend.h): `backend.h`

### Polynomial collection

- [Polynomial collection](https://github.com/danberx/polynoms/blob/main/backend.h): `backend.h`

### Other components

- **User**

## Connections

- User → Qt startup: launches
- Qt startup → Main window: creates (evidence: `main.cpp`)
- User → Main window: uses
- Main window → Polynomial actions: dispatches (evidence: `polynoms.cpp`)
- Polynomial actions → Polynomial model: invokes operations (evidence: `polynoms.cpp`)
- Polynomial actions → Polynomial collection: reads and updates (evidence: `polynoms.cpp`)
- Polynomial actions → Input validation: validates input (evidence: `polynoms.cpp`)
