Skip to content

This is a boilerplate implementation of Laravel 10 using Vue, Inertia.js, and Primevue/Primeflex.

Notifications You must be signed in to change notification settings

tcytra/enraiged-laravel

Repository files navigation

Enraiged Laravel

Laravel 10Vue v3.3Inertia.js v1.0PrimeVUE v3.40PrimeFlex v3.3PrimeIcons v6.0

Table of Contents

Install Application

Retrieve Repository

cd /path/to/your/repos/ # traverse into your repositories directory
git clone https://github.com/tcytra/enraiged-laravel [new-directory]
cd [new-directory]/

Important: Ensure system state directories exist, these must be writable by the host service user:

install -d bootstrap/cache
install -d storage/{app,logs,framework/{cache,sessions,testing,views}}

Install the vendor packages:

Add the --no-dev flag when installing on a production host.

composer install

Init Environment

Create the initial environment configuration:

cp .env.example .env     # create the .env file from the example config
php artisan key:generate # create the application key

The setup from the .env.example will be enough to get you started in a local environment. At minimum, valid DB_ parameters will need to be added, and the developer may want to double-check the basic APP_ config.

Build Database

The database build process will use the data found in the seeds resources to add the application roles and the initial users. These assets were published into ~/resources/seeds/:

The developer will need to define their application roles and any initial users, such as a master administrator:

  • Define the initial users in ~/resources/seeds/users.json
  • Define the application roles in ~/resources/seeds/roles.json
  • Update the roles enums in ~/app/Enums/Roles.php

The migration and seeder assets can now be run:

php artisan migrate --seed

Build Client

Finally, we will install the node packages and build the front-end resources. Start with:

Add the --no-dev flag when installing on a production host.

npm install

Launch the vite development build (during development):

npm run dev

When complete, build the app for service:

npm run build

Serve Application

The simplest way to launch and preview this application is with artisan serve:

php artisan serve

Run the SSR server:

php artisan inertia:start-ssr

Now, navigate to (http://127.0.0.1:8000/), et voilà.

Serving this application by other means is beyond the scope of this README.

Stop the SSR server:

php artisan inertia:stop-ssr

Usage

Seed Data

All initial seed data can be found in the ~/resources/seeds directory.

appmenu.json Contains the main menu structure (currently read from the filesystem at runtime, not seeded to the db).

countries.json Contains the list of countries seeded into the database.

regions.json Contains the list of regions (states, provinces, etc) seeded into the database.

roles.json Contains the list of initial roles seeded into the database.

Important! The App\Enums\Roles needs to be kept in sync with this data (for now).

users.json Contains the list of initial users seeded into the database.

Enraiged Forms

Documentation for using the Enraiged Forms package can be found in the enraiged-forms/README.md.

License

Enraiged Laravel is open-sourced software licensed under the MIT license.

About

This is a boilerplate implementation of Laravel 10 using Vue, Inertia.js, and Primevue/Primeflex.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published