PHPackages                             sankalpsri/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. sankalpsri/candy-api

ActiveProject

sankalpsri/candy-api
====================

API driven E-commerce solution, written in Laravel

0.4.06(6y ago)031MITPHPPHP &gt;=7.1.3

Since Feb 28Pushed 6y agoCompare

[ Source](https://github.com/sankalpsri/candy-api)[ Packagist](https://packagist.org/packages/sankalpsri/candy-api)[ RSS](/packages/sankalpsri-candy-api/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (24)Versions (172)Used By (1)

> **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\Core\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

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 97.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 ~4 days

Total

161

Last Release

2341d ago

PHP version history (2 changes)v0.1.0PHP &gt;=7.1.3

0.3.6PHP &gt;=7.2.0

### Community

Maintainers

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

---

Top Contributors

[![alecritson](https://avatars.githubusercontent.com/u/1488016?v=4)](https://github.com/alecritson "alecritson (439 commits)")[![Jamiewarb](https://avatars.githubusercontent.com/u/2754728?v=4)](https://github.com/Jamiewarb "Jamiewarb (4 commits)")[![pjonckiere](https://avatars.githubusercontent.com/u/5682677?v=4)](https://github.com/pjonckiere "pjonckiere (2 commits)")[![youyi1314](https://avatars.githubusercontent.com/u/8391468?v=4)](https://github.com/youyi1314 "youyi1314 (1 commits)")[![pietervanpeteghem](https://avatars.githubusercontent.com/u/51788024?v=4)](https://github.com/pietervanpeteghem "pietervanpeteghem (1 commits)")[![j-rods](https://avatars.githubusercontent.com/u/25374784?v=4)](https://github.com/j-rods "j-rods (1 commits)")[![Vasiharan](https://avatars.githubusercontent.com/u/1331936?v=4)](https://github.com/Vasiharan "Vasiharan (1 commits)")

---

Tags

laravelecommercegetcandy

###  Code Quality

TestsPHPUnit

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/sankalpsri-candy-api/health.svg)](https://phpackages.com/packages/sankalpsri-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)[typicms/base

A modular multilingual CMS built with Laravel, enabling developers to manage structured content like pages, news, events, and more.

1.6k20.3k](/packages/typicms-base)[jsdecena/laracom

Laravel powered e-commerce

2.0k4.4k](/packages/jsdecena-laracom)

PHPackages © 2026

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