# syswow64uwu/peekuwu architecture

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

- Interactive diagram: https://gitdiagram.com/syswow64uwu/peekuwu
- Repository: https://github.com/syswow64uwu/peekuwu

## Overview

PeekUwU is a browser extension/userscript that modifies Reddit pages in place to remove NSFW viewing barriers and optionally promoted ads. The main workflow is browsing Reddit: the page-side core repeatedly scans and changes the DOM, while saved settings control which changes run. Users can adjust those settings in the extension popup; extensions also publish Reddit and browser theme context for popup display. The excerpts show the core, popup, and theme publisher, but not the full browser-specific runtime registration, so that link is documented at the product level rather than treated as inspected wiring.

Main entry points: [`shared/core.js`](https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js) (Page uncensoring), [`shared/popup.js`](https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.js) (Popup controller), [`shared/theme.js`](https://github.com/syswow64uwu/peekuwu/blob/main/shared/theme.js) (Theme publisher), [`shared/popup.html`](https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.html) (Popup interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_page["Reddit page changes"]
  node_core["Page uncensoring<br/>[core.js]"]
  node_gates["Gate removal<br/>[core.js]"]
  node_media["Media unblurring<br/>[core.js]"]
  node_ads["Promoted post removal<br/>[core.js]"]
end

subgraph group_settings["Settings and popup"]
  node_popupview["Popup interface<br/>[popup.html]"]
  node_popup["Popup controller<br/>[popup.js]"]
  node_settingsstore[("Browser settings storage")]
end

subgraph group_theme["Theme context"]
  node_theme["Theme publisher<br/>[theme.js]"]
  node_themedata[("Theme context storage")]
end

node_user(("Reddit browser user"))
node_reddit["Reddit pages"]

node_user -->|"browses"| node_reddit
node_reddit -.->|"page enhancement"| node_core
node_core -->|"removes gates"| node_gates
node_core -->|"unblurs media"| node_media
node_core -->|"conditionally removes"| node_ads
node_popupview -.->|"provides controls"| node_popup
node_popup -->|"loads and saves"| node_settingsstore
node_core -->|"reads settings"| node_settingsstore
node_core -->|"starts publisher"| node_theme
node_theme -->|"publishes theme context"| node_themedata
node_popup -->|"reads theme context"| node_themedata

click node_core "https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js"
click node_gates "https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js"
click node_media "https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js"
click node_ads "https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js"
click node_popupview "https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.html"
click node_popup "https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.js"
click node_theme "https://github.com/syswow64uwu/peekuwu/blob/main/shared/theme.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_core,node_gates,node_media,node_ads,node_user toneBlue
class node_popupview,node_popup,node_settingsstore toneAmber
class node_theme,node_themedata toneMint
class node_reddit toneIndigo
```

## Components

### Reddit page changes

- [Page uncensoring](https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js): `shared/core.js`
- [Gate removal](https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js): `shared/core.js`
- [Media unblurring](https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js): `shared/core.js`
- [Promoted post removal](https://github.com/syswow64uwu/peekuwu/blob/main/shared/core.js): `shared/core.js`

### Settings and popup

- [Popup interface](https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.html): `shared/popup.html`
- [Popup controller](https://github.com/syswow64uwu/peekuwu/blob/main/shared/popup.js): `shared/popup.js`
- **Browser settings storage**

### Theme context

- [Theme publisher](https://github.com/syswow64uwu/peekuwu/blob/main/shared/theme.js): `shared/theme.js`
- **Theme context storage**

### Other components

- **Reddit browser user**
- **Reddit pages**

## Connections

- Reddit browser user → Reddit pages: browses (evidence: `README.md`)
- Reddit pages → Page uncensoring: page enhancement (evidence: `README.md`)
- Page uncensoring → Gate removal: removes gates (evidence: `shared/core.js`)
- Page uncensoring → Media unblurring: unblurs media (evidence: `shared/core.js`)
- Page uncensoring → Promoted post removal: conditionally removes (evidence: `shared/core.js`)
- Popup interface → Popup controller: provides controls
- Popup controller → Browser settings storage: loads and saves (evidence: `shared/popup.js`)
- Page uncensoring → Browser settings storage: reads settings (evidence: `shared/core.js`)
- Page uncensoring → Theme publisher: starts publisher (evidence: `shared/core.js`)
- Theme publisher → Theme context storage: publishes theme context (evidence: `shared/theme.js`)
- Popup controller → Theme context storage: reads theme context (evidence: `shared/popup.js`)
