|
1 |
| -# Laravel Breeze & PrimeVue |
2 |
| -A starter kit using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze) with the [Intertia.js](https://inertiajs.com/) Vue option, utilizing [PrimeVue](https://primevue.org/) components. |
3 |
| - |
4 |
| -Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/primevue-breeze-inertia/tree/admin-panel) |
5 |
| - |
6 |
| -## Installation |
7 |
| -1. Clone the repo (or download the zip) |
8 |
| - ``` |
9 |
| - git clone https://github.com/connorabbas/primevue-breeze-inertia.git |
10 |
| - ``` |
11 |
| - |
12 |
| -2. Step into the project directory |
13 |
| - ``` |
14 |
| - cd ./primevue-breeze-inertia |
15 |
| - ``` |
16 |
| - |
17 |
| -3. Install the framework and other packages |
18 |
| - ``` |
19 |
| - composer install |
20 |
| - ``` |
21 |
| - |
22 |
| -3. Setup `.env` file |
23 |
| - |
24 |
| - Windows |
25 |
| - ``` |
26 |
| - copy .env.example .env |
27 |
| - ``` |
28 |
| - Unix/Linux/MacOS |
29 |
| - ``` |
30 |
| - cp .env.example .env |
31 |
| - ``` |
32 |
| - |
33 |
| -4. Generate the app key |
34 |
| - ``` |
35 |
| - php artisan key:generate |
36 |
| - ``` |
37 |
| - |
38 |
| -5. Migrate database tables (after `.env` and database related config setup) |
39 |
| - ``` |
40 |
| - php artisan migrate |
41 |
| - ``` |
42 |
| - |
43 |
| -6. Install npm packages |
44 |
| - ``` |
45 |
| - npm install |
46 |
| - ``` |
47 |
| - |
48 |
| -7. Start the Vite dev server |
49 |
| - ``` |
50 |
| - npm run dev |
51 |
| - ``` |
| 1 | +# Laravel Inertia & PrimeVue Starter Kit |
| 2 | +A basic starter kit using [Laravel](https://laravel.com/docs/master), [Intertia.js](https://inertiajs.com/), and [PrimeVue](https://primevue.org/). An equivalent to using [Laravel Breeze](https://laravel.com/docs/master/starter-kits#laravel-breeze), but with the added benefit of all the PrimeVue components at your disposal. |
| 3 | + |
| 4 | +Need an admin panel? [There's a branch for that.](https://github.com/connorabbas/laravel-inertia-primevue/tree/feature/admin-panel) |
| 5 | + |
| 6 | +## Usage with Docker |
| 7 | +This starter kit is configured to use Docker Compose for local development with a few extra configuration steps. With this setup, you do not need PHP, Composer, MySQL/MariaDB, or Node.js installed on your machine to get up and running with this project. |
| 8 | + |
| 9 | +### Setup |
| 10 | +1. In a new directory (outside of your Laravel project) create a `docker-compose.yml` file to create a reverse proxy container using [Traefik](https://doc.traefik.io/traefik/getting-started/quick-start/). You can reference this [example implementation](https://github.com/connorabbas/traefik-docker-compose/blob/master/docker-compose.yml). |
| 11 | + |
| 12 | +2. Step into the directory containing the new compose file, and spin up the Traefik container: |
| 13 | + ``` |
| 14 | + docker compose up -d |
| 15 | + ``` |
| 16 | +3. Update Laravel app `.env` |
| 17 | + ```env |
| 18 | + # Use any desired domain ending with .localhost |
| 19 | + # Match with value used in docker-compose.local.yml |
| 20 | + APP_URL=http://primevue-inertia.localhost |
| 21 | +
|
| 22 | + DB_CONNECTION=mariadb |
| 23 | + DB_HOST=mariadb # service name from container |
| 24 | + DB_PORT=3306 |
| 25 | + DB_DATABASE=laravel |
| 26 | + DB_USERNAME=docker_mariadb |
| 27 | + DB_PASSWORD=password |
| 28 | +
|
| 29 | + # Update as needed for running multiple projects |
| 30 | + APP_PORT=8000 |
| 31 | + VITE_PORT=5173 |
| 32 | + FORWARD_DB_PORT=3306 |
| 33 | + ``` |
| 34 | +3. Build the Laravel app container: |
| 35 | + - Either build manually with docker compose (like above), use [Laravel Sail](https://laravel.com/docs/master/sail), or build as a [VS Code Dev Container](https://code.visualstudio.com/docs/devcontainers/tutorial) using the `Dev Containers: Reopen in Container` command. |
| 36 | +
|
| 37 | +### Additional configuration |
| 38 | +If you wish to add additional services, or swap out MariaDB with an alternative database, you can reference the [Laravel Sail stubs](https://github.com/laravel/sail/tree/1.x/stubs) and update the `docker-compose.local.yml` file as needed. |
52 | 39 |
|
53 | 40 | ## Theme
|
54 | 41 | This starter kit provides a light/dark mode and custom theme functionality provided by the powerful PrimeVue theming system, using styled mode and custom design token values.
|
|
0 commit comments