Skip to content

Contributing

Thanks for your interest in ClueLens. This guide covers local setup, project structure, and the contribution workflow.

Requirements

  • Node.js 18+
  • Yarn 1.x
  • VS Code is recommended

Quick start

bash
# Clone the repository
git clone https://github.com/cppakko/cluelens.git
cd cluelens

# Install dependencies
yarn install

# Start development for Chrome
yarn dev

# Start development for Firefox
yarn dev:firefox

After yarn dev, WXT builds the extension and launches a configured browser instance with hot reload.

Project structure

text
cluelens/
├── assets/             # Global styles and image assets
├── components/
│   ├── dicts/          # Dictionary and translator modules
│   │   ├── index.tsx   # Metadata registry and module loading
│   │   ├── types.ts    # DictID, ModuleType, and shared types
│   │   ├── shared/     # Shared result views such as CommonView
│   │   ├── bing/       # Individual source modules
│   │   ├── google/
│   │   └── ...
│   ├── panel/          # Lookup panel components
│   └── ui/             # Reusable UI components
├── entrypoints/
│   ├── background.ts   # Background service worker
│   ├── content/        # Content script
│   ├── options/        # Options page
│   ├── popup/          # Popup UI
│   └── sidepanel/      # Side panel UI
├── i18n/               # Localization resources
├── utils/              # Utility functions
│   ├── storage.ts      # Storage definitions
│   ├── messaging.ts    # Message protocol helpers
│   ├── detectLanguage.ts
│   └── ...
├── wxt.config.ts       # WXT configuration
├── tsconfig.json
└── package.json

Common commands

CommandDescription
yarn devDevelopment mode for Chrome
yarn dev:firefoxDevelopment mode for Firefox
yarn buildProduction build for Chrome
yarn build:firefoxProduction build for Firefox
yarn zipPackage a release zip
yarn compileTypeScript type check (tsc --noEmit)

Filing issues

  • Use GitHub Issues
  • Include reproduction steps, browser version, and relevant details
  • Feature requests are also welcome

Sending pull requests

  1. Fork the repository
  2. Create a feature branch with git checkout -b feature/your-feature
  3. Implement and test your changes
  4. Open a pull request against main
  5. Describe what changed and why

Next