WXT + SolidJS + DaisyUI
Current project is a browser extension to translate text on web pages. Adapt to major translation platforms and LLMs, including Google Translate, Bing, DeepL, ChatGPT, Claude, Gemini, etc.
Unlike the traditional translation implementation, the extension will append the translated text to the original text, allowing users to see both versions side by side.
.output/: All build artifacts will go here.wxt/: Generated by WXT, it contains TS configassets/: Contains all CSS, images, and other assets that should be processed by WXTcomponents/: Contains UI componentsentrypoints/: Contains all the entrypoints that get bundled into your extensionhooks/: Contains source code for your project's hooks for React and Solidmodules/: Contains local WXT Modules for your projectpublic/: Contains any files you want to copy into the output folder as-is, without being processed by WXTutils/: Contains generic utilities used throughout your project.env: Contains Environment Variables.env.publish: Contains Environment Variables for publishingapp.config.ts: Contains Runtime Configpackage.json: The standard file used by your package managertsconfig.json: Config telling TypeScript how to behaveweb-ext.config.ts: Configure Browser Startupwxt.config.ts: The main config file for WXT projects
bun run dev- Start development server with hot reloadbun run dev:firefox- Start development server for Firefoxbun run build- Build the extension for Chromebun run build:firefox- Build the extension for Firefoxbun run zip- Package extension into zip filebun run zip:firefox- Package Firefox extensionbun run compile- Run TypeScript type checking (no emit)bun run lint- Run Biome linter to check code stylebun run lint:fix- Run Biome linter to fix code stylebun run lint:fix:unsafe- Run Biome linter to fix code style (with unsafe fix)
- Always use context7 when code generation is needed, setup or configuration steps, or library/API documentation. This means you should automatically use the Context7 MCP tools to resolve library id and get library docs without me having to explicitly ask.
- Keep reactivity in SolidJS by avoiding direct destructuring of props or store/signal values. For example, avoid:
export default (props: Props) => {
const { name } = props; // ❌: breaks reactivity and will not update when the prop value changes
const name = props.name; // ❌: another example of breaking reactivity
const name = () => props.name; // ✓: by wrapping `props.name` into a function, `name()` always retrieves its current value
// Same for `createStore` and `createSignal`.
}- When implementing new features including text content, first add a placeholder key in
locales/en.toml, then use the key by:
import { t } from '~/utils/i18n';
export default () => {
return <div>{t('your_placeholder_key')}</div>;
};- If user is asking for "add missing i18n keys", you can run
bun run ./scripts/diff-locales.tsto get the missing keys compared tolocales/en.toml.