PHPackages                             surpaimb/candy-api - 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. [API Development](/categories/api)
4. /
5. surpaimb/candy-api

ActiveProject[API Development](/categories/api)

surpaimb/candy-api
==================

API driven E-commerce solution, written in Laravel fork by getcandy/candy-api

v0.1.3(7y ago)08MITPHPPHP &gt;=7.1.3

Since Feb 28Pushed 7y agoCompare

[ Source](https://github.com/surpaimb/candy-api)[ Packagist](https://packagist.org/packages/surpaimb/candy-api)[ RSS](/packages/surpaimb-candy-api/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (23)Versions (7)Used By (0)

> **Please Note**
> Whilst every effort has been made to make this software ready for a release, it is provided as is, this is very much still in early alpha stages and you use it at your own risk.

> **This is not production ready software**

GetCandy E-Commerce API
=======================

[](#getcandy-e-commerce-api)

A laravel way to build an API driven store online.

Requirements
------------

[](#requirements)

- Laravel &gt;= 5.5
- Elasticsearch &gt;= 6

Server setup
------------

[](#server-setup)

We think the easiest way to get up and running is to use [Valet+](https://github.com/weprovide/valet-plus) with Elasticsearch. But really, it's up to you :)

Installing via composer
-----------------------

[](#installing-via-composer)

You can either install just the API or the API and Hub.

#### Just the API

[](#just-the-api)

This will contain everything you need to manage your store through the API endpoints.

```
composer require getcandy/candy-api

```

#### API and Hub (recommended)

[](#api-and-hub-recommended)

This will install the API and the Hub, so you have a nice interface to manage your store.

```
composer require getcandy/candy-hub

```

#### Laravel 5.6

[](#laravel-56)

GetCandy supports package auto discovery

#### Laravel 5.5

[](#laravel-55)

Add the three required service providers to your `config/app.php` file

```
'providers' => [
  // ...

  GetCandy\Api\Providers\ApiServiceProvider::class,
  GetCandy\Api\Providers\EventServiceProvider::class,

  // If you have installed the hub, add this one
  GetCandy\Hub\Providers\HubServiceProvider::class
],
```

Publish the config / resources
------------------------------

[](#publish-the-config--resources)

The API needs to publish some config items and the hub needs to publish some resources (if you're using it)

```
php artisan vendor:publish --tag=config

// If using the hub
php artisan vendor:publish --tag=public

```

Set up your users
-----------------

[](#set-up-your-users)

GetCandy doesn't have it's own User model, we figured you'd want your own, so we just use a trait:

```
use GetCandy\Api\Traits\HasCandy;

class User extends Authenticatable
{
    use HasCandy;
```

The API uses passport for authentication, so make sure your `config/auth.php` config uses this:

> This will probably be refactored into it's own gate going forward, hangover from non package days...

```
'guards' => [
  // ...

  'api' => [
     'driver' => 'passport',
     'provider' => 'users',
   ]
]
```

Get things up and running
-------------------------

[](#get-things-up-and-running)

The API needs some *bare minimum* data to get going, for now we've just made a console command to get going:

```
php artisan candy:install

```

Follow the installation steps and you'll be able to log in and start adding products!

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% 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 ~80 days

Total

4

Last Release

2757d ago

### Community

Maintainers

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

---

Top Contributors

[![tpdeng](https://avatars.githubusercontent.com/u/143301941?v=4)](https://github.com/tpdeng "tpdeng (7 commits)")[![alecritson](https://avatars.githubusercontent.com/u/1488016?v=4)](https://github.com/alecritson "alecritson (2 commits)")

---

Tags

laravelecommercegetcandysurpaimb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/surpaimb-candy-api/health.svg)

```
[![Health](https://phpackages.com/badges/surpaimb-candy-api/health.svg)](https://phpackages.com/packages/surpaimb-candy-api)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[getcandy/candy-api

API driven E-commerce solution, written in Laravel

4427.9k1](/packages/getcandy-candy-api)[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[aimeos/aimeos-headless

Aimeos headless ecommerce system

2.5k2.3k](/packages/aimeos-aimeos-headless)

PHPackages © 2026

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