# wfillipe/projetoping.com architecture

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

- Interactive diagram: https://gitdiagram.com/wfillipe/projetoping.com
- Repository: https://github.com/wfillipe/projetoping.com

## Overview

PING.COM is an academic web application for registering network devices and tracking their availability, latency, and packet loss. The user workflow runs from browser-based account and device management through the Node.js API, which validates devices, invokes ICMP checks, and records results in a local JSON file. The dashboard, problem list, history, and latency chart present those results. The README documents scheduled and immediate checks and the broader UI capabilities; some corresponding implementation details are not in the excerpts, so those links cite the README rather than implying source inspection.

Main entry points: [`script.js`](https://github.com/wfillipe/projetoping.com/blob/main/script.js) (Frontend behavior), [`server.js`](https://github.com/wfillipe/projetoping.com/blob/main/server.js) (Check coordination), [`monitoring.js`](https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js) (Ping execution), [`index.html`](https://github.com/wfillipe/projetoping.com/blob/main/index.html) (Application screens)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser interface"]
  node_ui["Application screens<br/>[index.html]"]
  node_client["Frontend behavior<br/>[script.js]"]
  node_dashboard["Network dashboard<br/>[script.js]"]
  node_device_detail["Device details<br/>[script.js]"]
  node_history_chart["History and chart<br/>[script.js]"]
end

subgraph group_backend["HTTP application"]
  node_http_server["HTTP server and API<br/>[server.js]"]
  node_account_sessions["Accounts and sessions<br/>[server.js]"]
  node_device_api["Device management<br/>[server.js]"]
  node_check_coordinator["Check coordination<br/>[server.js]"]
  node_dashboard_api["Dashboard and problems<br/>[server.js]"]
  node_history_api["Check history<br/>[server.js]"]
  node_persistence["Database persistence<br/>[server.js]"]
end

subgraph group_monitoring["ICMP monitoring"]
  node_validation["IPv4 validation<br/>[monitoring.js]"]
  node_ping_engine["Ping execution<br/>[monitoring.js]"]
  node_result_analysis["Result classification<br/>[monitoring.js]"]
end

subgraph group_data["Local data"]
  node_json_store[("JSON database<br/>[db.json]")]
end

node_user(("Network operator"))
node_browser(("Web browser"))
node_network_device(("Monitored device"))

node_user -->|"uses"| node_browser
node_browser -->|"loads screens"| node_ui
node_ui -->|"runs interactions"| node_client
node_client -->|"sends API requests"| node_http_server
node_http_server -->|"serves assets"| node_ui
node_client -->|"requests account actions"| node_account_sessions
node_client -->|"manages devices"| node_device_api
node_client -->|"loads dashboard"| node_dashboard_api
node_client -->|"loads history"| node_history_api
node_client -->|"loads device data"| node_device_detail
node_client -->|"renders history chart"| node_history_chart
node_dashboard_api -->|"supplies summary"| node_dashboard
node_dashboard_api -->|"lists problems"| node_dashboard
node_history_api -->|"supplies checks"| node_history_chart
node_device_api -->|"validates address"| node_validation
node_device_api -->|"starts initial check"| node_check_coordinator
node_check_coordinator -->|"runs ping"| node_ping_engine
node_ping_engine -->|"checks address"| node_validation
node_ping_engine -->|"sends ICMP probes"| node_network_device
node_ping_engine -->|"parses and classifies"| node_result_analysis
node_check_coordinator -->|"records check"| node_persistence
node_persistence -->|"reads and writes"| node_json_store
node_account_sessions -->|"stores account data"| node_persistence
node_check_coordinator -->|"checks every 60 seconds"| node_ping_engine
node_device_detail -->|"requests manual check"| node_check_coordinator

click node_ui "https://github.com/wfillipe/projetoping.com/blob/main/index.html"
click node_client "https://github.com/wfillipe/projetoping.com/blob/main/script.js"
click node_dashboard "https://github.com/wfillipe/projetoping.com/blob/main/script.js"
click node_device_detail "https://github.com/wfillipe/projetoping.com/blob/main/script.js"
click node_history_chart "https://github.com/wfillipe/projetoping.com/blob/main/script.js"
click node_http_server "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_account_sessions "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_device_api "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_check_coordinator "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_dashboard_api "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_history_api "https://github.com/wfillipe/projetoping.com/blob/main/server.js"
click node_validation "https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js"
click node_ping_engine "https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js"
click node_result_analysis "https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js"
click node_json_store "https://github.com/wfillipe/projetoping.com/blob/main/db.json"
click node_persistence "https://github.com/wfillipe/projetoping.com/blob/main/server.js"

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_ui,node_client,node_dashboard,node_device_detail,node_history_chart,node_browser toneBlue
class node_http_server,node_account_sessions,node_device_api,node_check_coordinator,node_dashboard_api,node_history_api,node_persistence toneAmber
class node_validation,node_ping_engine,node_result_analysis toneMint
class node_json_store toneRose
class node_user,node_network_device toneIndigo
```

## Components

### Browser interface

- [Application screens](https://github.com/wfillipe/projetoping.com/blob/main/index.html): `index.html`
- [Frontend behavior](https://github.com/wfillipe/projetoping.com/blob/main/script.js): `script.js`
- [Network dashboard](https://github.com/wfillipe/projetoping.com/blob/main/script.js): `script.js`
- [Device details](https://github.com/wfillipe/projetoping.com/blob/main/script.js): `script.js`
- [History and chart](https://github.com/wfillipe/projetoping.com/blob/main/script.js): `script.js`

### HTTP application

- [HTTP server and API](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Accounts and sessions](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Device management](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Check coordination](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Dashboard and problems](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Check history](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`
- [Database persistence](https://github.com/wfillipe/projetoping.com/blob/main/server.js): `server.js`

### ICMP monitoring

- [IPv4 validation](https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js): `monitoring.js`
- [Ping execution](https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js): `monitoring.js`
- [Result classification](https://github.com/wfillipe/projetoping.com/blob/main/monitoring.js): `monitoring.js`

### Local data

- [JSON database](https://github.com/wfillipe/projetoping.com/blob/main/db.json): `db.json`

### Other components

- **Network operator**
- **Web browser**
- **Monitored device**

## Connections

- Network operator → Web browser: uses (evidence: `README.md`)
- Web browser → Application screens: loads screens (evidence: `README.md`)
- Application screens → Frontend behavior: runs interactions (evidence: `README.md`)
- Frontend behavior → HTTP server and API: sends API requests (evidence: `script.js`)
- HTTP server and API → Application screens: serves assets (evidence: `server.js`)
- Frontend behavior → Accounts and sessions: requests account actions (evidence: `script.js`)
- Frontend behavior → Device management: manages devices (evidence: `script.js`)
- Frontend behavior → Dashboard and problems: loads dashboard (evidence: `script.js`)
- Frontend behavior → Check history: loads history (evidence: `script.js`)
- Frontend behavior → Device details: loads device data (evidence: `script.js`)
- Frontend behavior → History and chart: renders history chart (evidence: `script.js`)
- Dashboard and problems → Network dashboard: supplies summary (evidence: `README.md`)
- Dashboard and problems → Network dashboard: lists problems (evidence: `README.md`)
- Check history → History and chart: supplies checks (evidence: `README.md`)
- Device management → IPv4 validation: validates address (evidence: `server.js`)
- Device management → Check coordination: starts initial check (evidence: `README.md`)
- Check coordination → Ping execution: runs ping (evidence: `server.js`)
- Ping execution → IPv4 validation: checks address (evidence: `monitoring.js`)
- Ping execution → Monitored device: sends ICMP probes (evidence: `README.md`)
- Ping execution → Result classification: parses and classifies (evidence: `monitoring.js`)
- Check coordination → Database persistence: records check (evidence: `server.js`)
- Database persistence → JSON database: reads and writes (evidence: `server.js`)
- Accounts and sessions → Database persistence: stores account data (evidence: `README.md`)
- Check coordination → Ping execution: checks every 60 seconds (evidence: `README.md`)
- Device details → Check coordination: requests manual check (evidence: `README.md`)
