whatisgithub

What is structarmed?

boundwize/structarmed — explained in plain English

Analysis updated 2026-05-18

14PHPAudience · developerComplexity · 3/5Setup · easy

In one sentence

A PHP tool that turns your project's architecture rules into automated checks that catch layer violations before they become habits.

Mindmap

mindmap
  root((StructArmed))
    What it does
      Enforce architecture rules
      Detect layer violations
      Config driven
    Tech stack
      PHP
      Composer
    Use cases
      Check PSR presets
      Define custom layers
      Run in CI
    Audience
      Developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Enforce that a domain layer never imports from an infrastructure layer

USE CASE 2

Check a project against PSR-4, PSR-1, PSR-12, MVC, or DDD presets

USE CASE 3

Define custom layers and rules for your own project structure

USE CASE 4

Catch architecture violations automatically in CI before they spread

What is it built with?

PHPComposer

How does it compare?

boundwize/structarmedkukuhtw/toko_kopimyneid/laravel-db-tui
Stars141515
LanguagePHPPHPPHP
Setup difficultyeasymoderateeasy
Complexity3/53/52/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires defining a structarmed.php config before analysis is useful.

So what is it?

StructArmed is a PHP tool that turns architecture decisions into automated checks. Instead of documenting your project's structural rules in a wiki, you define them in a PHP configuration file and then run an analysis command that reports any violations. The idea is to catch dependency boundary violations, for example, a domain layer importing from an infrastructure layer, before they silently become habits. The setup flow starts with an init command that generates a structarmed.php config file in your project root. The tool ships with ready-made presets for common architecture styles: PSR-4 for verifying source paths match Composer namespace mappings, PSR-1 for basic coding standards, PSR-12 for visibility conventions, MVC for thin controllers and layered separation, and DDD for domain-driven design conventions around entities, value objects, repositories, events, and services. You can enable one preset, multiple presets, or all at once. Beyond presets, you can define your own layers by mapping them to directory paths or namespace patterns, then declare a ruleset specifying which layers are allowed to depend on which others. Custom rules can be added, existing preset rules can be replaced, and individual rules or paths can be skipped for known exceptions without disabling an entire check. Running structarmed analyse scans your codebase and reports each violation with the relevant class and the rule it broke. If everything passes, it prints a clean summary. StructArmed is written in PHP and installed as a Composer development dependency. The README notes support for Windows, macOS, and Linux. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Help me run structarmed init to generate a starting config for my PHP project
Prompt 2
Show me how to define custom layers and rules in structarmed.php
Prompt 3
Explain the DDD preset rules structarmed enforces
Prompt 4
Write a CI step that runs structarmed analyse and fails the build on violations

Frequently asked questions

What is structarmed?

A PHP tool that turns your project's architecture rules into automated checks that catch layer violations before they become habits.

What language is structarmed written in?

Mainly PHP. The stack also includes PHP, Composer.

How hard is structarmed to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is structarmed for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.