# spavitra2007/digital-footprint-reconstructor architecture

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

- Interactive diagram: https://gitdiagram.com/spavitra2007/digital-footprint-reconstructor
- Repository: https://github.com/spavitra2007/digital-footprint-reconstructor

## Overview

Digital Footprint Reconstructor audits a repository to infer expected artifacts, identify missing ones, and score confidence and risk; it can also report GitHub repository analytics. Users can submit a GitHub URL, owner/repository, or local path through the web app or run the Python pipeline. The local API prepares the repository and orchestrates the audit stages, while the browser and Netlify paths provide public-GitHub analysis alternatives. The main audit relationships are supported by the excerpts and SOURCE INDEX; some server orchestration details are not excerpted.

Main entry points: [`server.py`](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/server.py) (Local audit API), [`pipeline.py`](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/pipeline.py) (CLI pipeline), [`reconstruction.py`](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/reconstruction.py) (Artifact reconstruction), [`app.js`](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/app.js) (Audit web app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_web["Audit web app<br/>[app.js]"]
  node_audit_results["Audit results<br/>[app.js]"]
end

subgraph group_orchestration["Audit Orchestration"]
  node_audit_api["Local audit API<br/>[server.py]"]
  node_repo_prep["Repository preparation<br/>[server.py]"]
  node_cli_pipeline["CLI pipeline<br/>[pipeline.py]"]
  node_netlify_analysis["Netlify analysis<br/>[analyze.js]"]
end

subgraph group_audit["Artifact Audit"]
  node_scanner["Evidence scanner<br/>[scanner.py]"]
  node_reconstructor["Artifact reconstruction<br/>[reconstruction.py]"]
  node_gap_detector["Gap detection<br/>[gap_detector.py]"]
  node_scoring["Confidence and risk<br/>[scoring.py]"]
end

subgraph group_insights["Repository Insights"]
  node_analytics["Repository analytics<br/>[repo_analytics.py]"]
end

node_user(("Repository owner"))
node_github{{"GitHub API"}}

node_user -->|"submits target"| node_web
node_web -->|"requests audit"| node_audit_api
node_web -->|"fetches public data"| node_github
node_web -->|"renders results"| node_audit_results
node_audit_api -->|"prepares target"| node_repo_prep
node_audit_api -->|"scans repository"| node_scanner
node_audit_api -->|"infers artifacts"| node_reconstructor
node_audit_api -->|"detects gaps"| node_gap_detector
node_audit_api -->|"scores gaps"| node_scoring
node_audit_api -->|"runs analytics"| node_analytics
node_cli_pipeline -->|"scans repository"| node_scanner
node_cli_pipeline -->|"infers artifacts"| node_reconstructor
node_cli_pipeline -->|"detects gaps"| node_gap_detector
node_cli_pipeline -->|"scores gaps"| node_scoring
node_cli_pipeline -->|"runs analytics"| node_analytics
node_reconstructor -->|"rescans evidence"| node_scanner
node_gap_detector -->|"reads files"| node_scanner
node_gap_detector -->|"infers expected"| node_reconstructor
node_scoring -->|"uses confidence"| node_reconstructor
node_analytics -->|"queries repository"| node_github
node_netlify_analysis -->|"fetches repository data"| node_github
node_user -->|"runs audit"| node_cli_pipeline

click node_web "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/app.js"
click node_audit_api "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/server.py"
click node_repo_prep "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/server.py"
click node_cli_pipeline "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/pipeline.py"
click node_scanner "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/scanner.py"
click node_reconstructor "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/reconstruction.py"
click node_gap_detector "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/gap_detector.py"
click node_scoring "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/scoring.py"
click node_analytics "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/repo_analytics.py"
click node_netlify_analysis "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/netlify/functions/analyze.js"
click node_audit_results "https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/app.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_web,node_audit_results toneBlue
class node_audit_api,node_repo_prep,node_cli_pipeline,node_netlify_analysis toneAmber
class node_scanner,node_reconstructor,node_gap_detector,node_scoring,node_github toneMint
class node_analytics toneRose
class node_user toneIndigo
```

## Components

### User Experience

- [Audit web app](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/app.js): `app.js`
- [Audit results](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/app.js): `app.js`

### Audit Orchestration

- [Local audit API](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/server.py): `server.py`
- [Repository preparation](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/server.py): `server.py`
- [CLI pipeline](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/pipeline.py): `pipeline.py`
- [Netlify analysis](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/netlify/functions/analyze.js): `netlify/functions/analyze.js`

### Artifact Audit

- [Evidence scanner](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/scanner.py): `scanner.py`
- [Artifact reconstruction](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/reconstruction.py): `reconstruction.py`
- [Gap detection](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/gap_detector.py): `gap_detector.py`
- [Confidence and risk](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/scoring.py): `scoring.py`

### Repository Insights

- [Repository analytics](https://github.com/spavitra2007/digital-footprint-reconstructor/blob/main/repo_analytics.py): `repo_analytics.py`

### Other components

- **Repository owner**
- **GitHub API**

## Connections

- Repository owner → Audit web app: submits target (evidence: `app.js`)
- Audit web app → Local audit API: requests audit (evidence: `app.js`)
- Audit web app → GitHub API: fetches public data (evidence: `app.js`)
- Audit web app → Audit results: renders results (evidence: `app.js`)
- Local audit API → Repository preparation: prepares target (evidence: `server.py`)
- Local audit API → Evidence scanner: scans repository (evidence: `server.py`)
- Local audit API → Artifact reconstruction: infers artifacts (evidence: `server.py`)
- Local audit API → Gap detection: detects gaps (evidence: `server.py`)
- Local audit API → Confidence and risk: scores gaps (evidence: `server.py`)
- Local audit API → Repository analytics: runs analytics (evidence: `server.py`)
- CLI pipeline → Evidence scanner: scans repository (evidence: `pipeline.py`)
- CLI pipeline → Artifact reconstruction: infers artifacts (evidence: `pipeline.py`)
- CLI pipeline → Gap detection: detects gaps (evidence: `pipeline.py`)
- CLI pipeline → Confidence and risk: scores gaps (evidence: `pipeline.py`)
- CLI pipeline → Repository analytics: runs analytics (evidence: `pipeline.py`)
- Artifact reconstruction → Evidence scanner: rescans evidence (evidence: `reconstruction.py`)
- Gap detection → Evidence scanner: reads files (evidence: `gap_detector.py`)
- Gap detection → Artifact reconstruction: infers expected (evidence: `gap_detector.py`)
- Confidence and risk → Artifact reconstruction: uses confidence (evidence: `scoring.py`)
- Repository analytics → GitHub API: queries repository (evidence: `repo_analytics.py`)
- Netlify analysis → GitHub API: fetches repository data (evidence: `netlify/functions/analyze.js`)
- Repository owner → CLI pipeline: runs audit (evidence: `README.md`)
