A comprehensive browser extension that generates fake data for web forms using the Gofakeit library. This extension provides multiple ways to generate realistic fake data for testing and development purposes, supporting both Chrome and Firefox browsers.
- Smart Form Detection: Automatically detects and fills form fields with appropriate fake data
- Multiple Input Types: Supports text, email, phone, password, date/time, number, color, checkbox, radio, and select inputs
- Right-Click Context Menu: Quick access to 200+ Gofakeit functions via right-click menu
- Interactive Selection Mode: Click to select specific areas for data generation
- Popup Interface: Bulk form filling with autofill options and settings
- Password Generator: Built-in secure password generation
- UUID Generator: Generate UUIDs for testing purposes
- Real-time Notifications: Visual feedback for successful and failed operations
- Cross-Browser Support: Works on both Chrome (Manifest V3) and Firefox (Manifest V2)
- Settings Persistence: Save autofill preferences across browser sessions
Chrome Web Store: Install from Chrome Web Store (coming soon) Firefox Add-ons: Install from Firefox Add-ons (coming soon)
git clone https://github.com/brianvoe/gofakeit_extension.git
cd gofakeit_extension
npm install
npm run dev # For Chrome development with hot reload
npm run dev:firefox # For Firefox development with hot reload
- Clone this repository
- Run
npm install
to install dependencies - Run
npm run build:chrome
for Chrome ornpm run build:firefox
for Firefox - Load the appropriate
dist
folder as an unpacked extension:- Chrome:
dist/chrome-mv3/
- Firefox:
dist/firefox-mv2/
- Chrome:
npm run dev
- Start Chrome development server with hot reloadnpm run dev:firefox
- Start Firefox development server with hot reloadnpm run build
- Build for both Chrome and Firefoxnpm run build:chrome
- Build for Chrome onlynpm run build:firefox
- Build for Firefox onlynpm run zip
- Create zip files for both browsersnpm run clean
- Remove the dist foldernpm test
- Run test suite
entrypoints/
βββ background/
β βββ index.ts # Background script entry point
β βββ context-menu.ts # Context menu creation and handling
βββ content/
β βββ index.ts # Content script entry point
β βββ autofill-service.ts # Autofill logic and gofakeit integration
β βββ message-handler.ts # Message handling between popup and content
β βββ notifications.ts # Toast notification system
β βββ selection.ts # Interactive selection mode
β βββ styles.css # Content script styles
βββ popup/
βββ index.html # Popup HTML
βββ main.ts # Popup script
βββ autofill-options.ts # Autofill settings modal
βββ password-generator.ts # Password generator functionality
βββ uuid-generator.ts # UUID generator functionality
βββ styles.css # Popup styles
public/
βββ images/ # Extension icons and assets
βββ variables.css # CSS variables for consistent styling
AutofillService
: Handles all autofill operations using the Gofakeit libraryMessageHandler
: Manages communication between popup and content scriptsNotification
: Provides visual feedback for user actionsSelection
: Interactive mode for selecting specific form areas
- WXT: Modern web extension framework for cross-browser compatibility
- TypeScript: Full type safety and modern JavaScript features
- Vite: Fast build tool with hot module replacement
- Gofakeit: Comprehensive fake data generation library
- Text Inputs:
text
,email
,tel
,password
,search
,url
,color
- Date/Time:
date
,time
,datetime-local
,month
,week
- Numbers:
number
,range
- Selections:
checkbox
,radio
,select
,textarea
- Click the Gofakeit extension icon
- Choose "Autofill All" to fill all form fields on the page
- Choose "Autofill Selected" to enter selection mode
- Use the password generator and UUID generator tools
- Access autofill settings to customize behavior
- Right-click on any form field
- Select "Gofakeit" from the context menu
- Choose from popular functions or browse the full list
- Select a specific function to apply to that field
- Click the extension icon and select "Autofill Selected"
- Click on form fields or containers to generate data
- The extension will detect the field type and apply appropriate data
- Auto Mode: Automatically detects field types and applies appropriate data
- Manual Mode: Requires explicit user selection for each field
- Stagger Timing: Control the delay between filling multiple fields
- Badge Duration: Set how long success/error badges are displayed
The extension uses the Gofakeit library to generate realistic fake data. The library provides 200+ functions for generating various types of test data.
- Personal:
firstname
,lastname
,email
,phone
,address
,city
,state
,zip
,ssn
,date
,age
- Business:
company
,job
,department
,url
,username
- Financial:
creditcard
,currency
,account
,routing
- Technical:
uuid
,ipv4
,ipv6
,mac
,password
- Text:
word
,sentence
,paragraph
,lorem
- Numbers:
number
,digit
,price
- Colors:
hexcolor
,rgb
- Entertainment:
moviename
,gamertag
,animal
,color
The extension fetches the complete list of available functions from the Gofakeit API to populate the right-click context menu, ensuring users always have access to the latest data generation capabilities.
- Build the extension:
npm run build:chrome
ornpm run build:firefox
- Load in browser as unpacked extension
- Navigate to any form-heavy website
- Test various input types and functions
- Test both popup and right-click functionality
- Use
npm run dev
for Chrome ornpm run dev:firefox
for Firefox development - Use
npm run clean
to remove the dist folder if needed - Check browser console for detailed logging
- Test cross-browser compatibility between Chrome and Firefox
- Run
npm test
to execute the test suite - Tests cover core functionality, error handling, and edge cases
- Continuous integration ensures code quality
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow TypeScript best practices
- Use WXT framework conventions for cross-browser compatibility
- Add proper error handling and user feedback
- Include console logging for debugging
- Test with multiple input types and browsers
- Update documentation for new features
- Ensure all new features work in both Chrome and Firefox
This project is licensed under the MIT License - see the LICENSE file for details.