Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lokmanm committed Apr 24, 2023
0 parents commit a01f514
Show file tree
Hide file tree
Showing 79 changed files with 4,030 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
* text=auto

*.blade.php diff=html
*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
/art export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
CHANGELOG.md export-ignore
phpstan.neon.dist export-ignore
phpunit.xml.dist export-ignore
UPGRADE.md export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor
composer.lock
/phpunit.xml
.phpunit.result.cache
8 changes: 8 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
php:
preset: laravel
js:
finder:
not-name:
- vite.config.js
css: true
vue: true
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Release Notes
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) Lucky Media

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
143 changes: 143 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<p align="center"><img src="/art/logo.svg" alt="Logo Reactor for Laravel"></p>

<p align="center">
<a href="https://packagist.org/packages/lucky-media/reactor">
<img src="https://img.shields.io/packagist/dt/lucky-media/reactor" alt="Total Downloads">
</a>
<a href="https://packagist.org/packages/lucky-media/reactor">
<img src="https://img.shields.io/packagist/v/lucky-media/reactor" alt="Latest Stable Version">
</a>
<a href="https://packagist.org/packages/lucky-media/reactor">
<img src="https://img.shields.io/packagist/l/lucky-media/reactor" alt="License">
</a>
</p>

# Reactor for Laravel

Reactor is a Laravel package that provides minimal scaffolding for Laravel applications, making it simple for developers to get started with a fully functional web application. This package has a strong focus on frontend tooling and comes with Authentication, Inertia.js, React, and a very opinionated setup. Created by Lucky Media, Reactor aims to simplify and streamline your development process.

## Why Reactor?
While Laravel Breeze provides a simple and minimal boilerplate with authentication for starting a new Laravel project, Reactor for Laravel is specifically designed to offer a more comprehensive set of features and tools catered towards modern web application.

Reactor has a more advanced and opinionated frontend setup compared to Breeze. It includes pre-configured ESLint and Prettier configs, Husky hooks for automatic code formatting and linting, and a GitHub Workflow that leverages Laravel Pint. Together, these tools contribute to a clean and consistent codebase, fostering best practices among developers.

Reactor comes with pre-built, opinionated frontend components that are influenced by `shadcn/ui`. These components are built with composability in mind, making it easier to build and customize application UI.


## Features

- Authentication
- Pest for Laravel
- PHP Ide Helper
- Inertia.js with React
- Configured ESLint and Prettier
- Husky hooks to automatically format and lint code
- GitHub Workflow to automatically format code with Laravel Pint
- Opinionated frontend components with composability in mind, heavily inspired by `shadcn/ui`
- Radix UI headless components
- Sonner for Toast notifications
- Lucide React for icons

## Installation

Before you get started with Reactor for Laravel, make sure you have the following prerequisites:

- Laravel 9+
- Composer
- Node.js 16+

Follow these steps to install:

1. Install the package via Composer:

```bash
composer require lucky-media/reactor
```

2. Install the package by running

```bash
php artisan reactor:install
```

3. Run the frontend build process:

```bash
npm run dev
```

## Usage

Reactor for Laravel comes with a pre-configured and opinionated setup for Laravel applications. This includes frontend components, headless components, and more.

### Authentication

The package comes with a ready-to-use authentication system. Make sure you've configured your database and run migrations. To customize your authentication views, you can either modify the included components or create your own.

### Pest for Laravel
Reactor for Laravel comes with Pest for Laravel pre-installed. To run your tests, simply run:

```bash
./vendor/bin/pest
```

### Inertia.js with React

Reactor for Laravel is built on top of Inertia.js with React for a smooth, single-page application experience. Make sure to review the Inertia.js documentation to understand and wire up additional pages.

### ESLint, Prettier, and Husky

The package comes with pre-configured ESLint and Prettier configs, ensuring consistent and clean code. Additionally, Husky hooks run automatically to format and lint your code before committing.

### PHP Ide Helper

Integrate with popular IDEs to improve the developer experience. In the scripts section of your `composer.json` file, you need to add the following:
```json
{
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan ide-helper:models -N",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:eloquent",
"@php artisan ide-helper:meta"
]
}
```

### GitHub Workflow with Laravel Pint

Reactor for Laravel includes a pre-configured GitHub Workflow to automatically format code with Laravel Pint. This ensures a clean codebase and encourages best practices across your team.

### Frontend Components

The included frontend components are highly opinionated and influenced by [shadcn/ui](https://ui.shadcn.com/). They are designed for composability and ease of use. Be sure to explore and customize these components according to your needs.

- Components are composed using [Tailwind Variants](https://www.tailwind-variants.org/).
- Radix UI headless components are used for greater flexibility. Read their docs [here](https://radix-ui.com/docs/primitives/overview/introduction).

### Sonner, and Lucide React

The package includes Sonner for Toast notifications, and Lucide React for icons. These packages are integrated to provide a uniform and highly customizable frontend experience.

- [Sonner Documentation](https://sonner.emilkowal.ski/).
- [Lucide React Icons](https://lucide.dev/docs/lucide-react).

## Support

If you find any issues or have suggestions for improvements, please feel free to open an issue on the [GitHub repository](https://github.com/lucky-media/reactor).


## Security Vulnerabilities

Please email us at [[email protected]](mailto:[email protected]) if you find any security vulnerabilities in Reactor. All security vulnerabilities will be promptly addressed.

## Credits
- [Laravel Breeze](https://github.com/laravel/breeze)
- [Shadcn UI](https://github.com/shadcn/ui)
- [Radix UI](https://radix-ui.com/)
- [Sonner](https://sonner.emilkowal.ski/)
- [Lucide React](https://lucide.dev/docs/lucide-react)

## License

Reactor is open-sourced software licensed under the [MIT license](LICENSE.md).
3 changes: 3 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Upgrade Guide

Future upgrade notes will be placed here.
Loading

0 comments on commit a01f514

Please sign in to comment.