# iitc-ce/ingress-intel-total-conversion architecture

> Architecture diagram of the GitHub repository iitc-ce/ingress-intel-total-conversion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/iitc-ce/ingress-intel-total-conversion
- Repository: https://github.com/iitc-ce/ingress-intel-total-conversion

## Overview

##### Primary Components

- Browser Extension/Core (Frontend):
- Subcomponents such as the mapping/data-rendering layer, communication modules with the Ingress intel map, UI components (panes, sidebar, dialogs), and integration with third-party libraries (e.g., Leaflet, jQuery).

- Plugin Architecture:
- “plugins” directory and its extensive collection of feature extensions. Indicate that IITC is designed with a plugin framework and that these plugins can augment default behavior.
- Existence of “pluginwrapper.py” and similar files, which indicate tooling for wrapping or injecting plugins.

- Mobile Application:
- Mobile app component (under “mobile”). This Android project (Java-based) mirrors much of the IITC functionality for mobile users.
- Major parts such as the application class (IITC_Application.java), UI activities (e.g., IntroActivity, ShareActivity), service components (NotificationHelper, MapSettings), and asynchronous tasks.

- External Libraries and Assets:
- “core/external” and “assets” directories. These include third-party libraries (e.g., Leaflet, autolink, jquery-ui) as well as images and CSS used across the project.

- Build and Deployment Pipelines:
- CI/CD aspects by including the GitHub workflows (found in “.github/workflows”) and the build scripts (e.g., build.py, build_mobile.py), which automate the build process.
- “fastlane” directory for mobile builds, representing how the Android app is packaged and deployed.

- Testing and Code Quality:
- A testing component (from the “test” directory for JS unit tests) and linters/config files (eslint.config.js, package.json, prettierrc.json, etc.) to show how code quality is managed.

##### Relationships and Interactions

- Within the Browser Client:
- Primary flow from user interaction (UI components) to core functionality (e.g., map rendering, dialog management, request handling).
- That many of the modules communicate by sharing cached data, event hooks, and asynchronous requests.

- Plugin System:

- Mobile Application:
- Android application’s architecture with its distinct layers (UI layer, logic/service layer, and system integrations).
- Interactions such as communication between the Java activities, asynchronous tasks (for updating maps and scripts), and external mapping libraries (provided within the mobile project).

- Build/Deployment Pipeline:

##### Architectural Patterns and Design Principles

- Modularity and Separation of Concerns:
- Clear separation between the core logic (JavaScript modules handling map data, UI, etc.) and the plugins that can extend functionality.

- Client-Side Enhancement:
- That IITC works as a browser add-on; therefore, much of the design is focused on enhancing an existing web application (the Ingress Intel Map) via injected or dynamic UI components.

- Cross-Platform Strategy:
- For mobile, show how a parallel but native implementation coexists with the browser add-on. This illustrates the project’s design for cross-platform support, with shared design principles even if implemented in different languages.

## Diagram (Mermaid)

```mermaid
graph TD
    subgraph "IITC Browser Extension"
        A["IITC Browser Extension – Core Logic & UI"]:::core
    end

    subgraph "Plugin Architecture"
        B["IITC Plugin System"]:::plugin
    end

    subgraph "External Libraries & Assets"
        C["External Libraries & Assets"]:::external
    end

    subgraph "Mobile Application"
        D["IITC Mobile (Android)"]:::mobile
    end

    subgraph "Build & Deployment Pipeline"
        E["Build & Deployment Pipeline"]:::build
    end

    subgraph "Testing & Code Quality"
        F["Testing & Code Quality"]:::test
    end

    A -->|"registers"| B
    B -->|"extends"| A
    A -->|"uses"| C
    D -->|"usesAPIs"| C
    E -->|"builds"| A
    E -->|"builds"| D
    F -->|"tests"| A
    F -->|"tests"| B
    F -->|"tests"| D

    click A "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/core/code"
    click A "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/core/style.css"
    click B "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/plugins"
    click B "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/pluginwrapper.py"
    click B "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/pluginwrapper_noinject.py"
    click C "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/core/external"
    click C "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/assets"
    click D "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/mobile"
    click E "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/.github/workflows"
    click E "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/build.py"
    click E "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/build_mobile.py"
    click E "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/fastlane"
    click F "https://github.com/iitc-ce/ingress-intel-total-conversion/tree/master/test"
    click F "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/eslint.config.js"
    click F "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/package.json"
    click F "https://github.com/iitc-ce/ingress-intel-total-conversion/blob/master/.prettierrc.json"

    classDef core fill:#F0F8FF,stroke:#000,stroke-width:2px;
    classDef plugin fill:#FFFACD,stroke:#000,stroke-width:2px;
    classDef mobile fill:#E6E6FA,stroke:#000,stroke-width:2px;
    classDef external fill:#FFDAB9,stroke:#000,stroke-width:2px;
    classDef build fill:#E0FFFF,stroke:#000,stroke-width:2px;
    classDef test fill:#F5DEB3,stroke:#000,stroke-width:2px;
```
