PHPackages                             opencat/project - 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. opencat/project

ActiveLibrary[Framework](/categories/framework)

opencat/project
===============

Project manifest and catpack archive format for the OpenCAT Framework

00PHP

Since May 9Pushed 1mo agoCompare

[ Source](https://github.com/shaikhammar/opencat-project)[ Packagist](https://packagist.org/packages/opencat/project)[ RSS](/packages/opencat-project/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

opencat/project
===============

[](#opencatproject)

Project manifest and catpack archive format for the [OpenCAT Framework](https://github.com/shaikhammar/opencat-framework).

Defines `catproject.json` (the project configuration file) and `.catpack` (a portable ZIP archive that bundles source files, TM databases, glossaries, and XLIFF). Also provides pluggable stores for persisting segments and skeletons during long-running translation sessions.

Installation
------------

[](#installation)

```
composer require opencat/project
```

Requires `ext-zip`. For PostgreSQL stores, install `ext-pdo_pgsql`.

Project manifest
----------------

[](#project-manifest)

A `catproject.json` file describes a translation project:

```
{
    "name": "Annual Report 2024",
    "sourceLang": "en-US",
    "targetLangs": ["fr-FR", "de-DE"],
    "tm": [
        { "path": "tm/main.db", "readOnly": false }
    ],
    "glossaries": [
        { "path": "glossaries/legal.db", "readOnly": true }
    ],
    "mt": {
        "adapter": "deepl",
        "apiKey": "your-key-here",
        "fillThreshold": 0.75
    },
    "qa": {
        "checks": ["TagConsistencyCheck", "EmptyTranslationCheck", "NumberConsistencyCheck"],
        "failOnSeverity": "error"
    },
    "filters": {
        "docx": {},
        "xlsx": {}
    }
}
```

Load it with `ProjectLoader`:

```
use CatFramework\Project\ProjectLoader;

$manifest = ProjectLoader::load('/path/to/catproject.json');
echo $manifest->name;          // "Annual Report 2024"
echo $manifest->sourceLang;    // "en-US"
```

Catpack archive
---------------

[](#catpack-archive)

A `.catpack` file is a ZIP containing:

```
catproject.json       — project manifest
source/               — original source files
tm/                   — SQLite TM databases (stored uncompressed)
glossaries/           — SQLite glossary databases (stored uncompressed)
xliff/                — generated XLIFF files

```

### Creating a catpack

[](#creating-a-catpack)

```
use CatFramework\Project\CatpackArchive;

$archive = CatpackArchive::create('project.catpack', $manifest);
$archive->addSourceFile('report.docx');
$archive->addTm('tm/main.db', 'main.db');
$archive->addGlossary('glossaries/legal.db', 'legal.db');
$archive->addXliff('report.docx.xlf', 'report.docx.xlf');
$archive->save();
```

### Opening a catpack

[](#opening-a-catpack)

```
$archive = CatpackArchive::open('project.catpack');
$manifest = $archive->getManifest();

$archive->extractTo('/tmp/working-dir');
```

Segment stores
--------------

[](#segment-stores)

Segment stores persist `SegmentPair` objects during processing, so a long-running workflow can be resumed after interruption.

ClassBackendUse case`InMemorySegmentStore`PHP arrayTests and single-request processing`SqliteSegmentStore`SQLite fileSingle-user, no server required`PostgresSegmentStore`PostgreSQLMulti-user deployments```
use CatFramework\Project\Store\SqliteSegmentStore;

$store = new SqliteSegmentStore('session.db');
$store->persistSegment($pair, $index, $fileId);

$storedPairs = $store->loadSegments($fileId);
```

All three implement `SegmentStoreInterface`.

Skeleton stores
---------------

[](#skeleton-stores)

Skeleton stores persist the filter skeleton (needed to rebuild the translated file) separately from segments.

ClassBackend`FilesystemSkeletonStore`Files on disk`DatabaseSkeletonStore`SQLite or PostgreSQLBoth implement `SkeletonStoreInterface`.

MT fill threshold
-----------------

[](#mt-fill-threshold)

`MtConfig::$fillThreshold` controls when MT kicks in. When `WorkflowRunner` finds a TM match below this score (or no match at all) it calls the MT adapter. Set to `0.0` to disable MT entirely; `0.75` means "use MT when the best TM match is below 75%".

Related packages
----------------

[](#related-packages)

- [`opencat/core`](https://github.com/shaikhammar/opencat-framework/tree/main/packages/core) — `BilingualDocument`, `SegmentPair`
- [`opencat/workflow`](https://github.com/shaikhammar/opencat-framework/tree/main/packages/workflow) — `ProjectWorkflowBuilder` takes a `ProjectManifest` and constructs a fully wired `WorkflowRunner`

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (3 commits)")

### Embed Badge

![Health badge](/badges/opencat-project/health.svg)

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k104.3M822](/packages/laravel-socialite)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k38.6M289](/packages/laravel-dusk)[pinguo/php-msf

Pinguo Micro Service Framework For PHP

1.7k4.2k](/packages/pinguo-php-msf)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)

PHPackages © 2026

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