Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ng Model Generator Bundle Laravel Package

irstea/ng-model-generator-bundle

A Symfony bundle that generates Angular/TypeScript model classes from Doctrine entities, helping keep frontend and backend data structures in sync. Automate model creation for API-driven Angular apps and reduce manual boilerplate.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Poor as a direct dependency, because the package is a Symfony bundle rather than a Laravel package. It assumes Symfony kernel bootstrapping, config/bundles.php registration, DI service wiring, and — most importantly — API Platform's resource metadata layer (ResourceMetadataFactory, serializer metadata, Hydra/JSON-LD conventions). Laravel's container, console, and config primitives are only superficially similar, and there is no bundle abstraction to hook into. The realistic architectural stance for a TPM is "vendor the emitter logic or run it as a sidecar," not "install it." The package also does not exist on Packagist as a first-class dependency; it lives on IRSTEA's self-hosted GitLab, which raises availability, auth, and licensing questions before any code is written.

Integration feasibility. Conditionally feasible through one of three routes, none of which is composer require:

  1. Sidecar generation — stand up a minimal Symfony app containing the bundle, point it at the same API Platform metadata (or an exported OpenAPI document), and emit .ts files into the Angular repo as a CI artifact. The Laravel app stays untouched. This is the highest-fidelity use of the code as designed.
  2. Fork-and-own — lift the TypeScript emitter and drive it from api-platform/laravel metadata or directly from OpenAPI. Cleanest long-term ownership, highest initial effort.
  3. Replace — use openapi-typescript, orval, or ng-openapi-gen against an OpenAPI export. Lower risk, community-backed, and the baseline any adoption case must beat.

The dominant feasibility question is whether the API surface is genuinely API Platform. If it is hand-rolled Laravel (Eloquent API Resources, FormRequests), the bundle has no viable input — its entire value proposition is consuming API Platform metadata that does not exist.

Technical risk. Very high. Signals are uniformly weak: score 0, zero stars, zero dependents, French-language documentation, institutional self-hosted forge, no indicated Packagist presence. That profile describes an internal utility published for convenience, not a supported dependency. Specific risks: unknown licence terms (forking/redistribution must be confirmed before any work), no release tags or semver contract, unknown PHP/Symfony/Angular version constraints, no public issue tracker, likely single-maintainer bus factor, and French-language code and comments narrowing the pool of engineers who can debug it. With zero dependents there is no community to absorb breaking changes or answer questions.

Key questions for maintainers or due diligence:

  • What is the licence, and does it permit forking and internal redistribution?
  • Which Symfony, PHP, and Angular versions are supported, and are there tagged releases?
  • Is API Platform a hard requirement, or can the generator accept an OpenAPI/JSON Schema file?
  • Is there a standalone console entry point invokable without full bundle bootstrapping?
  • How are enums, nullable fields, relations, polymorphism, and serializer groups mapped to TypeScript?
  • Is there a named owner and a stated maintenance status?
  • Are outputs compatible with Angular strict mode and strictTemplates?

Integration Approach

Stack fit. Laravel + Angular is a common pairing, so the underlying problem — TypeScript models drifting from backend contracts — is real and worth solving. But this package solves it for the Symfony + API Platform + Angular triangle. Fit is good only if the Laravel app already runs API Platform's Laravel integration (experimental, limited) or exposes a faithful OpenAPI document. Otherwise fit is nominal: same language, wrong framework. A TPM should treat the stack mismatch as a hard gate, not a caveat to work around.

Migration path. Do not plan to adopt this as a dependency. Plan one of:

  • Sidecar — keep a fork in a small Symfony image, point it at the API, publish artifacts. Highest fidelity, highest operational overhead (a second deployable per environment).
  • Fork-and-own — vendor the emitter, strip bundle wiring, expose a single CLI, pin to a commit SHA internally. Budget for owning it indefinitely.
  • Replace with a maintained generator — openapi-typescript or orval driven from the OpenAPI export. This is the lower-risk default and should be the baseline the bundle is measured against.

Compatibility. Unknown and must be established empirically: PHP floor, Symfony major, Angular version, and whether the emitted models assume class vs interface, readonly modifiers, or specific RxJS/Observable patterns. Validate against the target Angular and TypeScript compiler versions before any commitment.

Sequencing.

  1. Licence and version audit — gate everything else on this. No licence clarity, no work.
  2. Two-day spike — throwaway Symfony app with the bundle against one representative API Platform resource. Observe actual output.
  3. Head-to-head — same resource set through openapi-typescript. Compare enums, relations, nullability, and strict-mode compatibility.
  4. Decision gate — proceed only if the bundle materially outperforms the OpenAPI route enough to justify permanent internal ownership.
  5. CI wiring — generation as a build step with a drift check (git diff --exit-code after regenerate) so schema changes surface in review rather than silently.
  6. Contract test — generated models compile under Angular strict mode and validate against live responses.

Operational Impact

Maintenance. Effectively zero upstream. Plan to fork on day one and carry the burden: PHP/Symfony security patches, Angular version bumps, TypeScript compiler upgrades. Treat this as an internal tool with an acquisition cost, not a dependency with a support contract. The sidecar route compounds this — you maintain a Symfony application solely to run a codegen step.

Support. No commercial support, no SLA, no public issue tracker, French-language codebase. Debugging failures requires internal expertise in Symfony bundle internals and API Platform metadata — a rare combination on a Laravel team. Assume no upstream triage, no release cadence, no deprecation policy.

Scaling. Build-time generator, so request-path scaling is a non-issue. Scaling concerns are organizational: as services, teams, and API resources multiply, the drift surface between metadata and generated TypeScript grows with them. The sidecar approach adds a deployable per environment; the OpenAPI route collapses this to a single CI step.

Failure modes.

  • Silent divergence — API Platform metadata changes (serializer groups, denormalization hints) produce stale or wrong models with no error. The worst case, because TypeScript still compiles.
  • Skipped resources — no error surface when a resource fails to resolve; you ship a partial model set.
  • Nullability and readOnly mismatches producing runtime undefined in Angular.
  • Enum drift between PHP and TypeScript.
  • Version skew between sidecar Symfony/API Platform versions and the main application.
  • Strict-mode build breaks on Angular upgrades, blocking the frontend pipeline.

Ramp-up. High. Expect a senior polyglot engineer (PHP + TypeScript, comfortable in Symfony and Laravel) to spend one to two weeks on the spike, fork, and CI integration before the first reliable model set lands. Team-wide workflow ramp-up — regenerate, review the diff, never hand-edit — is a further half-day plus a written convention.

TPM verdict. Do not adopt this as a dependency on a Laravel stack. Evaluate it as a reference implementation for API-Platform-to-TypeScript mapping and default to an OpenAPI-driven generator, with this bundle's output used only as a comparison point in a timeboxed spike. If adopted at all, it must come with a named internal owner, a pinned commit SHA, and a documented exit path.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle