explaingit

muhammad-waleed-khalil/carvephp

Analysis updated 2026-05-18

3PHPAudience · developerComplexity · 3/5LicenseSetup · easy

TLDR

A Laravel Composer package that scans a PHP monolith, identifies natural service boundaries using static analysis and runtime tracing, and generates a confidence-scored migration report.

Mindmap

mindmap
  root((CarvePHP))
    Analysis
      Static scan
      Runtime tracing
      Dependency graph
    Outputs
      Service boundaries
      Migration report
      Confidence scores
    Experimental
      Service stubs
      OpenAPI specs
      Client SDKs
    Requirements
      PHP 8.2 plus
      Laravel 11 to 13
      Composer 2
Click or tap to explore — scroll the page freely

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

Scan a large Laravel codebase to get a confidence-scored report identifying which parts could become separate services.

USE CASE 2

Enable runtime tracing in a Laravel app to capture which routes and models run together during real requests.

USE CASE 3

Generate an OpenAPI stub for a candidate service boundary identified by CarvePHP.

What is it built with?

PHPLaravelComposer

How does it compare?

muhammad-waleed-khalil/carvephpbera65/frisayip1app/hetzner-vps-bot
Stars333
LanguagePHPPHPPHP
Setup difficultyeasymoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperpm founder

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

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires an existing Laravel project, enable runtime tracing for better boundary detection than static analysis alone.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

CarvePHP is a development toolkit for Laravel apps that helps teams figure out how to split up a large monolithic codebase into smaller, independent services. It is installed as a Composer development dependency and adds a set of Artisan commands to your existing Laravel project. The toolkit works in two stages. First, it performs a static scan of your codebase, reading through routes, controllers, models, database migrations, and raw SQL to build a map of how different parts of the code depend on each other. Optionally, you can also enable runtime tracing, which adds a middleware layer that records which parts of the app run together during real HTTP requests and background jobs. CarvePHP then combines both the static and runtime data into a dependency graph. From that graph, the boundary detection step identifies groups of related tables, controllers, and models that cluster naturally together and scores each candidate service by its cohesion and coupling numbers. A sample report entry might say: Billing candidate, 85% confidence, tables: invoices, payments, customers, risk score 22%. The full report is written as a Markdown file you can share with your team. Currently the toolkit handles scanning, analysis, graph-building, boundary detection, and report generation. The parts that still require manual work are actually splitting the database and moving the code. Automatic service generation, one-command extraction, and database splitting are planned for future versions. There are experimental stubs for generating service skeletons, OpenAPI specs, and client SDKs, but these are not ready for production use. The project is at version 0.1.2-alpha and is described as suitable for experimentation and feedback rather than automated production migrations. It requires PHP 8.2 or newer with Laravel 11, 12, or 13. The license is MIT.

Copy-paste prompts

Prompt 1
I have CarvePHP installed in my Laravel project. Walk me through running carve:scan, carve:analyze, and carve:boundaries to get my first migration report.
Prompt 2
How do I enable runtime tracing in CarvePHP so it captures real request patterns alongside the static code analysis?
Prompt 3
Explain what the cohesion and coupling scores in a CarvePHP boundaries report mean and how to use them to decide where to split my monolith.
Prompt 4
The CarvePHP report found a Billing boundary at 85% confidence. What manual steps do I take to extract it into a separate Laravel service?

Frequently asked questions

What is carvephp?

A Laravel Composer package that scans a PHP monolith, identifies natural service boundaries using static analysis and runtime tracing, and generates a confidence-scored migration report.

What language is carvephp written in?

Mainly PHP. The stack also includes PHP, Laravel, Composer.

What license does carvephp use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is carvephp to set up?

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

Who is carvephp for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub muhammad-waleed-khalil on gitmyhub

Verify against the repo before relying on details.