PHPackages                             sskur/open-loyalty-framework - 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. [Framework](/categories/framework)
4. /
5. sskur/open-loyalty-framework

ActiveProject[Framework](/categories/framework)

sskur/open-loyalty-framework
============================

v1.0.0(10mo ago)03proprietaryPHPPHP &gt;=7.4

Since Jun 24Pushed 10mo agoCompare

[ Source](https://github.com/sskurs/open-loyalty-framework)[ Packagist](https://packagist.org/packages/sskur/open-loyalty-framework)[ RSS](/packages/sskur-open-loyalty-framework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (48)Versions (2)Used By (0)

api login
=========

[](#api-login)

jwt token structure
-------------------

[](#jwt-token-structure)

```
{
 exp: 1470299383,
 username: "admin",
 roles: [
  "ROLE_ADMIN"
 ],
 iat: "1470212983"
}

```

obtaining jwt token
-------------------

[](#obtaining-jwt-token)

admin url: /api/admin/login\_check customer url: /api/customer/login\_check seller url: /api/seller/login\_check

method: POST

body:

- \_username: admin
- \_password: open

response:

```
{
"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHA",
"refresh_token":"44588da231e2f480bd4"
}

```

refreshing jwt token
--------------------

[](#refreshing-jwt-token)

url: /api/token/refresh

method: POST

body:

- refresh\_token: 'token'

response:

```
{
"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJleHA",
"refresh_token":"44588da231e2f480bd4"
}

```

events
======

[](#events)

system events
-------------

[](#system-events)

Proper listener should be created to handle system events. Example definition of such listener:

```
    oloy.listener:
        class: 'OpenLoyalty\Listener.php'
        tags:
          - { name: broadway.event_listener, event: oloy.customer.registered, method: handle }

```

### 'oloy.customer.registered' - customer added to PL

[](#oloycustomerregistered---customer-added-to-pl)

Event class: OpenLoyalty\\Domain\\Customer\\SystemEvent\\CustomerRegisteredSystemEvent

### 'oloy.customer.updated'

[](#oloycustomerupdated)

Event class: OpenLoyalty\\Domain\\Customer\\SystemEvent\\CustomerUpdatedSystemEvent

### 'oloy.customer.agreements\_updated'

[](#oloycustomeragreements_updated)

Event class: OpenLoyalty\\Domain\\Customer\\SystemEvent\\CustomerAgreementsUpdatedSystemEvent

### 'oloy.customer.deactivated'

[](#oloycustomerdeactivated)

Event class: OpenLoyalty\\Domain\\Customer\\SystemEvent\\CustomerDeactivatedSystemEvent

### 'oloy.segment.customer\_added\_to\_segment'

[](#oloysegmentcustomer_added_to_segment)

Event class: OpenLoyalty\\Domain\\Segment\\SystemEvent\\CustomerAddedToSegmentSystemEvent

### 'oloy.segment.customer\_removed\_from\_segment'

[](#oloysegmentcustomer_removed_from_segment)

Event class: OpenLoyalty\\Domain\\Segment\\SystemEvent\\CustomerRemovedFromSegmentSystemEvent

domain events
-------------

[](#domain-events)

Proper listener should be created to handle domain events. This listener must implement Broadway\\EventHandling\\EventListenerInterface

Example definition of such listener:

```
    oloy.listener:
        class: 'OpenLoyalty\Listener.php'
        lazy: true
        tags:
          - { name: broadway.domain.event_listener }

```

### OpenLoyalty\\Domain\\Customer\\Event\\CampaignWasBoughtByCustomer - dispatched when campaign was bought by customer

[](#openloyaltydomaincustomereventcampaignwasboughtbycustomer---dispatched-when-campaign-was-bought-by-customer)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance53

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 52% 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

Unknown

Total

1

Last Release

328d ago

### Community

Maintainers

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

---

Top Contributors

[![klobermajer](https://avatars.githubusercontent.com/u/2846864?v=4)](https://github.com/klobermajer "klobermajer (13 commits)")[![pskorka](https://avatars.githubusercontent.com/u/19946119?v=4)](https://github.com/pskorka "pskorka (7 commits)")[![emgiezet](https://avatars.githubusercontent.com/u/1410665?v=4)](https://github.com/emgiezet "emgiezet (2 commits)")[![kardasz](https://avatars.githubusercontent.com/u/1894170?v=4)](https://github.com/kardasz "kardasz (1 commits)")[![rksleung](https://avatars.githubusercontent.com/u/58574869?v=4)](https://github.com/rksleung "rksleung (1 commits)")[![sskurs](https://avatars.githubusercontent.com/u/204194787?v=4)](https://github.com/sskurs "sskurs (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sskur-open-loyalty-framework/health.svg)

```
[![Health](https://phpackages.com/badges/sskur-open-loyalty-framework/health.svg)](https://phpackages.com/packages/sskur-open-loyalty-framework)
```

###  Alternatives

[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[forumify/forumify-platform

121.8k11](/packages/forumify-forumify-platform)

PHPackages © 2026

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