Skip to content

Repository files navigation

Domain Swapper Pro

Domain Swapper Pro

Switch between development environments in one click

A powerful Chrome extension for developers who work across multiple environments.
Instantly switch between dev, staging, QA, and production URLs while preserving your current path.


Features

Feature Description
One-Click Switching Swap domains instantly while keeping your URL path intact
Port Support Full support for localhost and custom ports (e.g., localhost:3000)
Keyboard Shortcuts Alt+D to open, Alt+Shift+D for quick swap to last used domain
Folder Organization Group related domains with nested subfolders
Drag & Drop Reorder domains and folders with ease
Fuzzy Search Find domains quickly with smart search
Dark Mode Automatic theme detection with manual override
Import/Export Backup and share your domain configurations
Context Menu Right-click to swap domains directly from any page
Protocol Control Per-domain protocol settings (HTTP/HTTPS/Preserve)
Ignore Path Prefixes Strip locale or environment prefixes (e.g., /he-il, /en-us) when swapping to a domain

Installation

From Chrome Web Store

Install Domain Swapper Pro

From Source (Developer Mode)

Prerequisites

  • Node.js v18 or higher
  • npm or yarn

Steps

  1. Clone the repository

    git clone https://github.com/yourusername/domain-swapper-pro.git
    cd domain-swapper-pro
  2. Install dependencies

    npm install
  3. Build the extension

    npm run build
  4. Load in Chrome

    • Open Chrome and navigate to chrome://extensions
    • Enable Developer mode (toggle in top right)
    • Click Load unpacked
    • Select the dist folder from the project directory

Usage

Adding Domains

  1. Click the extension icon to open the popup
  2. Click Add Domain to add a new environment URL
  3. Enter the domain (e.g., localhost:3000, staging.example.com, app.example.com)
  4. Optionally add a label and select a folder

Switching Domains

  • Click any domain in the list to swap your current tab's URL
  • Right-click on any page and use the context menu
  • Press Alt+Shift+D to instantly swap to your last used domain

Organizing with Folders

  • Create folders to group domains by project or environment type
  • Drag and drop to reorder domains and folders
  • Collapse folders to keep your list tidy

Keyboard Shortcuts

Shortcut Action
Alt+D Open Domain Swapper popup
Alt+Shift+D Quick swap to last used domain

Customize shortcuts at chrome://extensions/shortcuts


Examples

Development Workflow

Switch between environments while keeping your current path:

Current URL Target Domain Result
localhost:3000/dashboard/users staging.app.com https://staging.app.com/dashboard/users
staging.app.com/api/v1/users localhost:8080 http://localhost:8080/api/v1/users
app.example.com/settings dev.example.com https://dev.example.com/settings
y.co.il/he-il/page x.co.il (ignores he-il) https://x.co.il/page

Development

Start the development server with hot reload:

npm run dev

The extension will automatically reload when you make changes.

Available Scripts

Command Description
npm run dev Start development server with hot reload
npm run build Build for production
npm run preview Preview production build
npm run typecheck Run TypeScript type checking

Project Structure

domain-swapper-pro/
├── src/
│   ├── background/     # Service worker & handlers
│   ├── lib/            # Utilities (URL parsing, validators)
│   ├── popup/          # Popup UI components
│   ├── options/        # Options page
│   ├── store/          # Zustand state management
│   ├── styles/         # Global styles
│   └── types/          # TypeScript types
├── icons/              # Extension icons
├── manifest.json       # Extension manifest
└── vite.config.ts      # Vite configuration

Tech Stack

  • React 18 — UI framework
  • TypeScript — Type safety
  • Vite — Build tool with CRXJS plugin
  • Tailwind CSS — Styling
  • Zustand — State management
  • Radix UI — Accessible components
  • dnd-kit — Drag and drop

Privacy

Domain Swapper Pro:

  • Stores all data locally in your browser
  • Does not collect or transmit any personal information
  • Only requires minimal permissions necessary for functionality

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


License

MIT

About

A powerful Chrome extension for developers who work across multiple environments. Instantly switch between dev, staging, QA, and production URLs while preserving your current path.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages