Project Structure

Note

This page is a work in progress.

Repository root

Path

Contents

extension/

Extension source code and the per-browser manifests (chrome_manifest.json, firefox_manifest.json)

docs/

Sphinx documentation source (this site)

build/

Build output — gitignored, generated by npm run build

scripts/

Developer tooling scripts (param-order checker, lint:guard scanners, release helper)

patches/

patch-package patches for npm dependencies

.github/

CI, docs, and release-publishing workflows; issue and pull request templates

rollup.config.js

Rollup bundler configuration

tsconfig.json

TypeScript compiler configuration

dprint.json

Dprint formatter configuration

eslint.config.js

ESLint configuration

.stylelintrc.json

Stylelint configuration

vitest.config.ts

Vitest test runner configuration

typedoc.json

TypeDoc API documentation configuration

cliff.toml

git-cliff configuration for generated release notes

Extension source (extension/data/)

Path

Contents

init.ts

Content-script entry point: load conditions, settings migrations, module registration

api/

Reddit API wrappers (resources/: comments, flair, wiki, etc.; transport/ is private)

background/

Extension background script and its message handlers

css/

Global CSS (base tokens, the classic theme, legacy injection styles) and Base.module.css

dom/

Page-structure helpers for old Reddit and shreddit, and named UI injection locations

framework/

Core module system: Module, Lifecycle, moduleRegistry, loadConditions

images/

Extension icons and static images

modules/

Individual feature modules (one directory per module)

modules/shared/

Cross-module subsystems (proposals, usernotes, modnotes, removal reasons, settings, etc.)

shared/

Shared React building blocks: app root (app/), controls (controls/), windows (window/)

store/

Redux Toolkit store: settings and cross-component UI feedback (spinner, toasts, context menu)

types/

Ambient type declarations (CSS modules, untyped dependencies)

util/

Pure utility functions (data, infra, persistence, reddit, ui, wiki)

Module layout

Each module under extension/data/modules/<name>/ follows the layered structure described in Module Architecture.

Utility categories (extension/data/util/)

Subdirectory

Contents

data/

Array, async, color, encoding, string, time, pub/sub, sanitizing helpers

infra/

Build environment, logging, platform detection, version, capture guard

persistence/

Settings read/write, migrations, portability, cache

reddit/

Page context detection, mod actions, thing info, background message bridge

ui/

DOM helpers, hooks, icons, listener, markdown, React mount

wiki/

Wiki paths and constants, schema codecs, conflict-safe writes, migrations