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

Laravel Typescript Laravel Package

based/laravel-typescript

based/laravel-typescript generates TypeScript definitions from Laravel models, resources, and routes, keeping frontend and backend types in sync via artisan commands and configurable output.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Build vs. buy (or adapt) for type safety: This package is a concrete answer to "how do we keep TypeScript frontend types in sync with Eloquent models?" It removes hand-maintained interface boilerplate, so a PM can frame the choice as generate vs. hand-write vs. adopt a maintained alternative rather than an open-ended engineering question.
  • Frontend stack decisions: It is most valuable when the roadmap points toward Inertia.js, Vue/React SPAs, or any TypeScript client that consumes Laravel JSON resources. If the roadmap keeps the app primarily Blade-rendered, this investment has low ROI.
  • Roadmap sequencing for a "type safety" initiative: A generated model→interface layer is a cheap, incremental step that can precede larger investments like OpenAPI/JSON Schema contract tooling or a full API-first redesign.
  • Developer experience and onboarding budget: Auto-generated interfaces reduce context-switching for full-stack engineers and shorten ramp-up for new hires touching both PHP and TS. This supports a "reduce per-feature integration overhead" roadmap theme.
  • Feature-level decisions: For internal admin dashboards, CRUD-heavy portals, and monorepo apps, generated types measurably cut mismatches between backend field changes and frontend breakage—relevant when deciding how much test coverage to invest in contract regressions.
  • Adoption risk management: Zero dependents, a single-maintainer history, and a July 2021 last release make this a decision input about acceptable technical debt, not a decision to adopt wholesale.

When to Consider This Package

Consider it when:

  • You are on a Laravel version contemporary with the 2021 release (Laravel 8-era APIs) and can pin the package.
  • Your frontend is Inertia.js or a TypeScript SPA consuming Eloquent-derived payloads directly.
  • You need a near-zero-config, model-centric type generation layer and are willing to vendor/fork it.
  • Your team is small enough that generating types from models is cheaper than maintaining a separate schema pipeline (OpenAPI, GraphQL codegen).
  • You accept that the tool is a convenience generator, not a contract-enforcement system.

Look elsewhere when:

  • You are on Laravel 9/10/11+ or need PHP 8.2+ compatibility—the 2021 release predates these and likely needs patching.
  • You require active maintenance, security review, or vendor support (single maintainer, stale release, zero dependents).
  • You need relationships, casts, enums, and nested resources modeled precisely—evaluate spatie/laravel-typescript-transformer or an OpenAPI-first codegen pipeline (e.g., dedoc/scramble + openapi-typescript) instead.
  • Your API surface is broad and public-facing; a schema-driven contract tool gives stronger guarantees and better longevity than model reflection.
  • Your frontend is not TypeScript, or your team prefers runtime validation (Zod) generated from a schema source of truth.

PM recommendation: Treat this as an evaluation spike, not a default adoption. Time-box a proof of concept against your current Laravel version and compare against a maintained alternative on the two axes that matter: upgrade path (does it survive your next framework upgrade?) and single-source-of-truth coverage (models vs. API schema).

How to Pitch It (Stakeholders)

For executives: This is a low-cost developer-experience tool that can reduce integration bugs and speed up delivery for teams running TypeScript frontends against Laravel. The upside is measurable in fewer frontend/backend contract mismatches and less manual type maintenance. The caveat is meaningful: it is a small, single-maintainer project whose last release was mid-2021, so it carries upgrade risk and should be adopted as a vendored/forked component or benchmarked against a maintained alternative before we commit it to the roadmap. Net: worth a short spike, not worth an unqualified platform bet.

For engineering: It generates TypeScript interfaces from Eloquent models, giving Inertia/SPA clients a model-derived type layer without hand-written interfaces. It is zero-config and MIT-licensed, which makes evaluation cheap. However, the release cadence is stalled, there are no downstream dependents signaling real-world adoption, and it predates current Laravel/PHP baselines—assume some patching to run on modern versions. Before adopting, compare it against spatie/laravel-typescript-transformer and an OpenAPI-to-TypeScript pipeline on three criteria: upgrade survivability, coverage of relationships/casts/enums, and whether you want generated convenience types or enforced contracts. Recommend a one-sprint spike with a defined exit criterion (works on our Laravel version, covers our top three resources end-to-end).

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.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
cgv/localized-resource