# deptrac/deptrac

Keep your architecture clean.

Repository: https://github.com/deptrac/deptrac
Canonical: https://ross.abutalabs.com/products/deptrac
Homepage: http://deptrac.github.io/deptrac/
Language: PHP
License: MIT
License Family: permissive
Topics: architecture, php, clean-architecture
Last push: 2026-08-14T18:47:53+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 94, longevity 100
- inputs: {"age_days": 3960, "days_push": 19, "days_rel": 41, "gap_med": 21.5, "n_releases_24m": 19}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2997, forks 154 (observed 2026-08-28T04:07:37.175684+00:00)

## What it is
Deptrac is a static code analysis tool for PHP that helps you communicate, visualize, and enforce architectural decisions in your projects. It lets you define architectural layers over classes and rules between them, then checks violations in CI and can visualize dependencies via Graphviz or Mermaid.

## Use cases
- enforce architectural layer boundaries in a PHP codebase
- prevent modules or bundles from depending on each other
- run architecture rule checks in a CI pipeline on pull requests
- visualize class dependencies between layers with Graphviz or Mermaid diagrams
- keep a large PHP application's architecture clean and documented
- detect violations of dependency rules between namespaces or classes

## When to choose
- you have a PHP project with multiple modules, bundles, or layers that should stay independent
- you want to automatically enforce architecture rules in CI
- you need to visualize and document dependency structure of a PHP codebase

## When to avoid
- your project is not written in PHP
- you need runtime dependency injection or service container management rather than static analysis
- you only need general linting or code style checks rather than architectural rules

## Facets
- artifact type: cli-tool
- maturity: active
- function: static-site-generator, linter, developer-tools, cli
- domain: developer-tools
- platform: cli, php, cross-platform
- tags: architecture-rules, dependency-analysis, code-quality, ci-pipeline, php, layered-architecture, static-analysis, visualization, architecture, clean-architecture

## Member repositories
- deptrac/deptrac (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:37.175684+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:30:44.132755+00:00, confidence not recorded.
  - readme: https://github.com/deptrac/deptrac (fetched 2026-08-28T04:07:37.175684+00:00, sha 0120037bc670)
  - homepage: http://deptrac.github.io/deptrac/ (fetched 2026-08-29T09:45:54.582583+00:00, sha fc97de695a11)
- Data as of 2026-08-30T08:39:29.467469+00:00.
