All Projects → structurizr-php → Structurizr Php

structurizr-php / Structurizr Php

Licence: mit
🗺 https://structurizr.com library for PHP - generate architecture diagrams from code

Projects that are alternatives of or similar to Structurizr Php

Arkit
JavaScript architecture diagrams and dependency graphs
Stars: ✭ 671 (+468.64%)
Mutual labels:  architecture, diagram
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+2884.75%)
Mutual labels:  architecture, diagram
Diagrams
🎨 Diagram as Code for prototyping cloud system architectures
Stars: ✭ 15,756 (+13252.54%)
Mutual labels:  architecture, diagram
cloudgram
Generate diagrams for your cloud architecture using code
Stars: ✭ 68 (-42.37%)
Mutual labels:  diagram, architecture
plantuml-libs
A set of PlantUML libraries and a NPM cli tool to design diagrams which focus on several technologies/approaches: Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), C4 Model or even EventStorming and more.
Stars: ✭ 75 (-36.44%)
Mutual labels:  diagram, architecture
bian
The Banking Industry Architecture Network e.V. (BIAN) model in Archimate 3
Stars: ✭ 48 (-59.32%)
Mutual labels:  diagram, architecture
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (+109.32%)
Mutual labels:  architecture, diagram
fc4-framework
A Docs as Code tool that helps software creators and documentarians author software architecture diagrams using the C4 model for visualising software architecture.
Stars: ✭ 121 (+2.54%)
Mutual labels:  diagram, architecture
Patterns
Complete catalog of all classical patterns in the Archimate language
Stars: ✭ 70 (-40.68%)
Mutual labels:  architecture, diagram
Android Architecture
🌇该项目结合 MVP 与 Clean 架构思想,探索在 Android 项目上的最佳实践。
Stars: ✭ 112 (-5.08%)
Mutual labels:  architecture
Unidirectional Architecture On Mobile
Dive into 📱 Unidirectional Architecture!
Stars: ✭ 115 (-2.54%)
Mutual labels:  architecture
Vscode Mermaid Preview
Previews Mermaid diagrams
Stars: ✭ 111 (-5.93%)
Mutual labels:  diagram
Rxviper
Android micro framework for developing apps based on clean VIPER architecture.
Stars: ✭ 112 (-5.08%)
Mutual labels:  architecture
Firefox Browser Architecture
Proposals for future Firefox browser architecture
Stars: ✭ 116 (-1.69%)
Mutual labels:  architecture
Deptrac
Keep your architecture clean.
Stars: ✭ 1,784 (+1411.86%)
Mutual labels:  architecture
Lelylan
Open Source Lightweight Microservices Architecture for the Internet of Things. For developers.
Stars: ✭ 1,513 (+1182.2%)
Mutual labels:  architecture
Butterfly
🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)
Stars: ✭ 2,343 (+1885.59%)
Mutual labels:  diagram
Android Studio Mvp Template Google Architecture
Stars: ✭ 111 (-5.93%)
Mutual labels:  architecture
Fanray
A blog built with ASP.NET Core
Stars: ✭ 117 (-0.85%)
Mutual labels:  architecture
Terrascan
Detect compliance and security violations across Infrastructure as Code to mitigate risk before provisioning cloud native infrastructure.
Stars: ✭ 2,687 (+2177.12%)
Mutual labels:  architecture

Structurizr for PHP

Minimum PHP Version Latest Stable Version Total Downloads License

This repository is a port of Structurizr for Java. All credits for creating C4 goes of course to Simon Brown this library is nothing more that simple port of the code that already exists in other language.

How to Use

Installation

composer require structurizr-php/structurizr-php

A quick example

As an example, the following PHP code can be used to create a software architecture model and an associated view that describes a user using a software system.

<?php 

$workspace = new Workspace(
    $id = (string)\getenv('STRUCTURIZR_WORKSPACE_ID'),
    $name = 'Getting Started',
    $description = 'This is a model of my software system. by structurizr-php/structurizr-php'
);
$workspace->getModel()->setEnterprise(new Enterprise('Structurizr PHP'));
$person = $workspace->getModel()->addPerson(
    $name = 'User',
    $description = 'A user of my software system.',
    Location::internal()
);
$softwareSystem = $workspace->getModel()->addSoftwareSystem(
    $name = 'Software System',
    $description = 'My software system.',
    Location::internal()
);
$person->usesSoftwareSystem($softwareSystem, 'Uses', 'Http');

$contextView = $workspace->getViews()->createSystemContextView($softwareSystem, 'System Context', 'system01', 'An example of a System Context diagram.');
$contextView->addAllElements();
$contextView->setAutomaticLayout(true);

$styles = $workspace->getViews()->getConfiguration()->getStyles();

$styles->addElementStyle(Tags::SOFTWARE_SYSTEM)->background("#1168bd")->color('#ffffff');
$styles->addElementStyle(Tags::PERSON)->background("#08427b")->color('#ffffff')->shape(Shape::person());

$client = new Client(
    new Credentials((string) \getenv('STRUCTURIZR_API_KEY'), (string) \getenv('STRUCTURIZR_API_SECRET')),
    new UrlMap('https://api.structurizr.com'),
    new Psr18Client(),
    new SymfonyRequestFactory(),
    new Logger('structurizr', [new StreamHandler('php://stdout')])
);
$client->put($workspace);

The view can then be exported to be visualised in a number of different ways; e.g. PlantUML, Structurizr and Graphviz:

Views can be exported and visualised in many ways; e.g. PlantUML, Structurizr and Graphviz

More Examples

Hire in Social

Hire in Social - project example

Structurizr Workspace

System Landscape

System Landscape System Landscape Key

Container

Container Container Key

Big Bank Plc

System Landscape System Context Contianer Components Dynamic Development Deployment Live Deployment

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].