PHPackages                             automattic/jetpack-my-jetpack - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. automattic/jetpack-my-jetpack

ActiveJetpack-library[Admin Panels](/categories/admin)

automattic/jetpack-my-jetpack
=============================

WP Admin page with information and configuration shared among all Jetpack stand-alone plugins

v5.33.0(1mo ago)232.8k↓38.5%18GPL-2.0-or-laterPHPPHP &gt;=7.2CI passing

Since Nov 30Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/Automattic/jetpack-my-jetpack)[ Packagist](https://packagist.org/packages/automattic/jetpack-my-jetpack)[ RSS](/packages/automattic-jetpack-my-jetpack/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependencies (36)Versions (367)Used By (8)

My Jetpack
==========

[](#my-jetpack)

WP Admin page with information and configuration shared among all Jetpack stand-alone plugins

Overview
--------

[](#overview)

My Jetpack is a centralized WordPress admin page that provides a unified interface for managing all Jetpack products and services. It serves as the main dashboard where users can view, install, configure, and manage their Jetpack products.

Usage
-----

[](#usage)

Every Jetpack plugin must include the My Jetpack package.

Require this package and initialize it:

```
add_action( 'init', function() {
 Automattic\Jetpack\My_Jetpack\Initializer::init();
} );
```

### Conditionally loading licensing UI behind a feature flag

[](#conditionally-loading-licensing-ui-behind-a-feature-flag)

To disable the licensing UI at `/wp-admin/admin.php?page=my-jetpack#/add-license`, add a filter on `jetpack_my_jetpack_should_enable_add_license_screen` and return false: `add_filter( 'jetpack_my_jetpack_should_enable_add_license_screen', '__return_false' );`

Architecture
------------

[](#architecture)

### Core Components

[](#core-components)

#### PHP Backend (`src/`)

[](#php-backend-src)

- **Initializer** (`class-initializer.php`): Main entry point that sets up admin menu, REST endpoints, and asset enqueuing
- **Products** (`class-products.php`): Core product management system with status constants and lifecycle handling
- **Product Classes** (`src/products/`): Individual product implementations inheriting from base `Product` class
- **REST API** (`class-rest-*.php`): API endpoints for product management, purchases, and AI functionality

#### React Frontend (`_inc/`)

[](#react-frontend-_inc)

- **Main App** (`admin.jsx`): Entry point with React Router setup
- **Components** (`components/`): Reusable UI components for product cards, screens, and interstitials
- **Data Layer** (`data/`): Custom hooks and API integration using React Query (see [Data Layer Documentation](./_inc/data/README.md))
- **Context** (`context/`): Global state management for notices and values

### Product System

[](#product-system)

- Products inherit from base `Product` class with standardized interface
- Status constants define product lifecycle: `active`, `inactive`, `needs_plan`, `plugin_absent`, etc.
- Hybrid products can function as both standalone plugins and Jetpack modules
- Product cards dynamically display status, actions, and pricing information

### Key Features

[](#key-features)

- **Connection Management**: Handles WordPress.com site and user connections
- **Product Interstitials**: Purchase/activation flows for each product
- **Onboarding Flow**: Guided setup for new users
- **Licensing**: License key management and validation
- **Activity Log**: Integration with Jetpack activity monitoring
- **Speed Score**: Boost performance metrics integration

### Frontend Architecture

[](#frontend-architecture)

- React 18 with functional components and hooks
- React Router for client-side navigation
- CSS Modules for component styling
- TypeScript for type safety
- Custom data hooks using React Query for API state management

### Build System

[](#build-system)

- Webpack with Jetpack-specific configuration
- Babel for JavaScript transpilation
- Sass for CSS preprocessing
- Asset optimization for production builds
- Textdomain replacement for internationalization

Development
-----------

[](#development)

### Commands

[](#commands)

**Build Commands:**

- `jetpack build packages/my-jetpack` - Build from monorepo root
- `jetpack watch packages/my-jetpack` - Watch mode from monorepo root
- `pnpm run build` - Build from package directory
- `pnpm run test` - Run tests from package directory

### Testing Strategy

[](#testing-strategy)

**Testing:**

- **PHP**: PHPUnit with WordPress test environment and polyfills
- **JavaScript**: Jest with React Testing Library
- **E2E**: Integration with monorepo Playwright setup

### Development Notes

[](#development-notes)

**Code Standards:**

- Uses WordPress coding standards and Jetpack extensions
- Requires WordPress.com connection for full functionality
- Integrates with Jetpack licensing and purchase systems
- Supports feature flags for gradual rollouts
- Compatible with WordPress multisite (when enabled)

API Endpoints
-------------

[](#api-endpoints)

### REST API Patterns

[](#rest-api-patterns)

- **Base namespace**: `jetpack/v4/my-jetpack`
- **Products endpoint**: `/products` - main product data and actions
- **Purchases endpoint**: `/purchases` - user purchase information
- **Feature endpoints**: Various feature-specific endpoints

### Data Flow

[](#data-flow)

1. React components call API via `apiFetch`
2. WordPress routes to appropriate REST controller
3. Controller validates permissions and processes request
4. Product classes handle business logic
5. Response returned to frontend for UI updates

Key Files Reference
-------------------

[](#key-files-reference)

### PHP Files

[](#php-files)

- `src/class-initializer.php` - Main initialization, admin menu setup
- `src/class-products.php` - Core product management, status constants
- `src/products/class-product.php` - Base product class
- `src/class-rest-products.php` - Main products API endpoint
- `src/class-wpcom-products.php` - WordPress.com product integration

### React Files

[](#react-files)

- `_inc/admin.jsx` - Main React application entry point
- `_inc/providers.tsx` - Context providers wrapper
- `_inc/constants.ts` - Route definitions and constants
- `_inc/components/my-jetpack-screen/` - Main dashboard screen
- `_inc/components/product-interstitial/` - Product setup flows
- `_inc/data/` - API hooks and data management using React Query

### Configuration Files

[](#configuration-files)

- `package.json` - Dependencies and scripts
- `webpack.config.js` - Build configuration
- `babel.config.js` - JavaScript transpilation
- `tsconfig.json` - TypeScript configuration

Using this package in your WordPress plugin
-------------------------------------------

[](#using-this-package-in-your-wordpress-plugin)

If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.

Security
--------

[](#security)

Need to report a security vulnerability? Go to  or directly to our security bug bounty site .

License
-------

[](#license)

my-jetpack is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance90

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community35

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor7

7 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

356

Last Release

56d ago

Major Versions

v0.6.13 → v1.0.02022-04-05

v1.8.3 → v2.0.02022-08-09

v2.15.0 → v3.0.02023-06-26

v3.12.2 → v4.0.02023-11-20

v4.37.0 → v5.0.02024-11-14

PHP version history (2 changes)v4.0.0PHP &gt;=7.0

v5.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

![](https://www.gravatar.com/avatar/11609890f6e7a840715f4cfc9622d77ea64b7dfc024df5643fbf8471a18c00f3?d=identicon)[kraft](/maintainers/kraft)

![](https://www.gravatar.com/avatar/5326730499ec14e274f51b9bcc39db6aac0fb38b33849715aae0e2587a2b93df?d=identicon)[jeherve](/maintainers/jeherve)

![](https://www.gravatar.com/avatar/6e220e167e341c28b1aa10bf0bb0374999068329f8683d3187ee3cf6749b8837?d=identicon)[dereksmart](/maintainers/dereksmart)

---

Top Contributors

[![anomiex](https://avatars.githubusercontent.com/u/1030580?v=4)](https://github.com/anomiex "anomiex (440 commits)")[![tbradsha](https://avatars.githubusercontent.com/u/32492176?v=4)](https://github.com/tbradsha "tbradsha (181 commits)")[![oskosk](https://avatars.githubusercontent.com/u/746152?v=4)](https://github.com/oskosk "oskosk (128 commits)")[![CodeyGuyDylan](https://avatars.githubusercontent.com/u/65001528?v=4)](https://github.com/CodeyGuyDylan "CodeyGuyDylan (119 commits)")[![jeherve](https://avatars.githubusercontent.com/u/426388?v=4)](https://github.com/jeherve "jeherve (112 commits)")[![manzoorwanijk](https://avatars.githubusercontent.com/u/18226415?v=4)](https://github.com/manzoorwanijk "manzoorwanijk (106 commits)")[![retrofox](https://avatars.githubusercontent.com/u/77539?v=4)](https://github.com/retrofox "retrofox (104 commits)")[![kraftbj](https://avatars.githubusercontent.com/u/88897?v=4)](https://github.com/kraftbj "kraftbj (77 commits)")[![zinigor](https://avatars.githubusercontent.com/u/374293?v=4)](https://github.com/zinigor "zinigor (65 commits)")[![samiff](https://avatars.githubusercontent.com/u/15803018?v=4)](https://github.com/samiff "samiff (61 commits)")[![coder-karen](https://avatars.githubusercontent.com/u/16754605?v=4)](https://github.com/coder-karen "coder-karen (56 commits)")[![sergeymitr](https://avatars.githubusercontent.com/u/1341249?v=4)](https://github.com/sergeymitr "sergeymitr (54 commits)")[![leogermani](https://avatars.githubusercontent.com/u/971483?v=4)](https://github.com/leogermani "leogermani (53 commits)")[![IanRamosC](https://avatars.githubusercontent.com/u/5714212?v=4)](https://github.com/IanRamosC "IanRamosC (51 commits)")[![gmjuhasz](https://avatars.githubusercontent.com/u/36671565?v=4)](https://github.com/gmjuhasz "gmjuhasz (49 commits)")[![kangzj](https://avatars.githubusercontent.com/u/1425433?v=4)](https://github.com/kangzj "kangzj (48 commits)")[![adamwoodnz](https://avatars.githubusercontent.com/u/1017872?v=4)](https://github.com/adamwoodnz "adamwoodnz (48 commits)")[![renatoagds](https://avatars.githubusercontent.com/u/1663717?v=4)](https://github.com/renatoagds "renatoagds (48 commits)")[![elliottprogrammer](https://avatars.githubusercontent.com/u/11078128?v=4)](https://github.com/elliottprogrammer "elliottprogrammer (44 commits)")[![dhasilva](https://avatars.githubusercontent.com/u/8486249?v=4)](https://github.com/dhasilva "dhasilva (43 commits)")

### Embed Badge

![Health badge](/badges/automattic-jetpack-my-jetpack/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-jetpack-my-jetpack/health.svg)](https://phpackages.com/packages/automattic-jetpack-my-jetpack)
```

###  Alternatives

[automattic/jetpack

Jetpack supercharges your self‑hosted WordPress site with the awesome cloud power of WordPress.com

3621.9k](/packages/automattic-jetpack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
