MCPcopy Index your code
hub / github.com/GooGee/Entity-Builder

github.com/GooGee/Entity-Builder @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
920 symbols 2,340 edges 292 files 4 documented · 0% updated 2mo ago★ 475
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Laravel Builder

Intuitive productivity tool for Laravel. demo

You no longer need to write migrations, Doctrine will do it for you.

PhpStorm plugin Laravel Builder

PhpStorm plugin Laravel Generator

features

  • design database schemas
  • manage database migrations
  • generate OpenApi document
  • generate CRUD files

install

PhpStorm plugin

composer require --dev googee/laravel-builder

php artisan vendor:publish --provider="GooGee\LaravelBuilder\LaravelBuilderServiceProvider"

php artisan setupLaravelBuilder
        'user' => [
            'driver' => 'daily',
            'path' => storage_path('logs/user.log'),
            'level' => env('LOG_LEVEL', 'debug'),
        ],

how to generate migrations?

migration

  • go to Migration page, then select the User in sidebar
  • click button to generate the Entity file
  • click diff button to generate a migration file
  • click ►| button to run php artisan migrate
  • to ignore a table, add its name to the file config/laravelbuilder.php

Doctrine compares files in database/Entity with the database schemas, and generate a migration file of their difference.

how to generate CRUD files?

crud

  • go to Entity page, then select User in sidebar
  • select File tab, then click button to generate the file

how to generate OpenApi document?

  • click OpenApi in the menu bar
  • click toJSON button, then copy the text
  • click editor link, then paste in the editor

how file is generated?

for example, lets generate the User Entity file. when button is clicked, this plugin will do the following:

  • GUI fetch all files in laravel-builder/code
  • execute code in code-helper.js
  • execute code in file-1.js (1 is the id of Entity)
  • render template file-1.txt
  • write the result text to database/Entity/User.php

how to generate custom files?

  • go to Tree page, then select a file in sidebar
  • click edit script button to modify the code (optional)
  • click edit template button to modify the text
  • go to Entity page, then select User in sidebar
  • select File tab, then click button to generate the file

Note: if changes didn't work, make sure to save the changed file manually, PhpStorm doesn't save the changed file immediately.

for example

function run(data) {
    /** @type {DataForScript} */
    const ddd = data

    // define variable `model`
    ddd.model = ddd.db.tables.File.find(item => item.name === 'Model')

    // define function `toString`
    ddd.toString = function(object) {
        return JSON.stringify(object)
    }
}

in template

{{ model.name }}

{{ toString(model) }}

templating engine

Extension points exported contracts — how you extend this code

CRUD (Interface)
(no doc) [2 implementers]
src/Factory/makeItemzzStoreData.ts
Collection (Interface)
(no doc)
public/index.d.ts
Bridge (Interface)
(no doc)
src/vite-env.d.ts
ApiErrorResponse (Interface)
(no doc)
src/index.extra.d.ts
Collection (Interface)
(no doc)
src/index.d.ts
Property (Interface)
(no doc)
src/View/ParameterPage.tsx
OapiReference (Interface)
(no doc)
src/Model/Oapi.ts
DBCFactory (Interface)
(no doc)
src/Database/getDBC.ts

Core symbols most depended-on inside this repo

find
called by 84
src/Factory/makeItemzzStoreData.ts
update
called by 66
src/View/Reference/ReferenceEnum.tsx
create
called by 65
src/View/Part/ItemList.tsx
makeForeignKey
called by 51
src/Database/createSchema.ts
create
called by 46
src/Store/useToastzzStore.ts
makeForeignKeyId
called by 35
src/Database/createSchema.ts
delete
called by 30
src/View/Part/ItemList.tsx
observe
called by 23
src/Factory/makeItemzzStoreData.ts

Shape

Function 552
Interface 243
Method 90
Enum 23
Class 12

Languages

TypeScript100%

Modules by API surface

public/index.d.ts57 symbols
src/Database/makeCRUD.ts31 symbols
src/index.d.ts30 symbols
src/index.extra.d.ts27 symbols
src/Model/Oapi.ts26 symbols
src/Database/CRUD.ts16 symbols
src/api.ts13 symbols
src/View/DangerPage.tsx13 symbols
src/Factory/makeItemzzStoreData.ts12 symbols
src/Database/dbhelper.ts12 symbols
src/Factory/makeTreeHelper.ts11 symbols
src/Store/useToastzzStore.ts10 symbols

For agents

$ claude mcp add Entity-Builder \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact