PHPackages                             salines/parcelbridge - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. salines/parcelbridge

ActiveProject[Utility &amp; Helpers](/categories/utility)

salines/parcelbridge
====================

CakePHP 5 application for package forwarding and shipment workflows

v1.0.1(2mo ago)12[11 PRs](https://github.com/salines/parcelbridge/pulls)MITPHPPHP &gt;=8.3CI passing

Since May 11Pushed 1mo agoCompare

[ Source](https://github.com/salines/parcelbridge)[ Packagist](https://packagist.org/packages/salines/parcelbridge)[ Docs](https://github.com/salines/parcelbridge)[ Fund](https://www.paypal.me/paradzikn)[ RSS](/packages/salines-parcelbridge/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (20)Versions (19)Used By (0)

ParcelBridge: CakePHP 5 App for Package Forwarding and Shipment Workflows
=========================================================================

[](#parcelbridge-cakephp-5-app-for-package-forwarding-and-shipment-workflows)

[![CI](https://github.com/salines/parcelbridge/actions/workflows/ci.yml/badge.svg)](https://github.com/salines/parcelbridge/actions/workflows/ci.yml)[![PHP](https://camo.githubusercontent.com/f276fa86a026b80ddb39a8c325682146659ba56cdc872905db20f421963fe47f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737374242343f6c6f676f3d706870)](https://www.php.net)[![CakePHP](https://camo.githubusercontent.com/a3c5f51ab4836369e56276baf1e7534ee34ceefe671697f9a968e70a5b3ea10d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f43616b655048502d352e782d4433334334343f6c6f676f3d63616b65706870)](https://cakephp.org)[![License](https://camo.githubusercontent.com/5caa455d8debc46fb23abbadb45a733a937f3910a73fc875c2f7820468e1bb54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e)](LICENSE)

[![ParcelBridge](parcelbridge.png)](parcelbridge.png)

ParcelBridge is an open-source CakePHP 5 starter application for developers building package forwarding, warehouse intake, invoice review, ship request, and shipment tracking workflows.

The project is designed as a backend-first starting point, not as a finished SaaS product. Its focus is a solid CakePHP 5 structure, database schema, business workflow logic, authorization, API endpoints, and automated tests. The user interface is intentionally minimal and scaffold/mockup-style, so the workflow can be tested, extended, and adapted quickly for a specific business case.

The application covers the core logistics flow: receiving packages at a warehouse, linking packages to clients, uploading invoices, reviewing and approving invoices, creating ship requests, processing outbound shipments, and tracking package status through pickup or delivery.

The starter kit includes authentication, role-based access for administrators and clients, authorization policies, CakePHP ORM models, database migrations, PHP enums with i18n-ready labels, API-prefixed controllers, OpenAPI/Swagger documentation, CSV/PDF generation, and tests for the critical business logic.

ParcelBridge is intended for developers who want a practical foundation for a custom logistics system without having to build the initial architecture, security model, and workflow rules from scratch.

Stack
-----

[](#stack)

- CakePHP 5
- PHP 8.3
- MariaDB 10.11
- Apache via DDEV `apache-fpm`
- CakePHP Migrations
- CakePHP Authentication
- CakePHP Authorization
- FriendsOfCake Search
- FriendsOfCake CakePdf with Dompdf
- FriendsOfCake CsvView
- FriendsOfCake Upload

The project was created from the official `cakephp/app` skeleton. DDEV is used so the reviewer can run the same local LAMP-style environment without manual PHP, Apache, or database setup.

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

[](#installation)

Prerequisites:

- Docker or [OrbStack](https://orbstack.dev)
- [DDEV](https://ddev.com)

### Via Composer (recommended)

[](#via-composer-recommended)

```
composer create-project salines/parcelbridge myapp
cd myapp
cp config/.env.ddev config/.env
```

### Via Git clone

[](#via-git-clone)

```
git clone https://github.com/salines/parcelbridge.git myapp
cd myapp
cp config/.env.ddev config/.env
```

Start DDEV:

```
ddev start
```

The project has a DDEV `post-start` hook that automatically runs dependency installation, database migrations, and demo seed data when the database is empty. The seed is skipped on later starts if users already exist.

Manual setup commands are still available if you want to run them explicitly:

```
ddev composer install
ddev exec bin/cake migrations migrate
```

To reset the demo data intentionally, run:

```
ddev exec bin/cake seeds run InitSeed --force
```

Open the app:

```
https://parcelbridge.ddev.site

```

If DDEV reports that the same project root was previously registered under another project name, unlist the old project name and start again:

```
ddev stop --unlist
ddev start
```

Demo Accounts
-------------

[](#demo-accounts)

Admin:

```
Email: admin@parcelbridge.test
Password: password123
URL: https://parcelbridge.ddev.site/login

```

Client:

```
Email: client@parcelbridge.test
Password: password123
URL: https://parcelbridge.ddev.site/login

```

MVP Workflow
------------

[](#mvp-workflow)

Admin portal:

- Dashboard: `/admin`
- Package intake: `/admin/packages/add`
- All packages: `/admin/packages`
- Package CSV export: `/admin/packages/export-csv`
- Dynamic package PDF: `/admin/packages/document/{id}`
- Invoice review queue: `/admin/invoices`
- Ship requests: `/admin/ship-requests`
- Ship requests CSV export: `/admin/ship-requests/export-csv`
- Dynamic ship request manifest PDF: `/admin/ship-requests/manifest/{id}`
- Clients: `/admin/clients`

Client portal:

- Dashboard: `/client`
- My packages: `/client/packages`
- Package CSV export: `/client/packages/export-csv`
- Dynamic package PDF: `/client/packages/document/{id}`
- Upload invoice: available from package detail for packages in `Ready to Send` or `Needs Review`
- Create ship request: `/client/ship-requests/add`
- Ship request CSV export: `/client/ship-requests/export-csv`
- Dynamic ship request manifest PDF: `/client/ship-requests/manifest/{id}`
- Shipment status: `/client/shipments`

Seed Data
---------

[](#seed-data)

`InitSeed` creates:

- one admin user
- one client user
- one client profile
- demo packages in multiple workflow statuses
- demo invoice records
- demo PDF invoice files in `resources/pdf/invoices`
- a processed demo ship request
- package status history rows

Demo invoice files are intentionally small PDF files committed with the MVP so the admin invoice “Open File” flow works immediately after seeding.

Documents and Exports
---------------------

[](#documents-and-exports)

Invoice files are private application documents, not public web assets. They are stored outside `webroot` under:

```
resources/pdf/invoices

```

The committed demo invoice PDFs live in the same private resources folder so the seeded invoice review flow works immediately after checkout. Uploaded invoice files use the same storage location and are served only through authorized controller actions.

The app also generates operational documents dynamically:

- package PDF documents for admin and client package detail screens
- ship request manifest PDFs for admin and client ship request detail screens
- CSV exports for package and ship request index screens

PDF generation uses `friendsofcake/cakepdf` with `dompdf/dompdf` so the feature works inside DDEV without installing external binaries. CSV generation uses `friendsofcake/cakephp-csvview`, which follows CakePHP view-class conventions instead of hand-building CSV strings in controllers.

Client CSV exports are scoped through Authorization policy scopes, so clients only export their own records. Admin exports include all matching records.

Domain Model
------------

[](#domain-model)

Main tables:

- `users`
- `clients`
- `packages`
- `invoices`
- `ship_requests`
- `packages_ship_requests`
- `package_status_histories`

The initial schema is defined in:

```
config/Migrations/20260508000000_Init.php

```

Enums are defined in:

```
src/Model/Enum

```

Enum labels are i18n-ready via `label()` methods using CakePHP `__()`.

Authentication and Authorization
--------------------------------

[](#authentication-and-authorization)

Authentication uses `cakephp/authentication`.

Authorization uses `cakephp/authorization` with:

- request-level portal access through `RequestPolicy`
- ORM resource policies for packages, invoices, ship requests, clients, and users
- strict authorization middleware enabled

Clients are scoped to their own packages, invoices, and ship requests. Admin users can access the admin portal and manage the MVP workflow.

API Documentation
-----------------

[](#api-documentation)

The API is documented with a local OpenAPI spec and local Swagger UI assets.

```
https://parcelbridge.ddev.site/swagger-ui/
https://parcelbridge.ddev.site/api/openapi.json

```

The API currently uses the same session authentication as the CakePHP app. In Swagger UI, call `POST /api/login` first, then use the other endpoints in the same browser session.

Workflow Integrity
------------------

[](#workflow-integrity)

Package status transitions are enforced server-side in:

```
src/Model/Table/PackagesTable.php

```

Ship request submission rules are enforced server-side in:

```
src/Model/Table/ShipRequestsTable.php

```

Covered behavior includes:

- packages cannot skip required lifecycle steps
- status changes write audit rows to `package_status_histories`
- ship requests require at least one approved package
- submitted ship request packages move to `Ship Requested`
- processed ship request packages move to `Shipped`

Tests
-----

[](#tests)

Run the test suite:

```
ddev exec vendor/bin/phpunit
```

Run static analysis:

```
ddev exec composer stan
```

Run code style checks:

```
ddev exec composer cs-check
```

Automatically fix supported code style issues:

```
ddev exec composer cs-fix
```

Known Limitations
-----------------

[](#known-limitations)

- UI uses CakePHP baked templates with targeted MVP workflow cleanup, not a polished custom design.
- Client registration is not implemented because it is out of scope for the MVP.
- Email notifications, payments, and production deployment are out of scope.

License
-------

[](#license)

ParcelBridge is open-source software licensed under the MIT License. See [LICENSE](LICENSE).

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~8 days

Total

2

Last Release

66d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.2

v1.0.1PHP &gt;=8.3

### Community

Maintainers

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

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")[![salines](https://avatars.githubusercontent.com/u/343737?v=4)](https://github.com/salines "salines (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/salines-parcelbridge/health.svg)

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

###  Alternatives

[bedita/manager

BEdita Manager - official admin webapp for BEdita4 API

131.2k](/packages/bedita-manager)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k46](/packages/civicrm-civicrm-core)[verbb/formie

The most user-friendly forms plugin for Craft.

101393.6k74](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54681.3k20](/packages/solspace-craft-freeform)[dereuromark/cakephp-translate

A CakePHP plugin for managing translations

1712.3k](/packages/dereuromark-cakephp-translate)

PHPackages © 2026

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