dndark/laravel-logic-map
Composer 安装命令:
composer require dndark/laravel-logic-map
包简介
Understand, audit, and visualize your Laravel application's workflows, change impact, and architectural risk.
README 文档
README
Laravel Logic Map
Understand, audit, and visualize your Laravel application's workflows, change impact, and architectural risk.
Laravel Logic Map is a local-first Laravel package that maps how logic moves through your app — from routes to controllers, services, jobs, events, and persistence.
It provides humans and AI assistants with a deterministic, AST-powered single source of truth for architectural dependencies and execution flows.
Key Features
- Workflow Visualization: Interactive rendering of your Laravel application's true execution paths.
- Change Intelligence: Understand the exact Blast Radius (impact) and execution Trace of any class, method, or route.
- Deterministic AST Analysis: Uses
nikic/php-parserto extract code structure without runtime performance hits. - AI-Ready Documentation: Export your codebase logic into token-efficient
llms.txtand Markdown Workflow Dossiers optimized for LLM consumption.
Installation
composer require dndark/laravel-logic-map --dev php artisan vendor:publish --tag=logic-map-config php artisan vendor:publish --tag=logic-map-full
Commands
php artisan logic-map:build # Build graph snapshot php artisan logic-map:analyze # Re-run architectural analysis php artisan logic-map:export-docs # Export workflow dossiers & llms.txt context php artisan logic-map:export-note # Export a node's Impact/Trace report php artisan logic-map:clear-cache # Clear cached snapshots
Access the UI at: /logic-map
API Endpoints
GET /logic-map/overview— Full graphGET /logic-map/subgraph/{id}— Node neighborhoodGET /logic-map/impact/{id}— Impact blast radius (JSON)GET /logic-map/trace/{id}— Workflow trace traversal (JSON)GET /logic-map/reports/impact/{id}— HTML Impact Report UIGET /logic-map/reports/trace/{id}— HTML Trace Report UI- And various JSON/CSV/Markdown export lines...
⌨️ Keyboard Shortcuts
| Key | Action |
|---|---|
1 |
Graph Mode (Full map) |
2 |
Flow Mode (Request paths only) |
3 |
Risk Mode (Audit hotspots) |
4 |
Zones Mode (High-level module boundaries) |
F |
Fit graph to view |
S |
SubGraph mode (on selected node) |
H |
Toggle Complexity Heatmap |
M |
Toggle Module Explorer |
T |
Cycle Themes |
⌘K |
Focus search |
Esc |
Close panel / Exit SubGraph |
? |
Show shortcuts modal |
📊 View Modes
Laravel Logic Map provides 4 distinct semantic view modes to help answer different architectural questions:
- Graph Mode (
1): Full dependency map. Shows all nodes and all edges perfectly as parsed. - Flow Mode (
2): Workflow paths. Hides utility classes/enums and drops messy edges (like simple model imports) to visualize how requests actually travel through code. - Risk Mode (
3): Hotspot audit. Isolates the top 30% most coupled & complex nodes and expands their 1-hop context. - Zones Mode (
4): Module overview. Aggregates all nodes into high-level logical "supernodes" per module. Double-click a zone to instantly isolate it and see its internal Flow.
Requirements
- PHP 8.2+
- Laravel 10 / 11 / 12
License
The MIT License (MIT). Please see License for more information.
dndark/laravel-logic-map 适用场景与选型建议
dndark/laravel-logic-map 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Metrics」 「graph」 「laravel」 「architecture」 「static-analysis」 「visualization」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 dndark/laravel-logic-map 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dndark/laravel-logic-map 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 dndark/laravel-logic-map 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Netgen Open Graph Bundle is an Ibexa Platform bundle that allows simple integration with Open Graph protocol.
A tool for scraping URL resources (oEmbed, OpenGraph, Twitter cards, JSON-LD)
A abstraction for generating metrics in Laravel.
Laravel SDK for working with prometheus metrics
Production-ready Laravel Prometheus metrics package with built-in collectors for HTTP, database, cache, queue, events, errors, filesystem, and mail monitoring
Tool to show code coverage metrics, measured by PHP Unit in Cobertura format, in console and CI/CD pipeline
统计信息
- 总下载量: 7
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-17
