Quick Start
We recommend scaffolding Inertia.js-Revamped via automatic CLI installer @preset/cli.
alpha
status and not ready for production use yet. Try it Online
Start the Inertia.js-Revamped Breeze starter kit in your browser:
Prerequisites
Ensure that your environment meets the minimum installation requirements:
Scaffolding a new project
To install Inertia.js-Revamped in a fresh Laravel application, setup a new laravel project:
composer create-project laravel/laravel <project-name>
cd <project-name>
Running the following command you'll be prompted to select your project configuration:
Click to expand available command line arguments
- You can directly specify command line arguments.
Option | Description |
---|---|
--pm | Package manager (default: npm ) ("npm" | "pnpm" | "yarn" | "bun" ) |
--ui | UI-Framework ("preact" | "react" | "vue" ) |
--template | Template ("default" | "breeze" | "pingcrm" ) |
--no-ssr | Disable SSR (default: false ) (boolean ) |
--sandbox | For development workspace only (default: false ) (boolean ) |
npx @preset/cli apply inertiajs-revamped/inertia
pnpm dlx @preset/cli apply inertiajs-revamped/inertia
yarn add @preset/cli apply inertiajs-revamped/inertia
bunx @preset/cli apply inertiajs-revamped/inertia
Example output:
OK Applied Inertia.js-Revamped.
✓ Executed action: Choose your package manager › pnpm
✓ Executed action: Choose your UI framework › react
✓ Executed action: Choose your starter template › breeze
✓ Executed action: Choose to enable/disable SSR › enabled
✓ Executed action: Installing PHP dependencies with Composer (php)
✓ Executed action: Installing Breeze Scaffolding (15 actions)
Presets 1 applied
Actions 21 executed
Duration 21.55s
NEXT STEPS
➜ Run the development server with npm run dev
➜ Edit your entry points in resources/application
➜ Edit your pages in resources/pages
Usage
Serving Laravel
To learn more about how to serve your Laravel application, read Laravel installation.
Typically, you may use a web server such as Apache or Nginx to serve your Laravel applications. If you ... would like to use PHP's built-in development server, you may use the serve Artisan command:
php artisan serve
By default the HTTP-server will listen to port 8000.
Start the development server
Run the Vite dev server with the command:
npm run dev
pnpm run dev
yarn run dev
bun run dev
# outputs
VITE v5.2.12 ready in 148 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
LARAVEL v11.9.1 plugin v1.0.4
➜ APP_URL: http://localhost
Deploy
To learn more about how to deploy your application, read Laravel deployment.
Bundle with Vite
Build the app with production-ready assets with the command:
npm run build:prod
pnpm run build:prod
yarn run build:prod
bun run build:prod
# outputs
vite v5.2.12 building for production...
✓ 173 modules transformed.
public/build/manifest.json 6.77 kB │ gzip: 0.83 kB
public/build/assets/main-COAaD1bI.css 18.35 kB │ gzip: 4.54 kB
# ...
public/build/assets/main-CkXGnkYC.js 252.00 kB │ gzip: 83.96 kB
✓ built in 1.40s
vite v5.2.12 building SSR bundle for production...
✓ 29 modules transformed.
bootstrap/ssr/ssr-manifest.json 2.48 kB
bootstrap/ssr/assets/index-VzRQPh_D.js 0.51 kB
# ...
bootstrap/ssr/assets/layout-C6sDMM8X.js 16.57 kB
✓ built in 344ms
Server-side Rendering (SSR)
Server-side rendering uses Node.js to render your pages in a background process; therefore, Node must be available on your server for server-side rendering to function properly.
# start the ssr server
php artisan inertia:start-ssr
# stop the ssr server
php artisan inertia:stop-ssr
What's next?
Community
If you have a question or need additional help, please consider to join our Discord or start a discussion at GitHub.
Please use the GitHub issue tracker to submit bug reports and feature requests.