# ranjithrajv/gitalike architecture

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

- Interactive diagram: https://gitdiagram.com/ranjithrajv/gitalike
- Repository: https://github.com/ranjithrajv/gitalike

## Overview

GitAlike is a browser extension that locally re-skins supported Git forges. The main user flow is choosing a skin or adding a host in the popup, then viewing that host with the selected palette and adapted UI. The README documents vocabulary, navigation, reference-marker, and shortcut changes, plus reversible behavior. Source excerpts do not show the runtime wiring between these stages, so those links are documented at product level; internal dispatch and storage details are left out.

Main entry points: [`src/content/ux-core.js`](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-core.js) (UX adaptation core), [`src/lib/sources.js`](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/sources.js) (Source definitions), [`src/popup/popup.js`](https://github.com/ranjithrajv/gitalike/blob/main/src/popup/popup.js) (Settings popup), [`src/lib/skins.js`](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/skins.js) (Skin definitions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_extension["Extension surfaces"]
  node_popup["Settings popup<br/>[popup.js]"]
  node_background["Background process<br/>[background.js]"]
end

subgraph group_catalog["Forge and skin catalog"]
  node_host_catalog["Host classification<br/>[sites.js]"]
  node_skin_catalog["Skin definitions<br/>[skins.js]"]
  node_source_catalog["Source definitions<br/>[sources.js]"]
  node_plugin_api["Plugin API<br/>[core.js]"]
  node_github_source["GitHub source<br/>[index.js]"]
  node_gitlab_source["GitLab source<br/>[index.js]"]
  node_gitea_source["Gitea source<br/>[index.js]"]
  node_bitbucket_source["Bitbucket source<br/>[index.js]"]
  node_gerrit_source["Gerrit source<br/>[index.js]"]
  node_github_skin["GitHub skin<br/>[index.js]"]
  node_gitlab_skin["GitLab skin<br/>[index.js]"]
  node_bitbucket_skin["Bitbucket skin<br/>[index.js]"]
end

subgraph group_adaptation["Page adaptation"]
  node_theme["Palette adaptation<br/>[theme.js]"]
  node_ux_core["UX adaptation core<br/>[ux-core.js]"]
  node_shadow_open["Gerrit shadow handling"]
end

subgraph group_ux["Semantic UX"]
  node_ux_copy["Vocabulary changes<br/>[ux-copy.js]"]
  node_ux_nav["Navigation changes<br/>[ux-nav.js]"]
  node_ux_profile["Profile changes<br/>[ux-profile.js]"]
  node_ux_project["Project changes<br/>[ux-project.js]"]
  node_ux_tables["UX rules and mappings<br/>[ux.js]"]
end

node_user(("User"))
node_forge["Forge page"]

node_user -->|"chooses skin"| node_popup
node_user -->|"adds host"| node_popup
node_popup -->|"configures appearance"| node_forge
node_forge -->|"receives palette"| node_theme
node_forge -->|"receives adaptation"| node_ux_core
node_ux_core -.->|"changes wording"| node_ux_copy
node_ux_core -.->|"changes navigation"| node_ux_nav
node_ux_core -.->|"adapts profiles"| node_ux_profile
node_ux_core -.->|"adapts projects"| node_ux_project
node_ux_tables -.->|"supplies UX rules"| node_ux_core
node_host_catalog -.->|"supports host setup"| node_popup
node_github_source -.->|"classifies forge"| node_source_catalog
node_gitlab_source -.->|"classifies forge"| node_source_catalog
node_gitea_source -.->|"classifies forge"| node_source_catalog
node_bitbucket_source -.->|"classifies forge"| node_source_catalog
node_gerrit_source -.->|"classifies forge"| node_source_catalog
node_github_skin -.->|"defines target UI"| node_skin_catalog
node_gitlab_skin -.->|"defines target UI"| node_skin_catalog
node_bitbucket_skin -.->|"defines target UI"| node_skin_catalog

click node_popup "https://github.com/ranjithrajv/gitalike/blob/main/src/popup/popup.js"
click node_background "https://github.com/ranjithrajv/gitalike/blob/main/src/background.js"
click node_host_catalog "https://github.com/ranjithrajv/gitalike/blob/main/src/lib/sites.js"
click node_skin_catalog "https://github.com/ranjithrajv/gitalike/blob/main/src/lib/skins.js"
click node_source_catalog "https://github.com/ranjithrajv/gitalike/blob/main/src/lib/sources.js"
click node_plugin_api "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/core.js"
click node_github_source "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/github/index.js"
click node_gitlab_source "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gitlab/index.js"
click node_gitea_source "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gitea/index.js"
click node_bitbucket_source "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/bitbucket/index.js"
click node_gerrit_source "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gerrit/index.js"
click node_github_skin "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/github/index.js"
click node_gitlab_skin "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/gitlab/index.js"
click node_bitbucket_skin "https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/bitbucket/index.js"
click node_theme "https://github.com/ranjithrajv/gitalike/blob/main/src/content/theme.js"
click node_ux_core "https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-core.js"
click node_ux_copy "https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-copy.js"
click node_ux_nav "https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-nav.js"
click node_ux_profile "https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-profile.js"
click node_ux_project "https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-project.js"
click node_ux_tables "https://github.com/ranjithrajv/gitalike/blob/main/src/lib/ux.js"
click node_shadow_open "https://github.com/ranjithrajv/gitalike/blob/main/src/content/gerrit-shadow-open.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_popup,node_background,node_user toneBlue
class node_host_catalog,node_skin_catalog,node_source_catalog,node_plugin_api,node_github_source,node_gitlab_source,node_gitea_source,node_bitbucket_source,node_gerrit_source,node_github_skin,node_gitlab_skin,node_bitbucket_skin toneAmber
class node_theme,node_ux_core,node_shadow_open toneMint
class node_ux_copy,node_ux_nav,node_ux_profile,node_ux_project,node_ux_tables toneRose
class node_forge toneIndigo
```

## Components

### Extension surfaces

- [Settings popup](https://github.com/ranjithrajv/gitalike/blob/main/src/popup/popup.js): `src/popup/popup.js`
- [Background process](https://github.com/ranjithrajv/gitalike/blob/main/src/background.js): `src/background.js`

### Forge and skin catalog

- [Host classification](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/sites.js): `src/lib/sites.js`
- [Skin definitions](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/skins.js): `src/lib/skins.js`
- [Source definitions](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/sources.js): `src/lib/sources.js`
- [Plugin API](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/core.js): `src/plugins/core.js`
- [GitHub source](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/github/index.js): `src/plugins/sources/github/index.js`
- [GitLab source](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gitlab/index.js): `src/plugins/sources/gitlab/index.js`
- [Gitea source](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gitea/index.js): `src/plugins/sources/gitea/index.js`
- [Bitbucket source](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/bitbucket/index.js): `src/plugins/sources/bitbucket/index.js`
- [Gerrit source](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/sources/gerrit/index.js): `src/plugins/sources/gerrit/index.js`
- [GitHub skin](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/github/index.js): `src/plugins/skins/github/index.js`
- [GitLab skin](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/gitlab/index.js): `src/plugins/skins/gitlab/index.js`
- [Bitbucket skin](https://github.com/ranjithrajv/gitalike/blob/main/src/plugins/skins/bitbucket/index.js): `src/plugins/skins/bitbucket/index.js`

### Page adaptation

- [Palette adaptation](https://github.com/ranjithrajv/gitalike/blob/main/src/content/theme.js): `src/content/theme.js`
- [UX adaptation core](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-core.js): `src/content/ux-core.js`
- [Gerrit shadow handling](https://github.com/ranjithrajv/gitalike/blob/main/src/content/gerrit-shadow-open.js): `src/content/gerrit-shadow-open.js`

### Semantic UX

- [Vocabulary changes](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-copy.js): `src/content/ux-copy.js`
- [Navigation changes](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-nav.js): `src/content/ux-nav.js`
- [Profile changes](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-profile.js): `src/content/ux-profile.js`
- [Project changes](https://github.com/ranjithrajv/gitalike/blob/main/src/content/ux-project.js): `src/content/ux-project.js`
- [UX rules and mappings](https://github.com/ranjithrajv/gitalike/blob/main/src/lib/ux.js): `src/lib/ux.js`

### Other components

- **User**
- **Forge page**

## Connections

- User → Settings popup: chooses skin
- User → Settings popup: adds host
- Settings popup → Forge page: configures appearance
- Forge page → Palette adaptation: receives palette
- Forge page → UX adaptation core: receives adaptation
- UX adaptation core → Vocabulary changes: changes wording
- UX adaptation core → Navigation changes: changes navigation
- UX adaptation core → Profile changes: adapts profiles
- UX adaptation core → Project changes: adapts projects
- UX rules and mappings → UX adaptation core: supplies UX rules
- Host classification → Settings popup: supports host setup
- GitHub source → Source definitions: classifies forge
- GitLab source → Source definitions: classifies forge
- Gitea source → Source definitions: classifies forge
- Bitbucket source → Source definitions: classifies forge
- Gerrit source → Source definitions: classifies forge
- GitHub skin → Skin definitions: defines target UI
- GitLab skin → Skin definitions: defines target UI
- Bitbucket skin → Skin definitions: defines target UI
