An open-source PHP framework born from the need for true type safety between PHP backends and Angular frontends.
To eliminate the type safety gap between PHP APIs and TypeScript frontends — so developers can build full-stack applications with confidence, not guesswork.
Modern web development often means maintaining two parallel worlds: a PHP backend and a TypeScript frontend. Keeping DTOs, API contracts, and response shapes synchronized is error-prone and time-consuming. StoneScriptPHP solves this by treating PHP as the source of truth and auto-generating fully typed TypeScript clients — exactly like SOAP, but for modern REST APIs.
The framework began as an internal tool at ProGalaxy eLabs to handle the repetitive work of writing API contracts and maintaining parallel TypeScript interfaces for 11 different SaaS platforms. The pain was clear: every API change required manual TypeScript updates that were always out of sync.
The php stone generate client command was developed,
enabling automatic TypeScript client generation from PHP DTOs and route definitions. This became the
core value proposition — define once in PHP, consume everywhere in TypeScript with full type safety.
StoneScriptPHP was open-sourced under the MIT license and published on
GitHub and Packagist. The Angular integration library
ngx-stonescriptphp-client was
published to npm, and the StoneScriptDB Gateway was developed to provide
multi-tenant PostgreSQL connection pooling.
The ecosystem expanded with VS Code extension support, a TypeScript client library, E2E testing helpers, and the Sunbird Garden reference implementation. The framework now powers all 11 ProGalaxy eLabs platforms in production.
A bootstrapped software company based in India, building SaaS platforms across education, healthcare, logistics, and professional services. StoneScriptPHP is the backbone of all our platforms.
progalaxyelabs.com →StoneScriptPHP is community-driven and welcomes contributions from PHP and TypeScript developers worldwide. Every issue report, pull request, and discussion helps make the framework better.
Join the community →Your API contract is defined in PHP. TypeScript clients are generated — never handwritten. Mismatches become compile errors, not runtime surprises.
One CLI command to scaffold, generate, migrate, and deploy. Less boilerplate, more building.
Every feature in this framework exists because it was needed in real production systems. No theoretical abstractions — just practical tools.
Install StoneScriptPHP and build your first type-safe API in minutes