PHPackages                             codemojo/startkit - 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. codemojo/startkit

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codemojo/startkit
=================

Pluggable components as service for your PHP application

v0.1.940(8y ago)22.2kGNUPHPPHP &gt;=5.2.0

Since Jan 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/codemojo-dr/startkit-php-sdk)[ Packagist](https://packagist.org/packages/codemojo/startkit)[ Docs](https://github.com/codemojo-dr/codemojo-php-sdk)[ RSS](/packages/codemojo-startkit/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (41)Used By (0)

### About

[](#about)

Welcome to the CodeMojo SDK (Startup Development Toolkit). CodeMojo helps you to rapidly deploy application components as pluggable services for your PHP application allowing you to cut development time ramp up productivity.

Using the [SDK](https://github.com/codemojo-dr/php-sdk/archive/master.zip) is straight forward and simple. The SDK consist of four main services

1. [Authentication Service](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Authentication-Service)
2. [Wallet Service](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Wallet-Service)
3. [Loyalty Service](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Loyalty-Service)
4. [Meta Tagging Service](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Meta-Service)

Download the PHP SDK [here](https://github.com/codemojo-dr/php-sdk/archive/master.zip)

Download the **Sample Application** [here](https://github.com/codemojo-dr/startkit-php-sample/archive/master.zip)

See the [Wiki](https://github.com/codemojo-dr/startkit-php-sdk/wiki) for additional documentation

See the [Dashboard walkthrough](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Dashboard) for insights on how to use the dashboard

### Installation &amp; Usage

[](#installation--usage)

**Stock/Vanilla PHP**

Download the SDK and include the `autoload.php` to your source code

**Composer**

Simply add the following to your `composer.json`

```
{
  "require": {
    "codemojo/startkit": "0.1.*"
  }
}
```

### Example

[](#example)

Once you have enabled and configured the Loyalty module from your [CodeMojo dashboard](https://dashboard.codemojo.io), you can use it as simple as shown below. More documentation on [dashboard](https://github.com/codemojo-dr/startkit-php-sdk/wiki/Dashboard).

```
require_once '../sdk/autoload.php';

const CLIENT_ID     = 'sample@codemojo.io';
const CLIENT_SECRET = 'PLB6DHP7VcykRDdvloi2X9tEq3FvsIBhtdn7UdeQ';

// Create an instance of Authentication Service
$authService = new AuthenticationService(CLIENT_ID, CLIENT_SECRET, Endpoints::LOCAL, function($type, $message){
    switch($type){
        case Exceptions::AUTHENTICATION_EXCEPTION:
            echo 'Authentication Exception';
            break;
        case Exceptions::BALANCE_EXHAUSTED_EXCEPTION:
            echo 'Low balance';
            break;
        case Exceptions::FIELDS_MISSING_EXCEPTION:
            echo 'Fields missing';
            break;
        case Exceptions::QUOTA_EXCEPTION:
            echo 'Quota Exhausted Exception';
            break;
        case Exceptions::TOKEN_EXCEPTION:
            echo 'Invalid token Exception';
            break;
        default:
            echo 'Error ' . $message;
            break;
    }
});

// Create an instance of Loyalty Service - If you have more than one wallet service,
// you can optionally pass in the wallet instance as the second argument
$loyaltyService = new LoyaltyService($authService);

// Credit points to user - You can have different set of rules based on the platform
// For example, you can promote your android app by saying Get 5% more cashback when you transact through the Android app
$status = $loyaltyService->addLoyaltyPoints("user1@codemojo.io", 1500, "android", "", 7, "Cashback for Order no. 1231");

// Get the balance in the wallet
$balance = $loyaltyService->getBalance("user1@codemojo.io");

// Check how much maximum can be redeemed by the user for the given (current) transaction value
// Again, you can have different set of rules for redemption based on the platform
$maximumRedemption = $loyaltyService->maximumRedemption("user1@codemojo.io",8500);

// Redeem amount
// (user_id, redemption_amount, current_transaction_value, platform)
$loyaltyService->redeem("user1@codemojo.io", 500, 8500, "android");
```

For more details on the methods &amp; parameters available for each service, take a look at the individual service pages.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~15 days

Recently: every ~49 days

Total

40

Last Release

3158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/91dd68fb752cd9e0431dbfbeb24718aa0fad6f90daaf910c5b9a0f610f17cf22?d=identicon)[shoaib-drewards](/maintainers/shoaib-drewards)

---

Top Contributors

[![shoaib-dr](https://avatars.githubusercontent.com/u/10838006?v=4)](https://github.com/shoaib-dr "shoaib-dr (10 commits)")

---

Tags

walletloyaltydrewardscodemojo

### Embed Badge

![Health badge](/badges/codemojo-startkit/health.svg)

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

###  Alternatives

[pkpass/pkpass

PHP PKPass class for iOS Wallet

9733.0M6](/packages/pkpass-pkpass)[eo/passbook

iOS Passbook for PHP

2651.6M2](/packages/eo-passbook)[stephenjude/laravel-wallet

A simple wallet implementation for Laravel

26411.7k](/packages/stephenjude-laravel-wallet)[depsimon/laravel-wallet

Easy to use virtual wallet for your app

9521.6k1](/packages/depsimon-laravel-wallet)[eo/passbook-bundle

iOS Passbook for Symfony

1084.4k](/packages/eo-passbook-bundle)

PHPackages © 2026

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