How alb-310/geogramint works
Project Type and Purpose
• Geogramint is a standalone OSINT geolocation tool for Telegram, shipped as both a GUI desktop application (built on Kivy) and a CLI utility.
• It queries Telegram’s “People Nearby” API, processes the returned user/group data, visualizes it on a map or prints it to the console, and caches results locally.
Top-Level Architecture and Components
A. User Interfaces
1. GUI Layer
– geogramint.py (entry point)
– geogramint.kv + mapfiles/… (.kv and .py files under mapfiles)
– kivy_garden/mapview widget for map display
2. CLI Layer
– CLI/geogramint_cli.py (main CLI dispatcher)
– CLI/*_cli.py modules for commands: settings, resources, surveillance, TelegramAPIRequests_CLI
B. API Layer
– api/TelegramAPIRequests.py (core Telethon-based requests module)
– CLI/TelegramAPIRequests_CLI.py (wrapper for CLI mode)
C. Business Logic / Domain Objects
– utils/Group.py, utils/User.py (data models)
– utils/osintracker_export.py (export logic)
– utils/ressources.py, utils/resultDisplay.py (post-processing, formatting)
– utils/settings.py (in-memory config management)
D. Configuration and Data Storage
– appfiles/config.ini (persistent user settings)
– Geogramint/cache_telegram/ (JSON, CSV result files + profile pictures)
E. External Service
– Telegram API (“People Nearby” endpoint via Telethon)
Relationships & Data Flow
• UI (GUI or CLI) reads/writes configuration → utils/settings → config.ini
• UI issues “start search” command → business logic layer
• Business logic invokes API layer → Telegram API → raw data (JSON)
• API layer returns JSON → utils classes (User, Group) → caching module → writes to cache_telegram
• Business logic forwards processed data to resultDisplay (CLI) or to MapView (GUI)
• CLI prints tabular/JSON summary or invokes osintracker_export to produce CSV/HTML
Key Architectural Patterns & Principles
• Separation of Concerns: clear UI / API / domain / persistence layers
• MVC-style in GUI: .py files handle logic, .kv files handle view definitions
• Modular command structure in CLI: one file per command submodule
• Config-driven behavior: all credentials and preferences live in config.ini