PHPackages                             jmrg/chip-modules - 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. jmrg/chip-modules

ActiveProject[Framework](/categories/framework)

jmrg/chip-modules
=================

Components to build a PHP Micro-Framework.

v1.0.0(8y ago)06MITPHPPHP &gt;=5.6.4

Since Feb 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jmrg/chip-modules)[ Packagist](https://packagist.org/packages/jmrg/chip-modules)[ RSS](/packages/jmrg-chip-modules/feed)WikiDiscussions master Synced 2mo ago

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

Chip-modules
============

[](#chip-modules)

[![Build Status](https://camo.githubusercontent.com/4cb221fb950c0a2b9db3e44307d3f9def7c6f3c1d19288554d9f1d2f7dfb81e8/68747470733a2f2f7472617669732d63692e6f72672f6a6d72672f636869702d6d6f64756c65732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/jmrg/chip-modules)

Chip-modules is a set libraries that encapsulate their implementations to way easy and faster and provides the methods to access in an only step.

Components
----------

[](#components)

This includes handlers for:

- [Klein](https://github.com/klein/klein.php) - Router, controllers, and endpoints.
- [Symfony Config](https://symfony.com/doc/current/components/config.html) - Configuration from environment file.
- [Eloquent](https://github.com/illuminate/database) - Database and models.
- [Hoa Session](https://github.com/hoaproject/Session) - Session handler.
- [Blade](https://laravel.com/docs/5.1/blade) - Template manager and views.
- [PHPMailer](https://github.com/PHPMailer/PHPMailer) - Full manager to send emails.

Installing Chip-modules Composer
--------------------------------

[](#installing-chip-modules-composer)

You can install Chip-modules into your project using Composer. For existing applications you can run the following:

```
$ composer require jmrg/chip-modules:"~0"
```

Usage Instructions
------------------

[](#usage-instructions)

#### Environment Config

[](#environment-config)

To configure the params of the environment to create a file YAML like this with the database connection and parameters of SMTP:

```
# There are file for example named example.environment.yaml

databases:
    prod:
        driver: mysql
        host: localhost
        database: database
        username: root
        password: secret
        charset: utf8
        collation: utf8_unicode_ci

mail:
    # 0 = off | 1 = Client messages | 2 = Client and server messages
    debug: 2

    # Basics
    driver: smtp
    host: smtp.mailtrap.io
    port: 2525
    username: null
    password: null

    # Encryption system: tls, ssl (deprecated)
    encryption: null
```

After that, we shoulder load the file.

```
// Load file...
ConfigModule::init('path/to/file/config.yaml');

// Getting config...
$c = config(); // Return the config as array.
```

#### Router Config

[](#router-config)

To configure the router we make the following:

```
// Creates a new object to the configuration.
$config = new \Chip\Modules\Router\RouterConfig();
$config->setBaseNamespace("\\Namespace\\to\\controllers") // Namespace source path.
    ->attachRouterFiles('path/to/endpoints/router.php'); // Location for the file router.

// Dispatch resquest.
$r = \Chip\Modules\Router\Router::up($config);
$r->dispatch();
```

Example using router:

```
// File router.php

// Methods availables according to HTTP verbs: get(), post(), put(), pat(), delete(), options().
$router->get('/hellow-world', function () {
    return 'Hellow World!!';
});

// To response multiple HTTP verbs:
$router->match(['get', 'post'], '/hellow-world', function () {
    return 'Hellow World!!';
});
```

#### Databases and Model Config

[](#databases-and-model-config)

To configure databases we make the following:

```
// In the file configuration environment, we have a sections with the
// connections to the different databases, we only must send
// a connections name to configure de database.

\Chip\Modules\Model\Manager::db('nameDatabase');

// In the case of models, these must extend from \Chip\Modules\Model\Model
class User extend \Chip\Modules\Model\Model
{
    // Something code..
}
```

#### Session Config

[](#session-config)

To configure session we make the following:

```
// Recomended to use name "guest" for the session.
\Chip\Modules\Session\Session::of('Guest');

// To get the session to use a guest() method.
// This returns an instance of Hoa Session. Check out the documentation
// of lirary for any information https://github.com/hoaproject/Session
$session = guest();
```

#### Views and Blade Config

[](#views-and-blade-config)

To configure the blade manager template we make the following:

```
// Define path to views and cache.
ViewComponent::config(
    '/path/to/source/views',
    '/path/to/cache'
);

// Load the view...
view(
    'name-view',
    ['param1' => 'Hello', 'param2' => 'World!!']
);

// To build views check out the documentation https://laravel.com/docs/5.1/blade
```

#### Email Config

[](#email-config)

To configure the first that we make is fill the environment file with the params require:

```
# There are file for example named example.environment.yaml

mail:
    # 0 = off | 1 = Client messages | 2 = Client and server messages
    debug: 2

    # Basics
    driver: smtp
    host: smtp.mailtrap.io
    port: 2525
    username: null
    password: null

    # Encryption system: tls, ssl (deprecated)
    encryption: null
```

To get a instance the handler email we make follow:

```
// Create a new isntance Mailer class.
$mailer = \Chip\Modules\Mailer\Mailer::create();

// To send emails or making config aditionals check out the documentation https://github.com/PHPMailer/PHPMailer
```

Test
----

[](#test)

This project use PHPUnit to make test. To execute the test run the follow command:

```
$ vendor/bin/phpunit
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

3012d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ae25655ad03555ac1fbc6feb6bb41745fa0dcffbad3de207573182657db5ce0?d=identicon)[jmrg](/maintainers/jmrg)

---

Top Contributors

[![jmrg](https://avatars.githubusercontent.com/u/11950150?v=4)](https://github.com/jmrg "jmrg (25 commits)")

---

Tags

easy-to-usefastmicroframeworkmodulesphpphpframeworkcomponentsfastmicro-frameworkchip

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jmrg-chip-modules/health.svg)

```
[![Health](https://phpackages.com/badges/jmrg-chip-modules/health.svg)](https://phpackages.com/packages/jmrg-chip-modules)
```

###  Alternatives

[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[contao-community-alliance/dc-general

Universal data container for Contao

1578.3k86](/packages/contao-community-alliance-dc-general)[usbac/wolff-framework

Web development made just right

381.2k](/packages/usbac-wolff-framework)

PHPackages © 2026

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