Skip to content

Contributing ​

DevGo is built with WXT + React + TypeScript, styled with Tailwind CSS v4, icons from lucide-react. Chrome MV3 and Firefox builds both ship from this codebase.

Architecture overview ​

text
src/
├─ entrypoints/            # WXT entrypoints (mapped to the manifest automatically)
│  ├─ background.ts        # Background entry: registers listeners only; logic in src/background/
│  ├─ translate.content.ts # Side-by-side page translation
│  ├─ selection.content.tsx# Selection toolbar (translation + AI actions)
│  ├─ github.content.tsx   # GitHub enhancement UI
│  ├─ unlock.content.ts    # Per-site copy/selection unlocking
│  ├─ assistant.content.ts # Assistant bridge: reads page content, lists / runs WebMCP tools
│  ├─ dock.content.tsx     # Floating dock
│  ├─ sidepanel/           # Side panel: AI assistant + page tools
│  ├─ cors-bridge.content.ts / cors-proxy.ts
│  ├─ popup/ options/ newtab/
├─ background/             # Background modules (message routing, proxy, CORS, media sniffing, commands)
├─ api/                    # Translation and lookup API wrappers (llm / translator / microsoft)
├─ features/               # Feature modules (one directory per feature)
├─ ui/                     # Shared UI components (Button / Switch / Tabs / Markdown…)
├─ utils/                  # Settings storage, message protocol, theme, shortcuts, backup, sync
├─ locales/                # Chinese and English copy (zh_CN / en); key types are derived from the
│                          # Chinese files, so a wrong key fails the build
├─ types/                  # Domain types
└─ assets/                 # Styles and static assets

A few conventions:

  • Keep entrypoints thin: entrypoints/ only registers and mounts; logic lives in background/ and features/
  • All copy goes through t(): user-visible strings belong in src/locales/zh_CN/ with English added to en/ in the same change — see CLAUDE.md in the repo
  • Persistence goes through utils/settings.ts (storage.defineItem); anything included in backups must also be added to utils/backup.ts

Local development ​

bash
pnpm install
pnpm dev            # Chrome
pnpm dev:firefox    # Firefox

Checks and builds:

bash
pnpm compile
pnpm lint
pnpm format:check
pnpm build / pnpm build:firefox
pnpm zip / pnpm zip:firefox

Screenshot pipeline ​

Every screenshot on this site is generated by scripts/ui-shots in the main repo — one command regenerates the full set after a UI change. See scripts/ui-shots/README.md there.

bash
pnpm shots -- --all   # Full matrix: 2 languages × 2 themes
pnpm shots:sync       # Copy into this repo's docs/public/shots/ by version

Release process ​

See docs/publishing.md in the main repo.

Released under the MIT License.