# sharzhukov/tessera architecture

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

- Interactive diagram: https://gitdiagram.com/sharzhukov/tessera
- Repository: https://github.com/sharzhukov/tessera

## Overview

Tessera is an early-stage C++ math-expression parser, evaluator, and planned visualizer. The intended user workflow is to enter an expression, parse it, compute a result, and display it; currently, the console only reads input and prints a placeholder. The sampled core modules are mostly declarations or empty implementations, so their runtime wiring cannot be confirmed. README-described future capabilities are shown as planned subsystems, not as implemented or connected features.

Main entry points: [`app/main.cpp`](https://github.com/sharzhukov/tessera/blob/main/app/main.cpp) (Console Loop), [`src/core/parser.cpp`](https://github.com/sharzhukov/tessera/blob/main/src/core/parser.cpp) (Parser), [`src/core`](https://github.com/sharzhukov/tessera/tree/main/src/core) (Expression Evaluation), [`src/core/lexer.cpp`](https://github.com/sharzhukov/tessera/blob/main/src/core/lexer.cpp) (Lexer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_console["Console"]
  node_app["Console Loop<br/>[main.cpp]"]
end

subgraph group_language["Expression Core"]
  node_lexer["Lexer<br/>[lexer.cpp]"]
  node_parser["Parser<br/>[parser.cpp]"]
  node_context["Evaluation Context<br/>[context.cpp]"]
  node_commands["Commands<br/>[command.cpp]"]
  node_command_register["Command Registry"]
  node_matrix["Matrix Operations<br/>[matrix.cpp]"]
end

subgraph group_shared["Shared Math Types"]
  node_atom_types["Atom Types<br/>[AtomData.hpp]"]
  node_common["Common Utilities<br/>[common.cpp]"]
end

subgraph group_roadmap["Planned Capabilities"]
  node_evaluator["Expression Evaluation"]
  node_error_reporting["Error Reporting"]
  node_matrices_vectors["Matrices and Vectors"]
  node_gui["Graphical Interface"]
  node_plotting["Function Plotting"]
  node_physics["Physics Module"]
  node_complex_numbers["Complex Numbers"]
end

node_user(("Expression User"))

node_user -->|"enters expression"| node_app
node_app -->|"prints placeholder"| node_user
node_lexer -.->|"feeds tokens"| node_parser
node_parser -.->|"provides structure"| node_evaluator
node_evaluator -.->|"returns result"| node_app
node_error_reporting -.->|"reports errors"| node_app

click node_app "https://github.com/sharzhukov/tessera/blob/main/app/main.cpp"
click node_lexer "https://github.com/sharzhukov/tessera/blob/main/src/core/lexer.cpp"
click node_parser "https://github.com/sharzhukov/tessera/blob/main/src/core/parser.cpp"
click node_context "https://github.com/sharzhukov/tessera/blob/main/src/core/context.cpp"
click node_commands "https://github.com/sharzhukov/tessera/blob/main/src/core/command.cpp"
click node_command_register "https://github.com/sharzhukov/tessera/blob/main/src/core/commandRegister.cpp"
click node_matrix "https://github.com/sharzhukov/tessera/blob/main/src/core/components/matrix.cpp"
click node_atom_types "https://github.com/sharzhukov/tessera/blob/main/include/tessera/common/AtomData.hpp"
click node_common "https://github.com/sharzhukov/tessera/blob/main/src/common/common.cpp"
click node_evaluator "https://github.com/sharzhukov/tessera/tree/main/src/core"
click node_error_reporting "https://github.com/sharzhukov/tessera/tree/main/src/core"
click node_matrices_vectors "https://github.com/sharzhukov/tessera/tree/main/src/core/components"
click node_gui "https://github.com/sharzhukov/tessera/tree/main/src/ui"
click node_plotting "https://github.com/sharzhukov/tessera/tree/main/src/render"
click node_physics "https://github.com/sharzhukov/tessera/tree/main/src/core"
click node_complex_numbers "https://github.com/sharzhukov/tessera/tree/main/src/core"

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_app,node_user toneBlue
class node_lexer,node_parser,node_context,node_commands,node_command_register,node_matrix toneAmber
class node_atom_types,node_common toneMint
class node_evaluator,node_error_reporting,node_matrices_vectors,node_gui,node_plotting,node_physics,node_complex_numbers toneRose
```

## Components

### Console

- [Console Loop](https://github.com/sharzhukov/tessera/blob/main/app/main.cpp): `app/main.cpp`

### Expression Core

- [Lexer](https://github.com/sharzhukov/tessera/blob/main/src/core/lexer.cpp): `src/core/lexer.cpp`
- [Parser](https://github.com/sharzhukov/tessera/blob/main/src/core/parser.cpp): `src/core/parser.cpp`
- [Evaluation Context](https://github.com/sharzhukov/tessera/blob/main/src/core/context.cpp): `src/core/context.cpp`
- [Commands](https://github.com/sharzhukov/tessera/blob/main/src/core/command.cpp): `src/core/command.cpp`
- [Command Registry](https://github.com/sharzhukov/tessera/blob/main/src/core/commandRegister.cpp): `src/core/commandRegister.cpp`
- [Matrix Operations](https://github.com/sharzhukov/tessera/blob/main/src/core/components/matrix.cpp): `src/core/components/matrix.cpp`

### Shared Math Types

- [Atom Types](https://github.com/sharzhukov/tessera/blob/main/include/tessera/common/AtomData.hpp): `include/tessera/common/AtomData.hpp`
- [Common Utilities](https://github.com/sharzhukov/tessera/blob/main/src/common/common.cpp): `src/common/common.cpp`

### Planned Capabilities

- [Expression Evaluation](https://github.com/sharzhukov/tessera/tree/main/src/core): `src/core`
- [Error Reporting](https://github.com/sharzhukov/tessera/tree/main/src/core): `src/core`
- [Matrices and Vectors](https://github.com/sharzhukov/tessera/tree/main/src/core/components): `src/core/components`
- [Graphical Interface](https://github.com/sharzhukov/tessera/tree/main/src/ui): `src/ui`
- [Function Plotting](https://github.com/sharzhukov/tessera/tree/main/src/render): `src/render`
- [Physics Module](https://github.com/sharzhukov/tessera/tree/main/src/core): `src/core`
- [Complex Numbers](https://github.com/sharzhukov/tessera/tree/main/src/core): `src/core`

### Other components

- **Expression User**

## Connections

- Expression User → Console Loop: enters expression (evidence: `app/main.cpp`)
- Console Loop → Expression User: prints placeholder (evidence: `app/main.cpp`)
- Lexer → Parser: feeds tokens
- Parser → Expression Evaluation: provides structure (evidence: `README.md`)
- Expression Evaluation → Console Loop: returns result (evidence: `README.md`)
- Error Reporting → Console Loop: reports errors (evidence: `README.md`)
