A Chrome extension for screen capture and image processing with real-time personalization capabilities.
- React: Used for building the popup UI interface
- CSS: Custom styling for the extension components
- Vite: Modern build tool that provides fast development and optimized production builds
- Node.js: JavaScript runtime environment
FaceShot/
├── public/ # Static assets
│ └── icon.png # Extension icon
├── src/
│ ├── background/ # Background scripts
│ │ └── background.js # Handles extension initialization and state management
│ ├── content/ # Content scripts
│ │ └── content.js # Injected into web pages for screen capture
│ ├── popup/ # Popup UI
│ │ ├── App.jsx # Main popup component
│ │ ├── index.css # Popup styles
│ │ └── main.jsx # Popup entry point
│ └── manifest.json # Extension configuration
├── package.json # Project dependencies and scripts
└── vite.config.js # Vite configuration
This project uses Vite for several key advantages:
- Fast Development: Vite provides an extremely fast development server with hot module replacement
- Optimized Builds: Produces highly optimized production builds
- JSX Support: Built-in support for React JSX without additional configuration
- CSS Processing: Handles CSS imports directly in JavaScript files
The build process is configured to:
- Build the React popup UI
- Copy the background and content scripts to the distribution folder
- Copy the manifest.json and icon to the distribution folder
FaceShot follows the standard Chrome extension architecture with three main components:
- Popup (React): The user interface that appears when clicking the extension icon
- Background Script: Manages the extension's state and handles communication between components
- Content Script: Injected into web pages to capture the screen and process frames
Communication between these components is handled using Chrome's messaging API.