luis-developer-08/yui-hero_ui

This setup is designed for developers who want a lightweight, modern, and efficient foundation for building Laravel applications with a React frontend powered by InertiaJs and Hero UI

Installs: 19

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:project

v1.1.3 2025-03-28 20:00 UTC

This package is auto-updated.

Last update: 2025-03-29 19:22:31 UTC


README

πŸš€ Introduction

Welcome to my personal laravel installer YUI! This setup is designed for developers who want a lightweight, modern, and efficient foundation for building Laravel applications with a React frontend powered by Inertia.js.

This kit is JavaScript-first, using JSX instead of TSX, making it accessible to developers who prefer plain JavaScript over TypeScript. It includes React 19, TailwindCSS 4, and Breeze for simple authentication and scaffolding.

🎯 Features

βœ”οΈ Laravel – Laravel provides a complete ecosystem for web artisans.
βœ”οΈ Laravel Breeze – Lightweight authentication with Inertia.js.
βœ”οΈ Laravel Pulse – delivers at-a-glance insights into your application's performance and usage.
βœ”οΈ Orion – The simplest way to create REST API with Laravel.
βœ”οΈ Inertia.js – Create modern single-page React, Vue, and Svelte apps using classic server-side routing.
βœ”οΈ React 19 + JSX – Simple, clean, and TypeScript-free.
βœ”οΈ React Icons – Include popular icons in your React projects easily with react-icons.
βœ”οΈ TanStack Query – Powerful asynchronous state management for TS/JS.
βœ”οΈ Zustand – A small, fast, and scalable bearbones state management solution.
βœ”οΈ Laravel-Spatie-permission – Associate users with roles and permissions.
βœ”οΈ TailwindCSS 4 – Modern styling with utility-first CSS.
βœ”οΈ Vite-Powered – Lightning-fast HMR for smooth development.
βœ”οΈ Pre-configured Testing – Includes PHPUnit & Pest.
βœ”οΈ Hero UI – Beautiful, fast and modern React UI library for building accessible and customizable web applications.
βœ”οΈ Quick Setup – Get started in minutes!

πŸ›  Getting Started

1️⃣ Install the Yui Installer

Install the Yui installer globally using Composer: luis-developer-08/yui-installer

composer global require luis-developer-08/yui-installer

2️⃣ Create a New Laravel Project

Use the Yui installer to generate a new Laravel project:

yui new my-laravel-app

3️⃣ Select Your Database

During installation, you will be prompted to choose a database. Select the one you want by entering the corresponding number:

[0] sqlite
[1] mysql

4️⃣ Choose a UI Provider

[0] None
[1] Hero UI

5️⃣ Navigate to Your Project Directory

After the project is created, navigate to the project folder:

cd my-laravel-app

6️⃣ Start the Development Server

Run the following command to start the development server:

composer run dev

πŸŽ‰ Your application is now configured and running!

⚑ Create Inertia Components Easily

This starter kit includes a custom Artisan command to quickly generate Inertia.js React components with flexible directory options.

πŸ—οΈ Generate a New Component

php artisan make:inertia Components/MyComponent

This will create:

resources/js/Components/MyComponent.jsx

πŸ“‚ Flexible Folder Placement

You can specify different folders using flags:

  • -c or --components: Create the component in resources/js/Components/
  • -l or --layouts: Create the component in resources/js/Layouts/
  • -s or --sections: Create the component in resources/js/Sections/
  • -p or --pages: Create the component in resources/js/Pages/

βœ… Example usage with flags:

php artisan make:inertia Dashboard -p

Creates:

resources/js/Pages/Dashboard.jsx

You can also create nested folders like:

php artisan make:inertia Components/Auth/Login

Creates:

resources/js/Components/Auth/Login.jsx

✨ Example Generated Component

import React from "react";

const MyComponent = () => {
    return <div>{/* MyComponent component */}</div>;
};

export default MyComponent;

πŸš€ Smart Behavior

  • Automatically prevents duplicate folder nesting.
  • Opens the newly created file in your default editor.
  • Ensures the correct folder placement, whether using flags or specifying the path.

This command ensures that components are placed in the correct directory and prevents overwriting existing files. It also automatically opens the newly created file for editing.

⚑ Create Orion Controllers Easily

This starter kit also includes a command to quickly generate Orion controllers along with their associated models:

πŸ—οΈ Generate a New Orion Controller

php artisan make:orion PostController

This will create:

  • app/Http/Controllers/Orion/PostController.php
  • app/Models/Post.php (if it doesn’t exist)
  • Adds a route in routes/api.php

πŸ“‚ File Structure

app/Http/Controllers/Orion/PostController.php
app/Models/Post.php

✨ Example Generated Controller

<?php

namespace App\Http\Controllers\Orion;

use Orion\Http\Controllers\Controller;
use App\Models\Post;

class PostController extends Controller
{
    protected $model = Post::class;
}

πŸ”— Auto-Registered Route in routes/api.php

Orion::resource('posts', \App\Http\Controllers\Orion\PostController::class)->middleware(['auth', 'web']);

This command ensures that controllers are correctly placed, models are created if missing, and routes are automatically registered.

πŸ“– Documentation

For more details on YUI, visit the official YUI Website.

πŸ”— Feature Documentation Links

🀝 Contributing

We welcome contributions! Check out the Yui Installer contribution guide to get involved.

πŸ“œ Code of Conduct

Be kind and respectful. Please follow Yui's Code of Conduct.

βš–οΈ License

This installer is open-source under the MIT license.