# ayaan1911/eidolon architecture

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

- Interactive diagram: https://gitdiagram.com/ayaan1911/eidolon
- Repository: https://github.com/ayaan1911/eidolon

## Overview

Eidolon helps users inspect public exposure, understand findings, and manually deploy decoys. The main workflow runs email, photo, and repository checks, collects results in a browser-session dossier, and exports a case report; password checking is standalone. A separate admin Trap Lab creates decoys and reviews stored visits. The graph preserves these product stages and the API’s storage and external integrations. Some frontend and backend modules were not excerpted, so their internal connections are included only where the README documents them.

Main entry points: [`frontend/src/App.jsx`](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/App.jsx) (Routes and tools), [`backend/routers/traps.py`](https://github.com/ayaan1911/eidolon/blob/main/backend/routers/traps.py) (Trap endpoints), [`backend/routers/exposure.py`](https://github.com/ayaan1911/eidolon/blob/main/backend/routers/exposure.py) (Exposure endpoints), [`frontend/src/context/FindingsContext.jsx`](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/context/FindingsContext.jsx) (Dossier state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Browser experience"]
  node_app["Routes and tools<br/>[App.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_email_ui["Email check<br/>[EmailCheck.jsx]"]
  node_password_ui["Password check<br/>[PasswordCheck.jsx]"]
  node_photo_ui["Photo check<br/>[PhotoCheck.jsx]"]
  node_repo_ui["Repository scan<br/>[RepoScan.jsx]"]
  node_findings["Dossier state"]
  node_dossier["Dossier and report<br/>[Dossier.jsx]"]
  node_report["Case report export<br/>[caseReport.js]"]
  node_trap_ui["Trap Lab<br/>[TrapLab.jsx]"]
  node_admin_token["Admin session<br/>[adminAuth.js]"]
end

subgraph group_exposure["Exposure checks"]
  node_exposure_router["Exposure endpoints<br/>[exposure.py]"]
  node_email_service["Breach lookup<br/>[breach_check.py]"]
  node_photo_service["Photo metadata<br/>[photo_metadata.py]"]
  node_repo_service["GitHub scanner<br/>[github_scanner.py]"]
end

subgraph group_decoys["Decoy operations"]
  node_trap_router["Trap endpoints<br/>[traps.py]"]
  node_admin_auth["Admin verification<br/>[admin_auth.py]"]
  node_honeytoken["Decoy key signing<br/>[honeytoken.py]"]
  node_geolocation["Visitor enrichment<br/>[geolocation.py]"]
  node_notifications["Push alerts<br/>[ntfy_alert.py]"]
end

subgraph group_platform["API and state"]
  node_api["FastAPI entrypoint<br/>[main.py]"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_trap_store[("Trap and alert records<br/>[database.py]")]
end

node_visitor(("User / visitor"))
node_github["GitHub"]
node_breach_provider["XposedOrNot"]
node_password_provider["Pwned Passwords"]
node_ip_provider["ipwho.is"]
node_ntfy["ntfy service"]
node_postgres[("Postgres")]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_email_ui
node_app -->|"routes to"| node_password_ui
node_app -->|"routes to"| node_photo_ui
node_app -->|"routes to"| node_repo_ui
node_app -->|"provides state"| node_findings
node_app -->|"routes to"| node_dossier
node_app -->|"routes to"| node_trap_ui
node_email_ui -.->|"adds results"| node_findings
node_photo_ui -.->|"adds results"| node_findings
node_repo_ui -.->|"adds results"| node_findings
node_dossier -->|"reads findings"| node_findings
node_dossier -->|"exports report"| node_report
node_visitor -->|"requests checks"| node_api_client
node_api_client -->|"calls API"| node_api
node_password_ui -->|"sends hash prefix"| node_password_provider
node_api -->|"registers"| node_exposure_router
node_api -->|"registers"| node_trap_router
node_exposure_router -->|"calls"| node_email_service
node_exposure_router -->|"calls"| node_photo_service
node_exposure_router -->|"calls"| node_repo_service
node_email_service -->|"queries"| node_breach_provider
node_repo_service -->|"scans repositories"| node_github
node_exposure_router -->|"validates responses"| node_schemas
node_trap_ui -->|"requests trap actions"| node_api_client
node_api_client -->|"reads token"| node_admin_token
node_trap_router -->|"checks admin"| node_admin_auth
node_trap_router -->|"verifies decoy keys"| node_honeytoken
node_trap_router -->|"stores visits"| node_trap_store
node_trap_store -->|"persists records"| node_postgres
node_trap_router -->|"enriches visitor IP"| node_geolocation
node_geolocation -->|"looks up IP"| node_ip_provider
node_trap_router -->|"schedules alerts"| node_notifications
node_notifications -->|"sends notification"| node_ntfy
node_trap_ui -.->|"deploys decoy URL"| node_visitor

click node_app "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/App.jsx"
click node_api_client "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/services/api.js"
click node_email_ui "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/EmailCheck.jsx"
click node_password_ui "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/PasswordCheck.jsx"
click node_photo_ui "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/PhotoCheck.jsx"
click node_repo_ui "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/RepoScan.jsx"
click node_findings "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/context/FindingsContext.jsx"
click node_dossier "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/Dossier.jsx"
click node_report "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/lib/caseReport.js"
click node_trap_ui "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/TrapLab.jsx"
click node_admin_token "https://github.com/ayaan1911/eidolon/blob/main/frontend/src/lib/adminAuth.js"
click node_api "https://github.com/ayaan1911/eidolon/blob/main/backend/main.py"
click node_exposure_router "https://github.com/ayaan1911/eidolon/blob/main/backend/routers/exposure.py"
click node_email_service "https://github.com/ayaan1911/eidolon/blob/main/backend/services/breach_check.py"
click node_photo_service "https://github.com/ayaan1911/eidolon/blob/main/backend/services/photo_metadata.py"
click node_repo_service "https://github.com/ayaan1911/eidolon/blob/main/backend/services/github_scanner.py"
click node_schemas "https://github.com/ayaan1911/eidolon/blob/main/backend/models/schemas.py"
click node_trap_router "https://github.com/ayaan1911/eidolon/blob/main/backend/routers/traps.py"
click node_admin_auth "https://github.com/ayaan1911/eidolon/blob/main/backend/services/admin_auth.py"
click node_honeytoken "https://github.com/ayaan1911/eidolon/blob/main/backend/services/honeytoken.py"
click node_trap_store "https://github.com/ayaan1911/eidolon/blob/main/backend/database.py"
click node_geolocation "https://github.com/ayaan1911/eidolon/blob/main/backend/services/geolocation.py"
click node_notifications "https://github.com/ayaan1911/eidolon/blob/main/backend/services/ntfy_alert.py"

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_api_client,node_email_ui,node_password_ui,node_photo_ui,node_repo_ui,node_findings,node_dossier,node_report,node_trap_ui,node_admin_token,node_visitor toneBlue
class node_exposure_router,node_email_service,node_photo_service,node_repo_service,node_postgres toneAmber
class node_trap_router,node_admin_auth,node_honeytoken,node_geolocation,node_notifications toneMint
class node_api,node_schemas,node_trap_store toneRose
class node_github,node_breach_provider,node_password_provider,node_ip_provider,node_ntfy toneIndigo
```

## Components

### Browser experience

- [Routes and tools](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [API client](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [Email check](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/EmailCheck.jsx): `frontend/src/components/EmailCheck.jsx`
- [Password check](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/PasswordCheck.jsx): `frontend/src/components/PasswordCheck.jsx`
- [Photo check](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/PhotoCheck.jsx): `frontend/src/components/PhotoCheck.jsx`
- [Repository scan](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/RepoScan.jsx): `frontend/src/components/RepoScan.jsx`
- [Dossier state](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/context/FindingsContext.jsx): `frontend/src/context/FindingsContext.jsx`
- [Dossier and report](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/Dossier.jsx): `frontend/src/components/Dossier.jsx`
- [Case report export](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/lib/caseReport.js): `frontend/src/lib/caseReport.js`
- [Trap Lab](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/components/TrapLab.jsx): `frontend/src/components/TrapLab.jsx`
- [Admin session](https://github.com/ayaan1911/eidolon/blob/main/frontend/src/lib/adminAuth.js): `frontend/src/lib/adminAuth.js`

### Exposure checks

- [Exposure endpoints](https://github.com/ayaan1911/eidolon/blob/main/backend/routers/exposure.py): `backend/routers/exposure.py`
- [Breach lookup](https://github.com/ayaan1911/eidolon/blob/main/backend/services/breach_check.py): `backend/services/breach_check.py`
- [Photo metadata](https://github.com/ayaan1911/eidolon/blob/main/backend/services/photo_metadata.py): `backend/services/photo_metadata.py`
- [GitHub scanner](https://github.com/ayaan1911/eidolon/blob/main/backend/services/github_scanner.py): `backend/services/github_scanner.py`

### Decoy operations

- [Trap endpoints](https://github.com/ayaan1911/eidolon/blob/main/backend/routers/traps.py): `backend/routers/traps.py`
- [Admin verification](https://github.com/ayaan1911/eidolon/blob/main/backend/services/admin_auth.py): `backend/services/admin_auth.py`
- [Decoy key signing](https://github.com/ayaan1911/eidolon/blob/main/backend/services/honeytoken.py): `backend/services/honeytoken.py`
- [Visitor enrichment](https://github.com/ayaan1911/eidolon/blob/main/backend/services/geolocation.py): `backend/services/geolocation.py`
- [Push alerts](https://github.com/ayaan1911/eidolon/blob/main/backend/services/ntfy_alert.py): `backend/services/ntfy_alert.py`

### API and state

- [FastAPI entrypoint](https://github.com/ayaan1911/eidolon/blob/main/backend/main.py): `backend/main.py`
- [API schemas](https://github.com/ayaan1911/eidolon/blob/main/backend/models/schemas.py): `backend/models/schemas.py`
- [Trap and alert records](https://github.com/ayaan1911/eidolon/blob/main/backend/database.py): `backend/database.py`

### Other components

- **User / visitor**
- **GitHub**
- **XposedOrNot**
- **Pwned Passwords**
- **ipwho.is**
- **ntfy service**
- **Postgres**

## Connections

- User / visitor → Routes and tools: uses (evidence: `frontend/src/App.jsx`)
- Routes and tools → Email check: routes to (evidence: `frontend/src/App.jsx`)
- Routes and tools → Password check: routes to (evidence: `frontend/src/App.jsx`)
- Routes and tools → Photo check: routes to (evidence: `frontend/src/App.jsx`)
- Routes and tools → Repository scan: routes to (evidence: `frontend/src/App.jsx`)
- Routes and tools → Dossier state: provides state (evidence: `frontend/src/App.jsx`)
- Routes and tools → Dossier and report: routes to (evidence: `frontend/src/App.jsx`)
- Routes and tools → Trap Lab: routes to (evidence: `frontend/src/App.jsx`)
- Email check → Dossier state: adds results
- Photo check → Dossier state: adds results
- Repository scan → Dossier state: adds results
- Dossier and report → Dossier state: reads findings (evidence: `frontend/src/components/Dossier.jsx`)
- Dossier and report → Case report export: exports report (evidence: `frontend/src/components/Dossier.jsx`)
- User / visitor → API client: requests checks
- API client → FastAPI entrypoint: calls API
- Password check → Pwned Passwords: sends hash prefix
- FastAPI entrypoint → Exposure endpoints: registers (evidence: `backend/main.py`)
- FastAPI entrypoint → Trap endpoints: registers (evidence: `backend/main.py`)
- Exposure endpoints → Breach lookup: calls (evidence: `backend/routers/exposure.py`)
- Exposure endpoints → Photo metadata: calls (evidence: `backend/routers/exposure.py`)
- Exposure endpoints → GitHub scanner: calls (evidence: `backend/routers/exposure.py`)
- Breach lookup → XposedOrNot: queries
- GitHub scanner → GitHub: scans repositories
- Exposure endpoints → API schemas: validates responses (evidence: `backend/routers/exposure.py`)
- Trap Lab → API client: requests trap actions (evidence: `frontend/src/components/TrapLab.jsx`)
- API client → Admin session: reads token (evidence: `frontend/src/services/api.js`)
- Trap endpoints → Admin verification: checks admin (evidence: `backend/routers/traps.py`)
- Trap endpoints → Decoy key signing: verifies decoy keys (evidence: `backend/routers/traps.py`)
- Trap endpoints → Trap and alert records: stores visits (evidence: `backend/routers/traps.py`)
- Trap and alert records → Postgres: persists records
- Trap endpoints → Visitor enrichment: enriches visitor IP (evidence: `backend/routers/traps.py`)
- Visitor enrichment → ipwho.is: looks up IP
- Trap endpoints → Push alerts: schedules alerts (evidence: `backend/routers/traps.py`)
- Push alerts → ntfy service: sends notification
- Trap Lab → User / visitor: deploys decoy URL
