PHPackages                             vexelon.net/e-additives.server - 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. vexelon.net/e-additives.server

AbandonedArchivedProject[API Development](/categories/api)

vexelon.net/e-additives.server
==============================

E-additives RESTful web service

1.0.0(10y ago)661AGPL-3.0PHPPHP &gt;=5.3.2

Since Sep 11Pushed 10y ago2 watchersCompare

[ Source](https://github.com/vexelon-dot-net/e-additives.server)[ Packagist](https://packagist.org/packages/vexelon.net/e-additives.server)[ Docs](https://github.com/vexelon-dot-net/e-additives.server)[ RSS](/packages/vexelonnet-e-additivesserver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

e-additives.server
==================

[](#e-additivesserver)

[![Build Status](https://camo.githubusercontent.com/d6532f1636a738fe54162498524d1e502d60dd722ca93aab55e2f80822025bdd/68747470733a2f2f7472617669732d63692e6f72672f766578656c6f6e2d646f742d6e65742f652d6164646974697665732e7365727665722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/vexelon-dot-net/e-additives.server)

The goal of the E-additives project is to implement a web platform that will provide detailed information about [food additives](http://en.wikipedia.org/wiki/Food_additive).

This project is a RESTful web service implementation that provides [CRUD](http://en.wikipedia.org/wiki/Create,_read,_update_and_delete) access to the data which may later be consumed by web or mobile apps using a defined HTTP API.

Check the [documentation](docs/).

Requirements
============

[](#requirements)

Required software components:

- Nginx 1.4.x
- PHP 5.3.x
- PostgreSQL 9.x
- Redis 2.2.x

Getting Started
===============

[](#getting-started)

Note that the following steps are to be executed on Linux systems. On Windows you would need to use different commands.

Install required PHP extensions and enable them in `php.ini`:

- mcrypt.so
- openssl.so
- phar.so
- php\_pdo\_pgsql.so
- php\_mbstring.so

Install composer:

```
curl -s https://getcomposer.org/installer | php

```

Install dependencies via composer:

```
php composer.phar install

```

Create database structure and Import data:

```
$ cd data
$ psql your-database < `pg_db_schema.sql`
$ psql your-database < `pg_db_app_data.sql`

```

Please have a look at the `pg_db_schema.sql` and adjust the user rights and owner of the postgres database.

Configuration
=============

[](#configuration)

Configure Nginx
---------------

[](#configure-nginx)

Configuring Nginx can be tricky mainly because of how the [Slim](https://github.com/codeguy/Slim) framework resolves the request uri. The following configuration assumes a `php5-fpm` type of setup.

```
    server {
            listen 80;
            listen [::]:80;

            server_name ;
            index index.html index.php;
            root /;

            # remove trailing slashes
            rewrite ^/(.*)/$ /$1 permanent;

            # rewrite api request uri
            rewrite ^/api(.*)$ /index.php last;

            location ~ ^.+\.php {
                    include fastcgi_params;

                    fastcgi_pass unix:/var/run/php5-fpm.sock;
                    fastcgi_index index.php;

                    fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
                    fastcgi_param SCRIPT_FILENAME /$fastcgi_script_name;
                    fastcgi_param SCRIPT_NAME /api$fastcgi_script_name;

                    # send headers only if there are no errors
                    add_header Access-Control-Allow-Origin "";
                    add_header Access-Control-Allow-Methods "GET";
                    add_header Access-Control-Allow-Headers "Content-Type, X-Requested-With, X-Authorization";
            }

            location ~ /\.ht {
                    deny  all;
            }
    }
```

Configure Application
---------------------

[](#configure-application)

Copy the `config-empty.php` to `config.php` and open the file in a text editor.

- Configure `DB_SETTINGS` by specifying database name and user with access privileges.
- Configure `CACHE_SETTINGS` if you have a [Redis](http://redis.io/) server running.
- Generate and set client API key in `X_AUTH_KEY`.
- Configure `BASE_URL` by specifying the full path to the API. Just add what you specified in `RewriteBase` to the `http://%s/` string, .e.g, *http://%s/ead.server.api*.
- Set `MAINTENANCE_MODE` to `false` to enable API calls.

Testing
=======

[](#testing)

Test using [CURL](http://curl.haxx.se/) or some [REST client](https://chrome.google.com/webstore/detail/postman-rest-client/fdmmgilgnpjigdojojpjoooidkmcomcm) tool.

Read the [API docs](docs/API.md) to check what API calls are available and how to use them.

License
=======

[](#license)

- E-additives server license - [AGPL](LICENSE)
- E-additives server data license - [CC BY-SA 4.0](data/LICENSE)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

2

Last Release

3872d ago

Major Versions

v0.9.0 → 1.0.02015-10-02

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a2909124c6d2626752be5dd79993ffd9e3523ed3da3811c48359db1887d6c2f?d=identicon)[petarov](/maintainers/petarov)

---

Top Contributors

[![petarov](https://avatars.githubusercontent.com/u/547597?v=4)](https://github.com/petarov "petarov (240 commits)")

---

Tags

food-additiveshealthfoodnutritionadditivesfood additivesfood substance

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vexelonnet-e-additivesserver/health.svg)

```
[![Health](https://phpackages.com/badges/vexelonnet-e-additivesserver/health.svg)](https://phpackages.com/packages/vexelonnet-e-additivesserver)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)[concrete5/core

Concrete core subtree split

19159.3k48](/packages/concrete5-core)

PHPackages © 2026

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