PHPackages                             hk2/core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. hk2/core

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

hk2/core
========

HK2 Core module - The foundational base module for all Magento 2 HK2 extensions.

1.0.2(1mo ago)0234OSL-3.0PHPPHP ^8.1 || ^8.2 || ^8.3 || ^8.4CI passing

Since May 5Pushed 1mo agoCompare

[ Source](https://github.com/basantmandal/magento2-hk2-core-module)[ Packagist](https://packagist.org/packages/hk2/core)[ RSS](/packages/hk2-core/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (2)Versions (5)Used By (4)

[![Version](https://camo.githubusercontent.com/ea9ef426d7257249967444fc38f23d854e483b614a19030e12feb17fa0bb5ff5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/ea9ef426d7257249967444fc38f23d854e483b614a19030e12feb17fa0bb5ff5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d626c75653f7374796c653d666c61742d737175617265)[![Magento](https://camo.githubusercontent.com/cc7afc3a994043bd5e1bbe18fdecdf4377481f03e2dc7a05728c3174c7da66bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e782d6639373331363f7374796c653d666c61742d737175617265266c6f676f3d6d6167656e746f266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/cc7afc3a994043bd5e1bbe18fdecdf4377481f03e2dc7a05728c3174c7da66bf/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6167656e746f2d322e342e782d6639373331363f7374796c653d666c61742d737175617265266c6f676f3d6d6167656e746f266c6f676f436f6c6f723d7768697465)[![PHP](https://camo.githubusercontent.com/2f2d39f30d9a245b748ead3268e5de0819ddab6c31a393904a4f33652b504e79/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3763336165643f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/2f2d39f30d9a245b748ead3268e5de0819ddab6c31a393904a4f33652b504e79/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3763336165643f7374796c653d666c61742d737175617265266c6f676f3d706870266c6f676f436f6c6f723d7768697465)[![License](https://camo.githubusercontent.com/a3fd2257982f64afbde00a66a8ab5984ee3f6e176f00eb2ec4ea61d862bc113b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4f534c2d2d332e302d677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/a3fd2257982f64afbde00a66a8ab5984ee3f6e176f00eb2ec4ea61d862bc113b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4f534c2d2d332e302d677265656e3f7374796c653d666c61742d737175617265)[![Packagist](https://camo.githubusercontent.com/7d7beacbcd391f79c82b7e8360c7b57e0909431954d370e4dee9b54d7432a746/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f686b322f636f72653f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hk2/core)
[![Website](https://camo.githubusercontent.com/48510337f411c7e193a31e9bdb6802d49664918dac999471dcc705c9a94fa031/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f576562736974652d3030303f7374796c653d666c61742d737175617265266c6f676f3d6b6f2d6669266c6f676f436f6c6f723d7768697465)](https://www.basantmandal.in/)[![LinkedIn](https://camo.githubusercontent.com/f47f622117d99af4d0fcba939449e0949d2301d48601b78a25b6e7e1cf580d3e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e6b6564496e2d3041363643323f7374796c653d666c61742d737175617265266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465)](https://www.linkedin.com/in/basantmandal/)[![Email](https://camo.githubusercontent.com/4fb7fe62859d942d68ae2f48af7c8fb6165e8f1dc236fa5bbc970e01efff28ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456d61696c2d737570706f7274253430626173616e746d616e64616c2e696e2d626c75653f7374796c653d666c61742d737175617265266c6f676f3d676d61696c)](mailto:support@basantmandal.in)

HK2 Core — Foundation Module for Magento 2
==========================================

[](#hk2-core--foundation-module-for-magento-2)

**HK2\_Core** serves as the shared foundation for all HK2 Magento 2 extensions. It establishes common infrastructure — a unified admin configuration tab, a parent admin menu item, a reusable branded header block, and a root ACL resource — that every sibling HK2 module consumes.

This module contains no frontend functionality, no configuration fields of its own, and no database schema. It is purely architectural scaffolding.

---

📄 Overview
----------

[](#-overview)

HK2\_Core is a dependency-only module. It is not designed to provide visible features on its own but to ensure consistency, reduced duplication, and a single point of maintenance across the HK2 extension suite. When multiple HK2 modules are installed, they all share:

- A single **HK2 tab** in Stores &gt; Configuration, eliminating tab clutter.
- A single **HK2 group** in the System menu, keeping the admin sidebar organized.
- A common **ModuleHeader** block rendering the HK2 brand with logo, website, LinkedIn, support, and donate links.

Sibling modules declare a `` on `HK2_Core` in their `module.xml` and reference `HK2_Core::system/config/module_header` in their `system.xml` to render the branded header in their admin configuration sections.

---

🧠 Problem Statement
-------------------

[](#-problem-statement)

Magento 2 extension suites comprising multiple modules face a recurring organizational problem: each module that adds admin configuration tends to register its own tab or place its settings under unrelated existing tabs. The result is a disjointed admin experience — tabs scattered across Stores &gt; Configuration, menu items littered across unrelated sections, and duplicated code for headers, branding, and ACL resources.

Without a shared foundation, each module in a suite must independently manage:

- Its own admin tab registration (creating duplicates or inconsistent naming).
- Its own menu item (cluttering the admin with unrelated entries).
- Its own ACL resource tree (inconsistent hierarchy for permission management).
- Its own header/branding block (duplicated templates, links, and styling).

These problems compound as the suite grows, making maintenance harder, permissions more confusing to configure, and the admin experience less professional.

---

💡 Solution Approach
-------------------

[](#-solution-approach)

HK2\_Core addresses these problems through a dependency-inversion architecture: all shared admin infrastructure lives in a single module that sibling modules depend on. Specifically:

1. **Centralized tab registration** — `etc/adminhtml/system.xml` registers the `hk2_options_tab` once. Sibling modules target this tab ID in their own `system.xml` `` declarations.
2. **Centralized menu registration** — `etc/adminhtml/menu.xml` creates `HK2::root` under `Magento_Backend::system`. Sibling modules add their own `` entries with `parent="HK2::root"`.
3. **Centralized ACL root** — `etc/acl.xml` defines `HK2_Core::root` as the top-level permission. Sibling modules nest their own resources under it.
4. **Reusable branded header** — The `ModuleHeader` block class and its `.phtml` template are packaged once. Sibling modules reference them via layout handle or `system.xml` `frontend_model` without duplicating any code.

This keeps each sibling module focused on its domain logic while the cross-cutting admin presentation concerns live in a single, versioned place.

---

👥 Who is this for?
------------------

[](#-who-is-this-for)

- **Magento 2 store owners** who install one or more HK2 extensions and want a clean, organized admin interface.
- **Magento 2 developers** building or extending HK2 modules who need consistent admin infrastructure without reinventing the wheel.
- **System administrators** who manage user roles and permissions and need a predictable ACL hierarchy for HK2 functionality.
- **Agencies** deploying HK2 modules across multiple client projects who value standardized branding and reduced configuration drift.

---

🎯 Use Cases
-----------

[](#-use-cases)

Use CaseDescription**Multi-module admin organization**When HK2\_AddBootstrap5, HK2\_CspWhitelisting, and HK2\_ScrollTop are installed, all their config pages appear under the single HK2 tab rather than scattered across tabs.**Unified permissions management**An admin can grant or deny access to all HK2 features at once via `HK2_Core::root`, or granularly per sibling module's child resource.**Brand consistency**Each sibling module's configuration page automatically renders the HK2 ModuleHeader with logo and links, ensuring a consistent look.**Reduced maintenance**A branding update (logo URL, support link, etc.) is made in one place and propagates to all modules.---

✨ Key Features
--------------

[](#-key-features)

- **Shared Admin Configuration Tab** (`hk2_options_tab`) — appears in Stores &gt; Configuration with sort order 3000 and label "HK2". All sibling HK2 modules target this tab for their sections.
- **Shared Admin Menu Item** (`HK2::root`) — appears under System menu with sort order 85. Sibling modules nest their menu entries under this parent.
- **Reusable ModuleHeader Block** (`HK2\Core\Block\Adminhtml\System\Config\ModuleHeader`) — renders a branded header with the HK2 logo, website link, LinkedIn profile, support page link, and donate link. Used as the `frontend_model` in sibling module `system.xml` fields.
- **Root ACL Resource** (`HK2_Core::root`) — establishes a single top-level permission node for all HK2 extensions, enabling role-based access control.
- **Zero Frontend Footprint** — no routes, no storefront blocks, no JavaScript, no CSS. The module is entirely admin-side infrastructure.
- **No Database Schema** — no setup patches, no schema tables, no data patches. Purely declarative XML configuration.

---

🏗️ Architecture Overview
------------------------

[](#️-architecture-overview)

```
HK2_Core (this module)
│
├── etc/
│   ├── module.xml              ← Declares module name, version, sequence
│   ├── adminhtml/
│   │   ├── system.xml          ← Registers hk2_options_tab
│   │   └── menu.xml            ← Registers HK2::root under System menu
│   └── acl.xml                 ← Defines HK2_Core::root resource
│
├── Block/
│   └── Adminhtml/System/Config/
│       └── ModuleHeader.php    ← Reusable branded header block
│
├── view/
│   └── adminhtml/templates/system/config/
│       └── module_header.phtml ← Header template (logo, links)
│
└── registration.php            ← Magento component registration

```

**Sibling module consumption pattern** (example: HK2\_AddBootstrap5):

```
HK2_AddBootstrap5
├── etc/
│   ├── module.xml              ←  HK2_Core
│   └── adminhtml/
│       └── system.xml          ← , frontend_model=HK2_Core::...
│
├── etc/adminhtml/menu.xml      ←
└── etc/acl.xml                 ←  >

```

---

📋 System Requirements
---------------------

[](#-system-requirements)

### Supported Magento Versions

[](#supported-magento-versions)

- Magento **2.4.x** (Open Source / Commerce / Cloud)
- `magento/framework` **^103.0.0**

### Supported PHP Versions

[](#supported-php-versions)

- PHP **8.1**
- PHP **8.2**
- PHP **8.3**
- PHP **8.4**

### Platform

[](#platform)

- Magento 2 instance (any edition) running on a standard LAMP/LEMP stack
- Composer 2.x for installation

---

🚀 Installation
--------------

[](#-installation)

Install via Composer:

```
composer require hk2/core
```

Then register and compile:

```
bin/magento module:enable HK2_Core
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
```

See [docs/installation.md](docs/installation.md) for detailed steps and verification.

---

⚙️ Configuration
----------------

[](#️-configuration)

HK2\_Core defines **zero configuration fields of its own**. Its sole contribution to Stores &gt; Configuration is the **HK2 tab** (`hk2_options_tab`), which serves as a container for sibling module sections.

**Admin path:** Stores → Settings → Configuration → HK2

When no sibling HK2 modules are installed, the HK2 tab will have no visible sections. Once any HK2 extension (e.g., HK2\_AddBootstrap5, HK2\_CspWhitelisting, HK2\_ScrollTop) is installed and enabled, its configuration sections appear under this tab.

**Menu path:** System → HK2

The `HK2::root` menu item is visible in the admin sidebar under the System menu. Sibling modules add their own child entries beneath it.

---

🔒 Content Security Policy (CSP)
-------------------------------

[](#-content-security-policy-csp)

This module does **not** introduce any CSP directives. It loads no external resources at runtime — the ModuleHeader block renders static asset references (logo URL) as links, not as active resource loads. Sibling modules that load external resources (e.g., CDN-hosted CSS/JS) are responsible for their own CSP whitelisting via `etc/csp_whitelist.xml`.

---

🔐 Privacy &amp; GDPR
--------------------

[](#-privacy--gdpr)

- **No data collection** — HK2\_Core does not collect, store, or transmit any personal data.
- **No cookies** — The module sets no cookies, session data, or tracking mechanisms.
- **No third-party services** — The branded header contains links to external websites but does not embed any tracking pixels, analytics, or iframes.
- **No user data processing** — The module executes no observers, plugins, or scheduled tasks that handle customer or admin personally identifiable information (PII).

The admin links rendered in the ModuleHeader point to:

- `https://www.basantmandal.in/` (author website)
- `https://www.linkedin.com/in/basantmandal/` (LinkedIn profile)
- `https://www.basantmandal.in/support` (support page)
- `https://www.basantmandal.in/donate` (donation page)

These are standard `` links; no data is sent to these destinations unless the admin user actively clicks them.

---

📚 Documentation
---------------

[](#-documentation)

DocumentDescription[Installation Guide](docs/installation.md)Composer installation, Magento CLI commands, and verification[Usage Guide](docs/usage.md)Module role, shared infrastructure, admin panel paths[Compatibility Matrix](docs/compatibility.md)Supported Magento, PHP, and dependency versions[CHANGELOG](CHANGELOG.md)Version history and release notes[SECURITY](SECURITY.md)Vulnerability reporting and disclosure policy---

⚠️ Known Limitations
--------------------

[](#️-known-limitations)

- **No standalone functionality** — The module provides no user-facing features on its own. It must be used in conjunction with at least one sibling HK2 module for any visible effect.
- **Tab visibility** — The HK2 tab in Stores &gt; Configuration appears even without sibling modules installed but contains no sections until another HK2 module is enabled.
- **Admin only** — All infrastructure is scoped to the Magento admin panel. No storefront features are provided.
- **No i18n** — The module does not ship with translation files (`i18n/`). Labels in `system.xml` and `menu.xml` are currently English-only.

---

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please follow these guidelines:

1. **Bug reports** — Open a [GitHub issue](https://github.com/anomalyco/opencode/issues) with a clear description, reproduction steps, and environment details.
2. **Pull requests** — Fork the repository, create a feature branch, and submit a PR against `main`. Ensure commits follow [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, etc.).
3. **Code style** — Run `./vendor/bin/phpcs --standard=phpcs.xml .` before submitting. This module follows the Magento 2 coding standard with PSR12.
4. **No test infrastructure** — This module currently has no test suite (no `phpunit.xml`, no `tests/` directory). If you add tests, please ensure they pass.

By contributing, you agree that your contributions will be licensed under the OSL-3.0 license.

---

📄 License
---------

[](#-license)

**Open Software License (OSL 3.0)**

Copyright © 2023–present Basant Mandal / Basant Mandal

This software is licensed under the Open Software License version 3.0. A copy of the license is included in [`LICENCE.txt`](LICENCE.txt).

The AFL-3.0 license also applies as a secondary license for specific distribution channels (e.g., Magento Marketplace). For details, see the full license text.

---

⚖️ Disclaimer
-------------

[](#️-disclaimer)

This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the authors or copyright holders be liable for any claim, damages, or other liability, whether in an action of contract, tort, or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.

The logo, branding, and trademark "HK2" and "Hash Tag Kitto" are the property of Basant Mandal. This module is not affiliated with, endorsed by, or sponsored by Adobe Inc. or any of its subsidiaries.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.6% of commits — single point of failure

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 ~34 days

Total

4

Last Release

52d ago

PHP version history (3 changes)1.0.0PHP ^8.1 || ^8.2

v1.0.0PHP ^8.1 || ^8.2 || ^8.3 || ^8.4

1.0.2PHP ^8.1 || ^8.2 || ^8.3 || ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/ffa270f1557c4c55c55fec1ad6f2544170980c8dd7f679c10582a3736f7d3a4c?d=identicon)[basantmandal](/maintainers/basantmandal)

---

Top Contributors

[![basantmandal](https://avatars.githubusercontent.com/u/69835601?v=4)](https://github.com/basantmandal "basantmandal (19 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (4 commits)")

---

Tags

hk2magento2magento2-extension-freemagento2-module-freecoremagento2HK2magento moduleBasant Mandal

### Embed Badge

![Health badge](/badges/hk2-core/health.svg)

```
[![Health](https://phpackages.com/badges/hk2-core/health.svg)](https://phpackages.com/packages/hk2-core)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M49](/packages/smile-elasticsuite)[run-as-root/magento2-prometheus-exporter

Magento2 Prometheus Exporter

68357.9k](/packages/run-as-root-magento2-prometheus-exporter)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)[angeo/module-llms-txt

Magento 2 module for AI Engine Optimization (AEO). Generates spec-compliant llms.txt and llms-full.txt per llmstxt.org standard, plus streaming JSONL for vector indexing. Multi-store, multi-website, CLI, cron, async admin UI, Page Builder-aware sanitization, customer-group pricing, atomic writes, ETag/Cache-Control, .md mirrors.

111.1k](/packages/angeo-module-llms-txt)[mage-os/module-llm-txt

AI-powered LLMs.txt generation for Magento 2 / Mage-OS stores. Help AI systems understand your store with OpenAI-generated content.

234.0k](/packages/mage-os-module-llm-txt)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)

PHPackages © 2026

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