PHPackages                             so-lean/cleanprospecter - 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. so-lean/cleanprospecter

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

so-lean/cleanprospecter
=======================

P.O.C. of clean architecture (unclebob)

0.0.1(8y ago)112MITPHPCI failing

Since Jun 24Pushed 4mo agoCompare

[ Source](https://github.com/SO-LEAN/cleanprospecter)[ Packagist](https://packagist.org/packages/so-lean/cleanprospecter)[ RSS](/packages/so-lean-cleanprospecter/feed)WikiDiscussions develop Synced 2w ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

[![PR CI](https://github.com/SO-LEAN/cleanprospecter/actions/workflows/on-pr.yml/badge.svg)](https://github.com/SO-LEAN/cleanprospecter/actions/workflows/on-pr.yml)[![maintanibility](https://camo.githubusercontent.com/2ea39d99f059921acacb6d24f38cb2fa05906ae3a62e0bacd8d6f46bca1001f0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62363163616537343337636261326435363466622f6d61696e7461696e6162696c697479)](https://camo.githubusercontent.com/2ea39d99f059921acacb6d24f38cb2fa05906ae3a62e0bacd8d6f46bca1001f0/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62363163616537343337636261326435363466622f6d61696e7461696e6162696c697479)[![coverage](https://camo.githubusercontent.com/12dcab89e56121635e3a89a24d35727c61b77e071d41b4357e96ad1e21809675/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62363163616537343337636261326435363466622f746573745f636f766572616765)](https://camo.githubusercontent.com/12dcab89e56121635e3a89a24d35727c61b77e071d41b4357e96ad1e21809675/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62363163616537343337636261326435363466622f746573745f636f766572616765)

Cleanprospecter
===============

[](#cleanprospecter)

**Cleanprospecter** is a php 7.2 business prospect application designed according to Robert C. Martin [recommendations for clean architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html).

Add cleanprospecter in your project with [composer](https://getcomposer.org).

```
 $ composer require so-lean/cleanprospecter
```

A **symfony 4.1** implementation can be found on github [here](https://github.com/SO-LEAN/prospecterapp)

Progress
--------

[](#progress)

Consider that scope as the **minimal viable product**.

- As anonymous, I want to login
- As main app, I want to refresh user
- As prospector, I want to create organization
- As prospector, I want to find my own organizations
- As prospector, I want to get organization
- As prospector, I want to update organization
- As prospector, I want to create organization
- As user, I want to get my account information
- As user, I want to update my account information
- As user, I want to remove my organization logo
- As prospector, I want to create prospect
- As prospector, I want to find my own prospects
- As prospector, I want to create phone call event
- As prospector, I want to create appointment event
- As prospector, I want to create email event
- As prospector, I want to create sms event
- As prospector, I want to find my own prospects

In the future
-------------

[](#in-the-future)

- tags
- auto import events from email box, short message service etc...
- email marketing campaign

Clean architecture -*Business rules as a simple composer package.*-
-------------------------------------------------------------------

[](#clean-architecture--business-rules-as-a-simple-composer-package-)

 [![The Clean Architecture](https://camo.githubusercontent.com/acaf1fefab1126cd143635ea1371154c1aa0bd27d5ff4ff7043532cdd1310d20/68747470733a2f2f3874686c696768742e636f6d2f626c6f672f6173736574732f706f7374732f323031322d30382d31332d7468652d636c65616e2d6172636869746563747572652f436c65616e4172636869746563747572652d386431666530363665386637666139633764386538346331613662306532623734623263363730666638303532383238663461376537336663626263363938632e6a7067)](https://camo.githubusercontent.com/acaf1fefab1126cd143635ea1371154c1aa0bd27d5ff4ff7043532cdd1310d20/68747470733a2f2f3874686c696768742e636f6d2f626c6f672f6173736574732f706f7374732f323031322d30382d31332d7468652d636c65616e2d6172636869746563747572652f436c65616e4172636869746563747572652d386431666530363665386637666139633764386538346331613662306532623734623263363730666638303532383238663461376537336663626263363938632e6a7067)

A good explanation is available in this Uncle Bob [talk here](https://www.youtube.com/watch?v=Nsjsiz2A9mg)

> A GOOD ARCHITECTURE MAXIMIZES THE NUMBER OF DECISIONS NOT MADE
>
> - UNCLE BOB

Terminological differences
--------------------------

[](#terminological-differences)

In order to clarify some uncle bob concepts

- Interactors becomes use cases and are locatated in src/UseCase/**UseCaseName** and take its name from it : *ex* FindMyOwnOrganizations
- Request an response are data transfer object and are located at the same place : *ex* FindMyOwnOrganizations**Request**, FindMyOwnOrganizations**Response**
- Presenter interface (Dependency inversion) too : *ex* FindMyOwnOrganizations**Presenter**
- Gateways is not only database abstraction, entity gateway are located in src/Gateway/Entity

How to implement cleanprospecter
--------------------------------

[](#how-to-implement-cleanprospecter)

Clean architecture use dependency injection to build uses cases.

1 You need to implement all Gateways in your main application

- Build use cases in the IOC
- Register it in the facade.

```
    // in IOC

    //OrganizationGatewayImpl implements OrganizationGateway interface
    $organizationGateway = new OrganizationGatewayImpl();

    $useCase = new GetOrganizationImpl($organizationGateway);

    //Create facade and register use case
    $facade = new UseCasesFacade();
    $facade->addUseCase($useCase);
```

```
    // in controller (or somewhere else)
    $request = new GetOrganizationRequest(7);

    //presenter implements GetOrganizationPresenter
    $presenter = new GetOrganizationPresenterImpl();

    //all use case is accessible by their name
    $facade->getOrganization($request, $presenter);
```

A use case can say what it does

```
   //...

   $useCase = new GetOrganizationImpl($organizationGateway);

   echo $useCase;

   //Display : "As prospector, I want to get organization"
```

Developer tools
---------------

[](#developer-tools)

### prerequisites

[](#prerequisites)

- docker
- docker-compose

All common command lines are accessible by the Makefile. Make create a docker image based on official php alpine docker image (php 7.2.3) with xdebug and composer installed globally.

```
    $ make
```

### Commands

[](#commands)

make **command**

Commandcommentsbuild-envBuild the docker env file tagged *prospecter-run*composerinstall vendorscomposer-updateupdate vendorstestexecute tests suitetestdoxexecute tests and write agile documentation in text formattest-coverageexecute tests and generate report in html formatcscode sniffercs-fixfix automatically code sniffer errors

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance52

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity57

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

2927d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4016993?v=4)[Chris Schnabel](/maintainers/solean)[@solean](https://github.com/solean)

---

Top Contributors

[![michel-maier](https://avatars.githubusercontent.com/u/3489746?v=4)](https://github.com/michel-maier "michel-maier (126 commits)")

---

Tags

clean-architecturephpsymfony

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/so-lean-cleanprospecter/health.svg)

```
[![Health](https://phpackages.com/badges/so-lean-cleanprospecter/health.svg)](https://phpackages.com/packages/so-lean-cleanprospecter)
```

PHPackages © 2026

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