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 assetsA few conventions:
- Keep entrypoints thin:
entrypoints/only registers and mounts; logic lives inbackground/andfeatures/ - All copy goes through
t(): user-visible strings belong insrc/locales/zh_CN/with English added toen/in the same change — seeCLAUDE.mdin the repo - Persistence goes through
utils/settings.ts(storage.defineItem); anything included in backups must also be added toutils/backup.ts
Local development
bash
pnpm install
pnpm dev # Chrome
pnpm dev:firefox # FirefoxChecks and builds:
bash
pnpm compile
pnpm lint
pnpm format:check
pnpm build / pnpm build:firefox
pnpm zip / pnpm zip:firefoxScreenshot 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 versionRelease process
See docs/publishing.md in the main repo.