PHPackages                             ssitu/medicis - 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. [CLI &amp; Console](/categories/cli)
4. /
5. ssitu/medicis

ActiveLibrary[CLI &amp; Console](/categories/cli)

ssitu/medicis
=============

A PHP tool dedicated to fastforward JSON collection creation. Handles schema, sample data, translations; generates pages and menu config for UI integration; bundles collections in groups and profiles; run in CLI.

v0.9.8(4y ago)03MITPHP

Since Jun 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/I-is-as-I-does/Medicis)[ Packagist](https://packagist.org/packages/ssitu/medicis)[ Docs](https://github.com/I-is-as-I-does/MetaMedicis)[ RSS](/packages/ssitu-medicis/feed)WikiDiscussions main Synced yesterday

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

Medicis
=======

[](#medicis)

A PHP tool dedicated to fastforward JSON collection creation.

- Handles schema, sample data, translations
- Can generate additional custom config files
- Bundles collections in groups
- Run in CLI

Setup
-----

[](#setup)

### Install

[](#install)

```
$ composer require ssitu/medicis
```

`ssitu/jacktrades` will be installed too. It's a very small library of utils.

### Ready for CLI

[](#ready-for-cli)

To uses Medicis in CLI, install `ssitu/euclid` too. It should be suggested by Composer; otherwise:

```
$ composer require ssitu/euclid
```

### Init

[](#init)

```
use SSITU\Medicis\MedicisCli;
# OR:
use SSITU\Medicis\MedicisMap;

#If not already summoned:
require_once  'path_to_composer/autoload.php';

# Pick a path to host your collections files:
$pathToCollc = 'path_to_collections_dir/';

# Then:
$MedicisCli = new MedicisCli($pathToCollc, true);
# OR:
$MedicisMap = new MedicisMap($pathToCollc);
var_dump($MedicisMap->getLog());
```

Directories will be mkdir'd.

### TLDR

[](#tldr)

Take a look at files in `samples/collections`;
And to dip toes in CLI:

```
$ php samples/bin/medicis
```

Collections
-----------

[](#collections)

The whole point of Medicis is to write Json schema (and make use of them), easy and quick.

Collections will be arranged in *groups*.
Groups are bundles of related collections.
Of course, a group can also host a single collection.

### Prep

[](#prep)

To set up a collection:

- in `src/collc` : create a sub folder, named after your group of collections. *example*:
    `src/collc/people/`
- then inside that folder, create collection json file(s). File(s) name(s) must be 'group name' dash 'collection name'; *example:*`people-contacts.json` and `people-activities.json`

Each collection file must specify 2 main properties:

- `required` | *array* (required properties; will be used for schema validation),
- and `props` | *array* (schema properties).

`props` items are objects, each containing 2 properties:

- `method` | *string*
- and `param` | *array*

The shortcut is within `method` and `param`: they refer to methods in *MedicisModels* that will do the heavy work.

*Example:*`people-activities.json`:

```
{
  "required": ["activity"],
  "props": [
    {
      "method": "String",
      "param": ["activity", "Art historian"]
    }
  ]
}
```

Related method in *MedicisModel*:

```
$MedicisModels->String( $id,
                        $example,
                        $minLen = false,
                        $maxLen = false,
                        $pattern = false);
```

*MedicisModel* interface file will serve as a **cheat sheet** for available methods: `Medicis/src/MedicisFamily/MedicisModels_i.php`

### Config

[](#config)

You can add a config property to each collection; what it may contain is entirely up to you. If collections are going to be integrated in some UI, it could be things like auth level, template used, position in menu, etc.

```
"config":
  {
    "priority":2,
    "status": "required",
    "auth": 1,
    "template": "collections"
}
```

Content will be detached from the src file, into its own file in `dist/`. As for the other collection files, a bundle is generated when running `'Groups'` commands in CLI.

You can also create a similar file for group-wide config, in `src/collc/your-group/`, naming it after your group: `your-group.json`. The group bundle file will then include the group config, and wrap collections config in an 'items' property.

### Translation

[](#translation)

For each language your are planning translations, create a file in `src/transl` folder, named as follow: `collections-{language}.json`

In CLI, run `'transl'` commands for either collections, or groups: source translation files will automatically be populated with keys that requires translation (and you'll get a log).

Note that `'all'` commands include translation.

Entries are separated between:

- `'name'` for collections and groups names,
- and `'prop'` for properties titles.

*Example*`collections-en.json`

```
{
  "name":{
    "people": "People",
    "people-activities": "People | Activities",
    "people-contacts": "People | Contact"
    },
  "prop":{
    "name": "Name",
    "addresses": "Addresses",
    "emails": "Emails",
    "websites": "Websites",
    "activity": "Activity"
    }
}
```

### Distill

[](#distill)

To generate from there a real schema, dummy data, translation arrays, and optionally some config, in CLI:

- pick `'Collc'`
- then `'people-activities -> all'`

You'll get a log of what worked, failed, have been skipped, etc, and you'll find generated files in `dist/people/` folders:
`sch`, `data`, `config` and `transl`.

### Merge

[](#merge)

In CLI, a `'Group'` command will:

- run action for **all group collections** at once,
- plus generate a bundled file for each category. Destination folder: `dist/your-group/bundle/`.

MetaMedicis
-----------

[](#metamedicis)

*MedicisCli* is fine and dandy for quick, common use operations, but for more targeted operations:

- use *Euclid* main tool (in which case, please refer to *Euclid* [doc](https://github.com/I-is-as-I-does/Euclid)),
- or operate from the *MetaMedicis* class:

```
$MedicisMap = new MedicisMap($collectionDirPath);
$log = $MedicisMap->getLog();
if (!empty($log['err'])) {
 var_dump($log);
 exit;
}
$MetaMedicis = new MetaMedicis($MedicisMap);
```

A non-exhaustive list of possibilities (cf. interfaces for more):

```
$MedicisTransl = $MetaMedicis->getMedicisMember('Transl');
$MedicisTransl->collcTranslBuild($collcId);

$MedicisSchema = $MetaMedicis->getMedicisMember('Schema');
$MedicisSchema->schBuild($collcId);

$MedicisCollc = $MetaMedicis->getMedicisMember('Collc');
$MedicisCollc->collcBuild($collcId, $translToo = true);
$MedicisCollc->collcConfigBuild($collcId);
$MedicisCollc->dummyDataBuild($collcId);

$MedicisGroup = $MetaMedicis->getMedicisMember('Group');
$MedicisGroup->groupBuild($groupId, $translToo = true);
```

Contributing
------------

[](#contributing)

Sure! You can take a loot at [CONTRIBUTING](CONTRIBUTING.md).

License
-------

[](#license)

This project is under the MIT License; cf. [LICENSE](LICENSE) for details.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

1806d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0abf823fded25a054764d7b7106a69b4281ff506994ffe2fea00d8a9296e715a?d=identicon)[I-is-as-I-does](/maintainers/I-is-as-I-does)

---

Top Contributors

[![I-is-as-I-does](https://avatars.githubusercontent.com/u/66915011?v=4)](https://github.com/I-is-as-I-does "I-is-as-I-does (18 commits)")

---

Tags

clijsonphpschematranslationphpjsonschema

### Embed Badge

![Health badge](/badges/ssitu-medicis/health.svg)

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

###  Alternatives

[evaisse/php-json-schema-generator

A JSON Schema Generator.

20298.5k1](/packages/evaisse-php-json-schema-generator)[open-code-modeling/json-schema-to-php

Parses JSON schema files and provides an API to easily generate code from JSON schema.

111.0k2](/packages/open-code-modeling-json-schema-to-php)

PHPackages © 2026

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