# maeking/geospy architecture

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

- Interactive diagram: https://gitdiagram.com/maeking/geospy
- Repository: https://github.com/maeking/geospy

## Overview

GeoSpy is a Python web service and browser-side monitoring panel presented as an OSINT research tool. The main documented flow is operator configuration and launch, server startup, browser-side collection, server-side recording, and panel review. Sampled source confirms the CLI-to-server and Flask/database relationships; the README describes additional capabilities whose wiring is not visible in the excerpts, so those links are marked unverified. The browser scripts and terminal-color support are shown as product/runtime components, not a deployment map.

Main entry points: [`core/user.py`](https://github.com/maeking/geospy/blob/master/core/user.py) (Visitor routes), [`core/geospy.py`](https://github.com/maeking/geospy/blob/master/core/geospy.py) (GeoSpy controller), [`core/stats.py`](https://github.com/maeking/geospy/blob/master/core/stats.py) (Panel API), [`core/sockets.py`](https://github.com/maeking/geospy/blob/master/core/sockets.py) (Socket service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Launch and control"]
  node_launcher["CLI launcher<br/>[geospy.py]"]
  node_controller["GeoSpy controller<br/>[geospy.py]"]
end

subgraph group_server["Web service"]
  node_web["Panel API<br/>[stats.py]"]
  node_victim_routes["Visitor routes<br/>[user.py]"]
  node_socket_service["Socket service<br/>[sockets.py]"]
  node_tunnel["Public tunnel<br/>[ngrok.py]"]
end

subgraph group_data["Collection and storage"]
  node_database[("SQLite database<br/>[db.py]")]
  node_records["Visitor data models<br/>[user_objects.py]"]
  node_network_scan["Network scanning<br/>[utils.py]"]
end

subgraph group_browser["Browser capabilities"]
  node_browser_monitor["Browser monitoring<br/>[GeoSpy.js]"]
  node_browser_base["Browser base scripts<br/>[base.js]"]
  node_browser_inject["Injection scripts<br/>[inject.js]"]
  node_browser_payload["Collection payload<br/>[payload.js]"]
  node_browser_vscript["Visitor script<br/>[vscript.js]"]
  node_browser_login["Panel login<br/>[login.js]"]
end

subgraph group_runtime["Runtime support"]
  node_url_client["URL client<br/>[urllib2.py]"]
  node_ansi["ANSI codes<br/>[ansi.py]"]
  node_ansi_convert["ANSI conversion<br/>[ansitowin32.py]"]
  node_win_terminal["Windows terminal<br/>[winterm.py]"]
  node_win_api["Windows console API<br/>[win32.py]"]
  node_init_colors["Color initialization<br/>[initialise.py]"]
end

node_operator(("Operator"))

node_operator -->|"starts"| node_launcher
node_launcher -->|"loads"| node_controller
node_launcher -->|"initializes"| node_database
node_controller -->|"starts"| node_socket_service
node_socket_service -->|"uses"| node_victim_routes
node_socket_service -->|"uses"| node_database
node_socket_service -->|"uses"| node_web
node_victim_routes -->|"creates records"| node_records
node_victim_routes -->|"stores data"| node_database
node_victim_routes -->|"uses statistics"| node_web
node_web -->|"queries"| node_database
node_controller -->|"uses"| node_url_client
node_controller -->|"uses"| node_tunnel
node_controller -->|"uses"| node_network_scan
node_operator -.->|"reviews activity"| node_web
node_browser_monitor -.->|"reports visitor data"| node_victim_routes
node_browser_payload -.->|"sends collected data"| node_victim_routes
node_browser_inject -.->|"supports injection"| node_victim_routes
node_browser_vscript -.->|"supports hooks"| node_victim_routes
node_browser_login -.->|"authenticates"| node_web
node_controller -.->|"publishes service"| node_tunnel
node_ansi_convert -->|"uses codes"| node_ansi
node_ansi_convert -->|"calls terminal"| node_win_terminal
node_ansi_convert -->|"checks API"| node_win_api
node_win_terminal -->|"calls console API"| node_win_api
node_init_colors -->|"initializes"| node_ansi_convert

click node_launcher "https://github.com/maeking/geospy/blob/master/geospy.py"
click node_controller "https://github.com/maeking/geospy/blob/master/core/geospy.py"
click node_web "https://github.com/maeking/geospy/blob/master/core/stats.py"
click node_victim_routes "https://github.com/maeking/geospy/blob/master/core/user.py"
click node_socket_service "https://github.com/maeking/geospy/blob/master/core/sockets.py"
click node_database "https://github.com/maeking/geospy/blob/master/core/db.py"
click node_records "https://github.com/maeking/geospy/blob/master/core/user_objects.py"
click node_browser_monitor "https://github.com/maeking/geospy/blob/master/static/js/GeoSpy.js"
click node_browser_base "https://github.com/maeking/geospy/blob/master/static/js/base.js"
click node_browser_inject "https://github.com/maeking/geospy/blob/master/static/js/inject.js"
click node_browser_payload "https://github.com/maeking/geospy/blob/master/static/js/payload.js"
click node_browser_vscript "https://github.com/maeking/geospy/blob/master/static/js/vscript.js"
click node_browser_login "https://github.com/maeking/geospy/blob/master/static/js/login.js"
click node_tunnel "https://github.com/maeking/geospy/blob/master/core/ngrok.py"
click node_network_scan "https://github.com/maeking/geospy/blob/master/core/utils.py"
click node_url_client "https://github.com/maeking/geospy/blob/master/core/dependence/urllib2.py"
click node_ansi "https://github.com/maeking/geospy/blob/master/core/colorama/ansi.py"
click node_ansi_convert "https://github.com/maeking/geospy/blob/master/core/colorama/ansitowin32.py"
click node_win_terminal "https://github.com/maeking/geospy/blob/master/core/colorama/winterm.py"
click node_win_api "https://github.com/maeking/geospy/blob/master/core/colorama/win32.py"
click node_init_colors "https://github.com/maeking/geospy/blob/master/core/colorama/initialise.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_launcher,node_controller toneBlue
class node_web,node_victim_routes,node_socket_service,node_tunnel toneAmber
class node_database,node_records,node_network_scan toneMint
class node_browser_monitor,node_browser_base,node_browser_inject,node_browser_payload,node_browser_vscript,node_browser_login toneRose
class node_url_client,node_ansi,node_ansi_convert,node_win_terminal,node_win_api,node_init_colors,node_operator toneIndigo
```

## Components

### Launch and control

- [CLI launcher](https://github.com/maeking/geospy/blob/master/geospy.py): `geospy.py`
- [GeoSpy controller](https://github.com/maeking/geospy/blob/master/core/geospy.py): `core/geospy.py`

### Web service

- [Panel API](https://github.com/maeking/geospy/blob/master/core/stats.py): `core/stats.py`
- [Visitor routes](https://github.com/maeking/geospy/blob/master/core/user.py): `core/user.py`
- [Socket service](https://github.com/maeking/geospy/blob/master/core/sockets.py): `core/sockets.py`
- [Public tunnel](https://github.com/maeking/geospy/blob/master/core/ngrok.py): `core/ngrok.py`

### Collection and storage

- [SQLite database](https://github.com/maeking/geospy/blob/master/core/db.py): `core/db.py`
- [Visitor data models](https://github.com/maeking/geospy/blob/master/core/user_objects.py): `core/user_objects.py`
- [Network scanning](https://github.com/maeking/geospy/blob/master/core/utils.py): `core/utils.py`

### Browser capabilities

- [Browser monitoring](https://github.com/maeking/geospy/blob/master/static/js/GeoSpy.js): `static/js/GeoSpy.js`
- [Browser base scripts](https://github.com/maeking/geospy/blob/master/static/js/base.js): `static/js/base.js`
- [Injection scripts](https://github.com/maeking/geospy/blob/master/static/js/inject.js): `static/js/inject.js`
- [Collection payload](https://github.com/maeking/geospy/blob/master/static/js/payload.js): `static/js/payload.js`
- [Visitor script](https://github.com/maeking/geospy/blob/master/static/js/vscript.js): `static/js/vscript.js`
- [Panel login](https://github.com/maeking/geospy/blob/master/static/js/login.js): `static/js/login.js`

### Runtime support

- [URL client](https://github.com/maeking/geospy/blob/master/core/dependence/urllib2.py): `core/dependence/urllib2.py`
- [ANSI codes](https://github.com/maeking/geospy/blob/master/core/colorama/ansi.py): `core/colorama/ansi.py`
- [ANSI conversion](https://github.com/maeking/geospy/blob/master/core/colorama/ansitowin32.py): `core/colorama/ansitowin32.py`
- [Windows terminal](https://github.com/maeking/geospy/blob/master/core/colorama/winterm.py): `core/colorama/winterm.py`
- [Windows console API](https://github.com/maeking/geospy/blob/master/core/colorama/win32.py): `core/colorama/win32.py`
- [Color initialization](https://github.com/maeking/geospy/blob/master/core/colorama/initialise.py): `core/colorama/initialise.py`

### Other components

- **Operator**

## Connections

- Operator → CLI launcher: starts (evidence: `README.md`)
- CLI launcher → GeoSpy controller: loads (evidence: `geospy.py`)
- CLI launcher → SQLite database: initializes (evidence: `geospy.py`)
- GeoSpy controller → Socket service: starts (evidence: `core/geospy.py`)
- Socket service → Visitor routes: uses (evidence: `core/sockets.py`)
- Socket service → SQLite database: uses (evidence: `core/sockets.py`)
- Socket service → Panel API: uses (evidence: `core/sockets.py`)
- Visitor routes → Visitor data models: creates records (evidence: `core/user.py`)
- Visitor routes → SQLite database: stores data (evidence: `core/user.py`)
- Visitor routes → Panel API: uses statistics (evidence: `core/user.py`)
- Panel API → SQLite database: queries (evidence: `core/stats.py`)
- GeoSpy controller → URL client: uses (evidence: `core/geospy.py`)
- GeoSpy controller → Public tunnel: uses (evidence: `core/geospy.py`)
- GeoSpy controller → Network scanning: uses (evidence: `core/geospy.py`)
- Operator → Panel API: reviews activity (evidence: `README.md`)
- Browser monitoring → Visitor routes: reports visitor data (evidence: `README.md`)
- Collection payload → Visitor routes: sends collected data (evidence: `README.md`)
- Injection scripts → Visitor routes: supports injection (evidence: `README.md`)
- Visitor script → Visitor routes: supports hooks (evidence: `README.md`)
- Panel login → Panel API: authenticates (evidence: `README.md`)
- GeoSpy controller → Public tunnel: publishes service (evidence: `README.md`)
- ANSI conversion → ANSI codes: uses codes (evidence: `core/colorama/ansitowin32.py`)
- ANSI conversion → Windows terminal: calls terminal (evidence: `core/colorama/ansitowin32.py`)
- ANSI conversion → Windows console API: checks API (evidence: `core/colorama/ansitowin32.py`)
- Windows terminal → Windows console API: calls console API (evidence: `core/colorama/winterm.py`)
- Color initialization → ANSI conversion: initializes (evidence: `core/colorama/initialise.py`)
