Batteries included starter for Laravel apps
LIRET is a batteries-included starter for Laravel apps that combines Laravel, Inertia, React, and TypeScript. It provides a setup that includes authentication, authorization, websockets, linting and formatting tools, and more.
resources/js/lib/types.tsx, including the IPageProps interface for typing shared data and the IUser interface for the User model.useTitle hook in resources/js/lib/use-title.tsx is used to set the title from inside a React component.php artisan make:page <PAGE NAME> command creates a page template in resources/js/pages.admin property on the User model to true. Regular users who register via the /auth/register route are not admins.resources/js/lib/authorization.tsx file contains components such as Admin, User, Authenticated, and Guest that show or hide children based on user and authentication state./laravel-websockets for establishing websocket connections with the server..eslintrc.js and .prettierrc. It also includes husky and pretty-quick for pre-commit formatting.To install LIRET and set up the theme, follow these steps:
Clone the repository to your local machine:
git clone [repository url]
Install the dependencies:
composer install
npm install
Copy the .env.example file to .env and update it with your database credentials:
cp .env.example .env
Generate an application key:
php artisan key:generate
Migrate the database:
php artisan migrate
Seed the database (optional):
php artisan db:seed
Start the development server:
npm run dev
Access the application in your browser at http://localhost:8000.
LIRET is a Laravel starter that includes Inertia, React, and TypeScript. It provides a comprehensive setup for building Laravel applications, including authentication, authorization, websockets, linting and formatting tools, and more. With its pre-defined features and easy-to-use commands, LIRET offers developers a solid foundation for rapidly developing Laravel apps.