# deekshithaja/digital-footprint-visualizer architecture

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

- Interactive diagram: https://gitdiagram.com/deekshithaja/digital-footprint-visualizer
- Repository: https://github.com/deekshithaja/digital-footprint-visualizer

## Overview

Digital Footprint Visualizer is a MERN app for reviewing simulated personal exposure records, not a live external scan. Users register or sign in, view a seeded profile and risk score, request a recalculation, remediate records, and inspect exposure relationships. The graph follows the documented client/API and server route flow; frontend-to-API calls and several UI details are documented but their implementing files were not excerpted, so those links are dashed where direct call evidence is unavailable.

Main entry points: [`client/src/App.jsx`](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/App.jsx) (App routing), [`client/src/pages/Dashboard.jsx`](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/Dashboard.jsx) (Exposure dashboard), [`server/src/server.js`](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/server.js) (Express API), [`server/src/controllers/footprintController.js`](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/controllers/footprintController.js) (Footprint operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_login["Sign in<br/>[Login.jsx]"]
  node_authstate["Auth context<br/>[AuthContext.jsx]"]
  node_api["API client<br/>[api.js]"]
  node_dashboard["Exposure dashboard<br/>[Dashboard.jsx]"]
  node_visualizer["Relationship map<br/>[VisualizerPage.jsx]"]
  node_graphview["Graph renderer"]
  node_remediationui["Remediation checklist"]
end

subgraph group_server["API and identity"]
  node_server["Express API<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_footproutes["Footprint routes<br/>[footprintRoutes.js]"]
  node_authcontroller["Account operations<br/>[authController.js]"]
  node_authguard["JWT guard<br/>[authMiddleware.js]"]
  node_userstore[("User records<br/>[User.js]")]
end

subgraph group_exposure["Exposure and risk"]
  node_exposuremetrics["Exposure metrics<br/>[exposure.js]"]
  node_footcontroller["Footprint operations"]
  node_itemstore[("Exposure records<br/>[FootprintItem.js]")]
  node_seed["Profile seeding<br/>[seedFootprint.js]"]
  node_risk["Risk calculation<br/>[risk.js]"]
end

node_user(("User"))
node_database[("MongoDB")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_visualizer
node_login -.->|"uses"| node_authstate
node_authstate -.->|"requests"| node_api
node_dashboard -.->|"requests"| node_api
node_visualizer -.->|"requests"| node_api
node_visualizer -.->|"renders"| node_graphview
node_dashboard -.->|"derives metrics"| node_exposuremetrics
node_dashboard -.->|"renders"| node_remediationui
node_api -.->|"HTTP requests"| node_server
node_server -->|"mounts"| node_authroutes
node_server -->|"mounts"| node_footproutes
node_authroutes -->|"dispatches"| node_authcontroller
node_authroutes -->|"protects profile"| node_authguard
node_footproutes -->|"protects routes"| node_authguard
node_footproutes -->|"dispatches"| node_footcontroller
node_authcontroller -->|"reads/writes"| node_userstore
node_authguard -->|"loads user"| node_userstore
node_footcontroller -->|"ensures seed"| node_seed
node_footcontroller -->|"reads/writes"| node_itemstore
node_footcontroller -->|"computes score"| node_risk
node_seed -->|"creates records"| node_itemstore
node_server -.->|"connects"| node_database

click node_app "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/App.jsx"
click node_login "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/Login.jsx"
click node_authstate "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/context/AuthContext.jsx"
click node_api "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/services/api.js"
click node_dashboard "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/Dashboard.jsx"
click node_visualizer "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/VisualizerPage.jsx"
click node_graphview "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/components/VisualizerGraph.jsx"
click node_remediationui "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/components/RemediationChecklist.jsx"
click node_exposuremetrics "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/lib/exposure.js"
click node_server "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/server.js"
click node_authroutes "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/routes/authRoutes.js"
click node_footproutes "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/routes/footprintRoutes.js"
click node_authcontroller "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/controllers/authController.js"
click node_authguard "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/middleware/authMiddleware.js"
click node_footcontroller "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/controllers/footprintController.js"
click node_userstore "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/models/User.js"
click node_itemstore "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/models/FootprintItem.js"
click node_seed "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/utils/seedFootprint.js"
click node_risk "https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/utils/risk.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_login,node_authstate,node_api,node_dashboard,node_visualizer,node_graphview,node_remediationui,node_user toneBlue
class node_server,node_authroutes,node_footproutes,node_authcontroller,node_authguard,node_userstore,node_database toneAmber
class node_exposuremetrics,node_footcontroller,node_itemstore,node_seed,node_risk toneMint
```

## Components

### Client experience

- [App routing](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Sign in](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Auth context](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [API client](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/services/api.js): `client/src/services/api.js`
- [Exposure dashboard](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Relationship map](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/pages/VisualizerPage.jsx): `client/src/pages/VisualizerPage.jsx`
- [Graph renderer](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/components/VisualizerGraph.jsx): `client/src/components/VisualizerGraph.jsx`
- [Remediation checklist](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/components/RemediationChecklist.jsx): `client/src/components/RemediationChecklist.jsx`

### API and identity

- [Express API](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/server.js): `server/src/server.js`
- [Auth routes](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/routes/authRoutes.js): `server/src/routes/authRoutes.js`
- [Footprint routes](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/routes/footprintRoutes.js): `server/src/routes/footprintRoutes.js`
- [Account operations](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/controllers/authController.js): `server/src/controllers/authController.js`
- [JWT guard](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/middleware/authMiddleware.js): `server/src/middleware/authMiddleware.js`
- [User records](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/models/User.js): `server/src/models/User.js`

### Exposure and risk

- [Exposure metrics](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/client/src/lib/exposure.js): `client/src/lib/exposure.js`
- [Footprint operations](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/controllers/footprintController.js): `server/src/controllers/footprintController.js`
- [Exposure records](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/models/FootprintItem.js): `server/src/models/FootprintItem.js`
- [Profile seeding](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/utils/seedFootprint.js): `server/src/utils/seedFootprint.js`
- [Risk calculation](https://github.com/deekshithaja/digital-footprint-visualizer/blob/main/server/src/utils/risk.js): `server/src/utils/risk.js`

### Other components

- **User**
- **MongoDB**

## Connections

- User → App routing: uses (evidence: `README.md`)
- App routing → Sign in: routes to (evidence: `client/src/App.jsx`)
- App routing → Exposure dashboard: routes to (evidence: `client/src/App.jsx`)
- App routing → Relationship map: routes to (evidence: `client/src/App.jsx`)
- Sign in → Auth context: uses (evidence: `client/src/pages/Login.jsx`)
- Auth context → API client: requests
- Exposure dashboard → API client: requests
- Relationship map → API client: requests
- Relationship map → Graph renderer: renders
- Exposure dashboard → Exposure metrics: derives metrics
- Exposure dashboard → Remediation checklist: renders
- API client → Express API: HTTP requests
- Express API → Auth routes: mounts (evidence: `server/src/server.js`)
- Express API → Footprint routes: mounts (evidence: `server/src/server.js`)
- Auth routes → Account operations: dispatches (evidence: `server/src/routes/authRoutes.js`)
- Auth routes → JWT guard: protects profile (evidence: `server/src/routes/authRoutes.js`)
- Footprint routes → JWT guard: protects routes (evidence: `server/src/routes/footprintRoutes.js`)
- Footprint routes → Footprint operations: dispatches (evidence: `server/src/routes/footprintRoutes.js`)
- Account operations → User records: reads/writes (evidence: `server/src/controllers/authController.js`)
- JWT guard → User records: loads user (evidence: `server/src/middleware/authMiddleware.js`)
- Footprint operations → Profile seeding: ensures seed (evidence: `server/src/controllers/footprintController.js`)
- Footprint operations → Exposure records: reads/writes (evidence: `server/src/controllers/footprintController.js`)
- Footprint operations → Risk calculation: computes score (evidence: `server/src/controllers/footprintController.js`)
- Profile seeding → Exposure records: creates records (evidence: `server/src/utils/seedFootprint.js`)
- Express API → MongoDB: connects
