# angelgaxiola552/proyecto-desarrollo-web architecture

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

- Interactive diagram: https://gitdiagram.com/angelgaxiola552/proyecto-desarrollo-web
- Repository: https://github.com/angelgaxiola552/proyecto-desarrollo-web

## Overview

NetScope is a web application for configuring Nmap scans without writing commands, launching them, and reviewing results. Users authenticate, manage targets and reusable scan profiles, submit scans, then track, filter, edit, cancel, or inspect scan results; admins also manage users and view activity and statistics. The React client calls the Express API, which validates requests and uses in-memory collections. Scan execution invokes the external Nmap process. The README documents all major screens and API domains; some page and route implementations were not sampled, so their internal links are omitted where unverified.

Main entry points: [`client/src/App.jsx`](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/App.jsx) (Screen routing), [`client/src/api.js`](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/api.js) (API client), [`server/src/controllers/scans.controller.js`](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/scans.controller.js) (Scan orchestration), [`server/src/data/store.js`](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/data/store.js) (Collections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["Screen routing<br/>[App.jsx]"]
  node_session["Session context<br/>[AuthContext.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_scan_form["New scan<br/>[NuevoEscaneo.jsx]"]
  node_scan_options["Nmap options<br/>[OpcionesNmap.jsx]"]
  node_scan_history["Scan history<br/>[Historial.jsx]"]
  node_scan_detail["Scan detail<br/>[DetalleEscaneo.jsx]"]
  node_targets_ui["Target management<br/>[Targets.jsx]"]
  node_profiles_ui["Profile management<br/>[Perfiles.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_activity_ui["Activity view<br/>[Actividad.jsx]"]
  node_users_ui["User administration<br/>[AdminUsuarios.jsx]"]
  node_account_ui["Account profile<br/>[Perfil.jsx]"]
  node_xml_reader["Nmap XML reader<br/>[nmapXml.js]"]
end

subgraph group_api["Express API"]
  node_express["API application<br/>[app.js]"]
  node_scan_routes["Scan routes<br/>[scans.js]"]
  node_scan_validation["Scan validation<br/>[scan.validators.js]"]
  node_activity_log["Activity logger<br/>[activityLogger.js]"]
  node_targets_controller["Target operations"]
  node_profiles_controller["Profile operations"]
  node_users_controller["User operations"]
  node_stats_controller["Statistics"]
  node_activity_controller["Activity queries"]
end

subgraph group_runtime["Scan runtime"]
  node_scan_controller["Scan orchestration"]
  node_command_builder["Command builder<br/>[buildCommand.js]"]
end

subgraph group_state["In-memory state"]
  node_store[("Collections<br/>[store.js]")]
end

node_user(("User"))
node_nmap{{"Nmap process"}}

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_scan_form
node_app -->|"routes to"| node_scan_history
node_app -->|"routes to"| node_scan_detail
node_app -->|"routes to"| node_targets_ui
node_app -->|"routes to"| node_profiles_ui
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_activity_ui
node_app -->|"routes to"| node_users_ui
node_app -->|"routes to"| node_account_ui
node_scan_form -->|"renders"| node_scan_options
node_scan_form -->|"requests"| node_api_client
node_scan_history -->|"requests"| node_api_client
node_scan_detail -->|"requests"| node_api_client
node_scan_detail -->|"parses with"| node_xml_reader
node_targets_ui -->|"requests"| node_api_client
node_profiles_ui -.->|"requests"| node_api_client
node_dashboard -.->|"requests"| node_api_client
node_activity_ui -.->|"requests"| node_api_client
node_users_ui -->|"requests"| node_api_client
node_account_ui -->|"requests"| node_api_client
node_api_client -->|"calls API"| node_express
node_express -->|"mounts"| node_scan_routes
node_scan_routes -->|"dispatches"| node_scan_controller
node_scan_controller -->|"validates with"| node_scan_validation
node_scan_controller -->|"builds command"| node_command_builder
node_scan_controller -->|"spawns"| node_nmap
node_scan_controller -->|"reads and updates"| node_store
node_scan_controller -->|"logs events"| node_activity_log
node_activity_log -->|"writes"| node_store
node_targets_controller -->|"reads and updates"| node_store
node_profiles_controller -->|"reads and updates"| node_store
node_users_controller -->|"reads and updates"| node_store
node_users_controller -->|"logs events"| node_activity_log
node_stats_controller -->|"reads"| node_store
node_activity_controller -->|"reads"| node_store

click node_app "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/App.jsx"
click node_session "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/context/AuthContext.jsx"
click node_api_client "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/api.js"
click node_scan_form "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/NuevoEscaneo.jsx"
click node_scan_options "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/components/OpcionesNmap.jsx"
click node_scan_history "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Historial.jsx"
click node_scan_detail "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/DetalleEscaneo.jsx"
click node_targets_ui "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Targets.jsx"
click node_profiles_ui "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Perfiles.jsx"
click node_dashboard "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Dashboard.jsx"
click node_activity_ui "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Actividad.jsx"
click node_users_ui "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/AdminUsuarios.jsx"
click node_account_ui "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Perfil.jsx"
click node_xml_reader "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/utils/nmapXml.js"
click node_express "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/app.js"
click node_scan_routes "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/routes/scans.js"
click node_scan_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/scans.controller.js"
click node_scan_validation "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/validators/scan.validators.js"
click node_command_builder "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/services/buildCommand.js"
click node_store "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/data/store.js"
click node_activity_log "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/services/activityLogger.js"
click node_targets_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/targets.controller.js"
click node_profiles_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/profiles.controller.js"
click node_users_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/users.controller.js"
click node_stats_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/stats.controller.js"
click node_activity_controller "https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/activity.controller.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_app,node_session,node_api_client,node_scan_form,node_scan_options,node_scan_history,node_scan_detail,node_targets_ui,node_profiles_ui,node_dashboard,node_activity_ui,node_users_ui,node_account_ui,node_xml_reader,node_user toneBlue
class node_express,node_scan_routes,node_scan_validation,node_activity_log,node_targets_controller,node_profiles_controller,node_users_controller,node_stats_controller,node_activity_controller toneAmber
class node_scan_controller,node_command_builder toneMint
class node_store toneRose
class node_nmap toneIndigo
```

## Components

### React client

- [Screen routing](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Session context](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [API client](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/api.js): `client/src/api.js`
- [New scan](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/NuevoEscaneo.jsx): `client/src/pages/NuevoEscaneo.jsx`
- [Nmap options](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/components/OpcionesNmap.jsx): `client/src/components/OpcionesNmap.jsx`
- [Scan history](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Historial.jsx): `client/src/pages/Historial.jsx`
- [Scan detail](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/DetalleEscaneo.jsx): `client/src/pages/DetalleEscaneo.jsx`
- [Target management](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Targets.jsx): `client/src/pages/Targets.jsx`
- [Profile management](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Perfiles.jsx): `client/src/pages/Perfiles.jsx`
- [Dashboard](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Activity view](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Actividad.jsx): `client/src/pages/Actividad.jsx`
- [User administration](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/AdminUsuarios.jsx): `client/src/pages/AdminUsuarios.jsx`
- [Account profile](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/pages/Perfil.jsx): `client/src/pages/Perfil.jsx`
- [Nmap XML reader](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/client/src/utils/nmapXml.js): `client/src/utils/nmapXml.js`

### Express API

- [API application](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/app.js): `server/src/app.js`
- [Scan routes](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/routes/scans.js): `server/src/routes/scans.js`
- [Scan validation](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/validators/scan.validators.js): `server/src/validators/scan.validators.js`
- [Activity logger](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/services/activityLogger.js): `server/src/services/activityLogger.js`
- [Target operations](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/targets.controller.js): `server/src/controllers/targets.controller.js`
- [Profile operations](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/profiles.controller.js): `server/src/controllers/profiles.controller.js`
- [User operations](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/users.controller.js): `server/src/controllers/users.controller.js`
- [Statistics](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/stats.controller.js): `server/src/controllers/stats.controller.js`
- [Activity queries](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/activity.controller.js): `server/src/controllers/activity.controller.js`

### Scan runtime

- [Scan orchestration](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/controllers/scans.controller.js): `server/src/controllers/scans.controller.js`
- [Command builder](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/services/buildCommand.js): `server/src/services/buildCommand.js`

### In-memory state

- [Collections](https://github.com/angelgaxiola552/proyecto-desarrollo-web/blob/main/server/src/data/store.js): `server/src/data/store.js`

### Other components

- **User**
- **Nmap process**

## Connections

- User → Screen routing: uses (evidence: `README.md`)
- Screen routing → New scan: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Scan history: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Scan detail: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Target management: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Profile management: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Dashboard: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Activity view: routes to (evidence: `client/src/App.jsx`)
- Screen routing → User administration: routes to (evidence: `client/src/App.jsx`)
- Screen routing → Account profile: routes to (evidence: `client/src/App.jsx`)
- New scan → Nmap options: renders (evidence: `client/src/pages/NuevoEscaneo.jsx`)
- New scan → API client: requests (evidence: `client/src/pages/NuevoEscaneo.jsx`)
- Scan history → API client: requests (evidence: `client/src/pages/Historial.jsx`)
- Scan detail → API client: requests (evidence: `client/src/pages/DetalleEscaneo.jsx`)
- Scan detail → Nmap XML reader: parses with (evidence: `client/src/pages/DetalleEscaneo.jsx`)
- Target management → API client: requests (evidence: `client/src/pages/Targets.jsx`)
- Profile management → API client: requests (evidence: `README.md`)
- Dashboard → API client: requests (evidence: `README.md`)
- Activity view → API client: requests (evidence: `README.md`)
- User administration → API client: requests (evidence: `client/src/pages/AdminUsuarios.jsx`)
- Account profile → API client: requests (evidence: `client/src/pages/Perfil.jsx`)
- API client → API application: calls API (evidence: `README.md`)
- API application → Scan routes: mounts (evidence: `server/src/app.js`)
- Scan routes → Scan orchestration: dispatches (evidence: `server/src/routes/scans.js`)
- Scan orchestration → Scan validation: validates with (evidence: `server/src/controllers/scans.controller.js`)
- Scan orchestration → Command builder: builds command (evidence: `server/src/controllers/scans.controller.js`)
- Scan orchestration → Nmap process: spawns (evidence: `server/src/controllers/scans.controller.js`)
- Scan orchestration → Collections: reads and updates (evidence: `server/src/controllers/scans.controller.js`)
- Scan orchestration → Activity logger: logs events (evidence: `server/src/controllers/scans.controller.js`)
- Activity logger → Collections: writes (evidence: `server/src/services/activityLogger.js`)
- Target operations → Collections: reads and updates (evidence: `server/src/controllers/targets.controller.js`)
- Profile operations → Collections: reads and updates (evidence: `server/src/controllers/profiles.controller.js`)
- User operations → Collections: reads and updates (evidence: `server/src/controllers/users.controller.js`)
- User operations → Activity logger: logs events (evidence: `server/src/controllers/users.controller.js`)
- Statistics → Collections: reads (evidence: `server/src/controllers/stats.controller.js`)
- Activity queries → Collections: reads (evidence: `server/src/controllers/activity.controller.js`)
