# 1valcl3b/browser-poo architecture

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

- Interactive diagram: https://gitdiagram.com/1valcl3b/browser-poo
- Repository: https://github.com/1valcl3b/browser-poo

## Overview

This is a small command-line browser simulator. The user enters URLs or commands; the browser validates destinations against a local URL list, updates visit history, and displays page text and available child links. The main runtime and its history helper are both implemented in browser.py. The README gives no further capability detail; the graph reflects the sampled implementation.

Main entry points: [`browser.py`](https://github.com/1valcl3b/browser-poo/blob/master/browser.py) (Browser navigation), [`urls.txt`](https://github.com/1valcl3b/browser-poo/blob/master/urls.txt) (Valid URLs), [`paginas`](https://github.com/1valcl3b/browser-poo/tree/master/paginas) (Page contents)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_cli["Command loop<br/>[browser.py]"]
node_browser["Browser navigation<br/>[browser.py]"]
node_history["Visit history<br/>[browser.py]"]
node_url_list["Valid URLs<br/>[urls.txt]"]
node_page_files["Page contents"]

node_user -->|"enters commands"| node_cli
node_cli -->|"dispatches commands"| node_browser
node_browser -->|"loads URLs"| node_url_list
node_browser -->|"validates destinations"| node_url_list
node_browser -->|"updates history"| node_history
node_browser -->|"reads page text"| node_page_files
node_browser -->|"finds child links"| node_url_list

click node_cli "https://github.com/1valcl3b/browser-poo/blob/master/browser.py"
click node_browser "https://github.com/1valcl3b/browser-poo/blob/master/browser.py"
click node_history "https://github.com/1valcl3b/browser-poo/blob/master/browser.py"
click node_url_list "https://github.com/1valcl3b/browser-poo/blob/master/urls.txt"
click node_page_files "https://github.com/1valcl3b/browser-poo/tree/master/paginas"

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_user,node_browser toneBlue
class node_cli,node_history,node_url_list,node_page_files toneTeal
```

## Components

### Other components

- **User**
- [Command loop](https://github.com/1valcl3b/browser-poo/blob/master/browser.py): `browser.py`
- [Browser navigation](https://github.com/1valcl3b/browser-poo/blob/master/browser.py): `browser.py`
- [Visit history](https://github.com/1valcl3b/browser-poo/blob/master/browser.py): `browser.py`
- [Valid URLs](https://github.com/1valcl3b/browser-poo/blob/master/urls.txt): `urls.txt`
- [Page contents](https://github.com/1valcl3b/browser-poo/tree/master/paginas): `paginas`

## Connections

- User → Command loop: enters commands (evidence: `browser.py`)
- Command loop → Browser navigation: dispatches commands (evidence: `browser.py`)
- Browser navigation → Valid URLs: loads URLs (evidence: `browser.py`)
- Browser navigation → Valid URLs: validates destinations (evidence: `browser.py`)
- Browser navigation → Visit history: updates history (evidence: `browser.py`)
- Browser navigation → Page contents: reads page text (evidence: `browser.py`)
- Browser navigation → Valid URLs: finds child links (evidence: `browser.py`)
