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:firefoxAfter 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.jsonCommon commands
| Command | Description |
|---|---|
yarn dev | Development mode for Chrome |
yarn dev:firefox | Development mode for Firefox |
yarn build | Production build for Chrome |
yarn build:firefox | Production build for Firefox |
yarn zip | Package a release zip |
yarn compile | TypeScript 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
- Fork the repository
- Create a feature branch with
git checkout -b feature/your-feature - Implement and test your changes
- Open a pull request against
main - Describe what changed and why
Next
- Want to add a new source? Read Add a Dictionary