How rajpoot-vikas/extension works
Project type and purpose
• This is a browser-extension template (“WXT + React”) that scaffolds a WebExtension using React, TypeScript, Tailwind CSS, Vite, and the WXT toolkit.
• It provides three entrypoints: a background script, a content script injected into web pages, and a side-panel React UI.
File structure
• Top-level: configuration files (.gitignore, Dockerfile, tsconfig.json, vite.config.ts, wxt.config.ts), package.json, components.json.
• src/entrypoints:
• background.ts – the persistent background service worker
• content.ts – the script running in page context
• sidepanel/ – the React-based UI loaded into the extension side panel, with its own index.html, index.tsx, component tree, and a workflow context provider
• src/components: reusable UI primitives (button, etc.)
• src/lib: shared types, message-bus definitions, utility functions, workflow types