# emilytepeu00/olc2_b_p2_2s2026 architecture

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

- Interactive diagram: https://gitdiagram.com/emilytepeu00/olc2_b_p2_2s2026
- Repository: https://github.com/emilytepeu00/olc2_b_p2_2s2026

## Overview

OxigenNative is a web-based compiler for an academic language: users edit or open source, submit it for compilation and execution, then inspect output and reports. The documented backend workflow validates source, generates ARM64 assembly, assembles and links an executable, and runs it with QEMU. The graph preserves the compiler stages and the UI’s editor and report capabilities; unsampled implementation details are represented only where README documentation supports them.

Main entry points: [`backend/app.py`](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py) (Compile API), [`frontend/src/App.jsx`](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/frontend/src/App.jsx) (Editor and reports), [`backend/parser.py`](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/parser.py) (Syntax analysis), [`backend/ast_generator.py`](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/ast_generator.py) (AST image)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web interface"]
  node_webapp["Editor and reports<br/>[App.jsx]"]
  node_webentry["Web app entry<br/>[main.jsx]"]
end

subgraph group_compiler["Compiler front end"]
  node_api["Compile API<br/>[app.py]"]
  node_lexer["Lexical analysis<br/>[lexer.py]"]
  node_parser["Syntax analysis<br/>[parser.py]"]
  node_semantic["Semantic validation<br/>[semantic.py]"]
end

subgraph group_execution["Code generation and execution"]
  node_codegen["ARM64 generation<br/>[codegen.py]"]
  node_assembler["Assembler and linker"]
  node_qemu["QEMU execution"]
end

subgraph group_reporting["Compilation reports"]
  node_astreport["AST image<br/>[ast_generator.py]"]
  node_symbols["Symbol table report<br/>[app.py]"]
  node_compileerrors["Error report<br/>[app.py]"]
  node_results["Run and assembly results<br/>[app.py]"]
end

node_user(("Programmer"))

node_user -->|"edits and runs"| node_webapp
node_webentry -->|"renders"| node_webapp
node_webapp -->|"submits source"| node_api
node_api -->|"parses source"| node_parser
node_parser -->|"requests tokens"| node_lexer
node_api -->|"validates AST"| node_semantic
node_api -->|"generates assembly"| node_codegen
node_api -->|"assembles and links"| node_assembler
node_api -->|"runs executable"| node_qemu
node_api -->|"generates image"| node_astreport
node_api -->|"builds report"| node_symbols
node_api -->|"formats errors"| node_compileerrors
node_api -->|"returns results"| node_results
node_api -->|"returns response"| node_webapp
node_webapp -->|"displays results"| node_results
node_webapp -->|"shows errors"| node_compileerrors
node_webapp -->|"shows symbols"| node_symbols
node_webapp -->|"shows AST"| node_astreport

click node_webapp "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/frontend/src/App.jsx"
click node_webentry "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/frontend/src/main.jsx"
click node_api "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py"
click node_lexer "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/lexer.py"
click node_parser "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/parser.py"
click node_semantic "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/semantic.py"
click node_codegen "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/codegen.py"
click node_astreport "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/ast_generator.py"
click node_symbols "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py"
click node_compileerrors "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py"
click node_results "https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py"

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_webapp,node_webentry toneBlue
class node_api,node_lexer,node_parser,node_semantic toneAmber
class node_codegen,node_assembler,node_qemu toneMint
class node_astreport,node_symbols,node_compileerrors,node_results toneRose
class node_user toneIndigo
```

## Components

### Web interface

- [Editor and reports](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Web app entry](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### Compiler front end

- [Compile API](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py): `backend/app.py`
- [Lexical analysis](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/lexer.py): `backend/lexer.py`
- [Syntax analysis](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/parser.py): `backend/parser.py`
- [Semantic validation](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/semantic.py): `backend/semantic.py`

### Code generation and execution

- [ARM64 generation](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/codegen.py): `backend/codegen.py`
- **Assembler and linker**
- **QEMU execution**

### Compilation reports

- [AST image](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/ast_generator.py): `backend/ast_generator.py`
- [Symbol table report](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py): `backend/app.py`
- [Error report](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py): `backend/app.py`
- [Run and assembly results](https://github.com/emilytepeu00/olc2_b_p2_2s2026/blob/main/backend/app.py): `backend/app.py`

### Other components

- **Programmer**

## Connections

- Programmer → Editor and reports: edits and runs (evidence: `README.md`)
- Web app entry → Editor and reports: renders (evidence: `frontend/src/main.jsx`)
- Editor and reports → Compile API: submits source (evidence: `frontend/src/App.jsx`)
- Compile API → Syntax analysis: parses source (evidence: `backend/app.py`)
- Syntax analysis → Lexical analysis: requests tokens (evidence: `backend/parser.py`)
- Compile API → Semantic validation: validates AST (evidence: `backend/app.py`)
- Compile API → ARM64 generation: generates assembly (evidence: `backend/app.py`)
- Compile API → Assembler and linker: assembles and links (evidence: `README.md`)
- Compile API → QEMU execution: runs executable (evidence: `backend/app.py`)
- Compile API → AST image: generates image (evidence: `backend/app.py`)
- Compile API → Symbol table report: builds report (evidence: `backend/app.py`)
- Compile API → Error report: formats errors (evidence: `backend/app.py`)
- Compile API → Run and assembly results: returns results (evidence: `backend/app.py`)
- Compile API → Editor and reports: returns response (evidence: `backend/app.py`)
- Editor and reports → Run and assembly results: displays results (evidence: `frontend/src/App.jsx`)
- Editor and reports → Error report: shows errors (evidence: `README.md`)
- Editor and reports → Symbol table report: shows symbols (evidence: `README.md`)
- Editor and reports → AST image: shows AST (evidence: `README.md`)
