PHPackages                             nssivanitesh/react-ubiquitous-composer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nssivanitesh/react-ubiquitous-composer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nssivanitesh/react-ubiquitous-composer
======================================

Laravel Composer package providing standardized DTOs and helper functions for the react-ubiquitous UI Config API

00PHP

Since Mar 1Pushed 2mo agoCompare

[ Source](https://github.com/nssivanitesh/react-ubiquitous-composer)[ Packagist](https://packagist.org/packages/nssivanitesh/react-ubiquitous-composer)[ RSS](/packages/nssivanitesh-react-ubiquitous-composer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

react-ubiquitous-composer
=========================

[](#react-ubiquitous-composer)

[![PHP](https://camo.githubusercontent.com/6351c44c5acd541a16e8505d9389a2576fb01528ebdbaf6a6b744ac49e401cae/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c7565)](https://php.net)[![Version](https://camo.githubusercontent.com/898acdccff35279368fa940cff2d39496aa631af812204c2a7d9db3200ae75f9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d677265656e)](CHANGELOG.md)[![License](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](LICENSE)

Laravel/PHP Composer package providing standardized DTOs and helper functions for the [`react-ubiquitous`](https://www.npmjs.com/package/react-ubiquitous) UI Config API.

> **The backend produces a `UIStageConfig` JSON tree; the `react-ubiquitous` frontend renders it without any code changes.**

---

Requirements
------------

[](#requirements)

- PHP **8.1+**
- Composer

---

Installation
------------

[](#installation)

```
composer require nssivanitesh/react-ubiquitous-composer
```

If you are using Laravel, the `ReactUbiquitousServiceProvider` is auto-discovered via the `extra.laravel` section of `composer.json`.

---

Core Concepts
-------------

[](#core-concepts)

The JSON object hierarchy is:

```
UIStageConfig
 └─ UIPageConfig[]
     └─ UISectionConfig[]   (flex | grid | hero | table | chart | …)
         └─ UIElementConfig[]  (input | select | button | …)

```

Every class implements `toArray()` which returns the exact JSON shape expected by the frontend.

---

Quick Start
-----------

[](#quick-start)

```
use ReactUbiquitous\Helpers\UIHelper;
use ReactUbiquitous\DTOs\Sections\FlexSectionConfig;
use ReactUbiquitous\DTOs\Sections\TableSectionConfig;
use ReactUbiquitous\DTOs\Elements\InputElementConfig;
use ReactUbiquitous\DTOs\Elements\ButtonElementConfig;
use ReactUbiquitous\DTOs\Supporting\TableColumn;
use ReactUbiquitous\Enums\UITheme;

// Build a stage with one page containing a flex section
$stage = UIHelper::stage('my-app')
    ->title('My Application')
    ->theme(UITheme::Light)
    ->addPage(
        UIHelper::page('home', 'Home', 1)
            ->addSection(new FlexSectionConfig(
                id: 'search-bar',
                elements: [
                    new InputElementConfig(
                        id: 'q',
                        name: 'q',
                        inputType: 'text',
                        placeholder: 'Search…',
                        label: 'Search',
                    ),
                    new ButtonElementConfig(
                        id: 'btn-search',
                        name: 'btn-search',
                        text: 'Search',
                        buttonType: 'submit',
                    ),
                ],
                gap: '1rem',
            ))
            ->build()
    )
    ->build();

// Serialize to JSON
return response()->json($stage->toArray());
```

---

Validation Builder
------------------

[](#validation-builder)

```
use ReactUbiquitous\Helpers\UIHelper;
use ReactUbiquitous\DTOs\Elements\InputElementConfig;

$validations = UIHelper::validation()
    ->required()
    ->email('Please enter a valid email address.')
    ->build();

$emailField = new InputElementConfig(
    id: 'email',
    name: 'email',
    inputType: 'email',
    label: 'Email',
    validations: $validations,
);
```

---

DTOs Reference
--------------

[](#dtos-reference)

NamespaceClasses`ReactUbiquitous\DTOs``UIStageConfig`, `UIPageConfig``ReactUbiquitous\DTOs\Sections``FlexSectionConfig`, `GridSectionConfig`, `HeroSectionConfig`, `CardSectionConfig`, `TableSectionConfig`, `ChartSectionConfig`, `IframeSectionConfig`, `AlertSectionConfig`, `ModalSectionConfig`, `DrawerSectionConfig`, `ToastSectionConfig`, `ProgressSectionConfig`, `SkeletonSectionConfig`, `AccordionSectionConfig`, `TabsSectionConfig`, `StepperSectionConfig`, `PaginationSectionConfig`, `NavbarSectionConfig`, `SidebarSectionConfig`, `BreadcrumbsSectionConfig`, `TooltipSectionConfig`, `PopoverSectionConfig`, `CollapseSectionConfig`, `DividerSectionConfig`, `BadgeSectionConfig`, `AvatarSectionConfig`, `TimelineSectionConfig`, `StatSectionConfig`, `EmptyStateSectionConfig`, `CodeBlockSectionConfig`, `MediaSectionConfig`, `ListDetailSectionConfig`, `TreeViewSectionConfig`, `ChatSectionConfig``ReactUbiquitous\DTOs\Elements``InputElementConfig`, `CheckboxElementConfig`, `RadioElementConfig`, `TextareaElementConfig`, `SelectElementConfig`, `ButtonElementConfig`, `LabelElementConfig`, `FieldsetElementConfig`, `DatalistElementConfig`, `OutputElementConfig`, `DatePickerElementConfig`, `MultiSelectElementConfig`, `AutocompleteElementConfig`, `FileUploadElementConfig`, `ColorPickerElementConfig`, `RangeSliderElementConfig`, `RatingElementConfig`, `OtpInputElementConfig`, `PhoneInputElementConfig`, `CustomElementConfig``ReactUbiquitous\DTOs\Supporting``RadioOption`, `SelectOption`, `SelectOptGroup`, `PhoneCountryOption`, `NavLink`, `SidebarItem`, `BreadcrumbItem`, `StepperStep`, `TabItem`, `AccordionPanel`, `ListDetailItem`, `ListEndpointConfig`, `FilterEndpointConfig`, `DetailEndpointConfig`, `DetailPage`, `TreeViewNode`, `MediaItem`, `TableColumn`, `BadgeItem`, `AvatarItem`, `TimelineEvent`, `StatItem`, `ChatMessage`, `ChatConversation`, `ChartDataPoint`, `ChartSeries``ReactUbiquitous\DTOs\Validation``ValidationRule``ReactUbiquitous\Enums``UITheme`, `UIPageTransition`, `InputType`, `ResizeBehaviour`, `ButtonVariant`, `ButtonSize``ReactUbiquitous\Builders``StageBuilder`, `PageBuilder`, `ValidationBuilder``ReactUbiquitous\Helpers``UIHelper`---

Testing
-------

[](#testing)

```
composer install
./vendor/bin/phpunit
```

---

Local Development with Laravel Sail
-----------------------------------

[](#local-development-with-laravel-sail)

This package ships with a Docker Compose configuration that gives you a PHP 8.2 environment without needing PHP installed on your host machine — similar to how [Laravel Sail](https://laravel.com/docs/sail) works for full Laravel applications.

### Prerequisites

[](#prerequisites)

- [Docker Desktop](https://www.docker.com/products/docker-desktop/) (or Docker Engine + Compose plugin)

### First-time setup

[](#first-time-setup)

```
# Build the image and install Composer dependencies
docker compose build
docker compose run --rm php composer install
```

### Running tests

[](#running-tests)

```
docker compose run --rm php ./vendor/bin/phpunit
```

### Opening an interactive shell

[](#opening-an-interactive-shell)

```
docker compose run --rm php bash
```

### Running any Composer command

[](#running-any-composer-command)

```
docker compose run --rm php composer
```

---

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

---

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance57

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d4c9f0b8906720be22d2b87d61f02fb26f25ad808bb43fafd0bb56a46443722c?d=identicon)[nssivanitesh](/maintainers/nssivanitesh)

---

Top Contributors

[![nssivanitesh](https://avatars.githubusercontent.com/u/14366701?v=4)](https://github.com/nssivanitesh "nssivanitesh (4 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")

### Embed Badge

![Health badge](/badges/nssivanitesh-react-ubiquitous-composer/health.svg)

```
[![Health](https://phpackages.com/badges/nssivanitesh-react-ubiquitous-composer/health.svg)](https://phpackages.com/packages/nssivanitesh-react-ubiquitous-composer)
```

###  Alternatives

[happy-types/enumerable-type

Strongly typed implementation of enumerable type in PHP which helps us to write a safer more readable code.

4742.6k](/packages/happy-types-enumerable-type)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
