# fabiocranchi/palestracontratosdigitais architecture

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

- Interactive diagram: https://gitdiagram.com/fabiocranchi/palestracontratosdigitais
- Repository: https://github.com/fabiocranchi/palestracontratosdigitais

## Overview

This repository is an offline-capable, 35-slide presentation about digital-contract forensics, with a browser-based SHA-256 demonstration and an optional PHP-backed aggregate-counter panel. The main workflow is to navigate the slides; the browser may also request camera and location permissions, while the final slide periodically displays server counters. The PHP endpoint validates requests, tracks session markers, and reads or updates aggregate totals. The README documents the presentation-side capabilities, but `index.html` was not sampled, so its internal calls and implementation details cannot be verified.

Main entry points: [`index.html`](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html) (Slide deck), [`api.php`](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/api.php) (Counter API), [`data`](https://github.com/fabiocranchi/palestracontratosdigitais/tree/main/data) (Aggregate totals)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_presentation["Presentation"]
  node_slides["Slide deck<br/>[index.html]"]
  node_navigation["Slide navigation<br/>[index.html]"]
end

subgraph group_browser["Browser features"]
  node_hash["SHA-256 demo<br/>[index.html]"]
  node_permissions["Permission prompts<br/>[index.html]"]
end

subgraph group_counting["Counter service"]
  node_counter_panel["Counter panel<br/>[index.html]"]
  node_api["Counter API<br/>[api.php]"]
  node_totals[("Aggregate totals")]
  node_sessions[("Session markers")]
end

node_audience(("Presenter or audience"))
node_camera["Browser camera"]
node_geolocation["Browser geolocation"]

node_audience -->|"views"| node_slides
node_audience -->|"navigates"| node_navigation
node_slides -->|"includes"| node_hash
node_slides -->|"requests"| node_permissions
node_permissions -->|"requests access"| node_camera
node_permissions -->|"requests access"| node_geolocation
node_counter_panel -->|"polls totals"| node_api
node_api -->|"reads and updates"| node_totals
node_api -->|"stores markers"| node_sessions

click node_slides "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html"
click node_navigation "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html"
click node_hash "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html"
click node_permissions "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html"
click node_counter_panel "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html"
click node_api "https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/api.php"
click node_totals "https://github.com/fabiocranchi/palestracontratosdigitais/tree/main/data"
click node_sessions "https://github.com/fabiocranchi/palestracontratosdigitais/tree/main/data"

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_slides,node_navigation,node_camera,node_geolocation toneBlue
class node_hash,node_permissions toneAmber
class node_counter_panel,node_api,node_totals,node_sessions toneMint
class node_audience toneIndigo
```

## Components

### Presentation

- [Slide deck](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html): `index.html`
- [Slide navigation](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html): `index.html`

### Browser features

- [SHA-256 demo](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html): `index.html`
- [Permission prompts](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html): `index.html`

### Counter service

- [Counter panel](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/index.html): `index.html`
- [Counter API](https://github.com/fabiocranchi/palestracontratosdigitais/blob/main/api.php): `api.php`
- [Aggregate totals](https://github.com/fabiocranchi/palestracontratosdigitais/tree/main/data): `data`
- [Session markers](https://github.com/fabiocranchi/palestracontratosdigitais/tree/main/data): `data`

### Other components

- **Presenter or audience**
- **Browser camera**
- **Browser geolocation**

## Connections

- Presenter or audience → Slide deck: views (evidence: `README.md`)
- Presenter or audience → Slide navigation: navigates (evidence: `README.md`)
- Slide deck → SHA-256 demo: includes (evidence: `README.md`)
- Slide deck → Permission prompts: requests (evidence: `README.md`)
- Permission prompts → Browser camera: requests access (evidence: `README.md`)
- Permission prompts → Browser geolocation: requests access (evidence: `README.md`)
- Counter panel → Counter API: polls totals (evidence: `README.md`)
- Counter API → Aggregate totals: reads and updates (evidence: `api.php`)
- Counter API → Session markers: stores markers (evidence: `api.php`)
