test: add Inertia tests and demo - #146
Merged
Merged
Conversation
hwbrzzl
force-pushed
the
bowen/install-inertia-tests
branch
from
August 24, 2026 10:49
3d951f5 to
cf053d7
Compare
hwbrzzl
reviewed
Aug 25, 2026
Contributor
There was a problem hiding this comment.
| // Inertia static assets: the committed root template links /public/favicon.png | ||
| // and the vite helper emits /build/... URLs from the production manifest. | ||
| facades.Route().Static("public", "./public") | ||
| facades.Route().Static("build", "./public/build") |
Contributor
There was a problem hiding this comment.
Will the folder be generated in the repo? If no, why need this line?
| facades.Route().StaticFile("echo.html", "./resources/views/echo.html") | ||
|
|
||
| // Inertia (session-based web routes; StartSession is already global) | ||
| facades.Route().Middleware( |
Contributor
There was a problem hiding this comment.
Add an annotation, similar to: If you actually want to visit the page, npm run dev should be run in advance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
github.com/goravel/inertiadependency, service-provider registration, and generatedfacades.Inertia()facade — so apps can build server-driven Inertia pages with Goravel.resources/inertia/, official Goravel favicon, static asset routes) wired to/inertia/*routes covering deferred/merged props, session flash + validation errors, redirects, and location responses; the demo renders out of the box aftergo run ., and the page is viewable after runningnpm run dev(HMR) ornpm run build(production bundle served from the gitignoredpublic/build).inertia:installscaffolding generation and committed-state restore (including removing the installer-generatedpublic/favicon.pngin teardown).Why
This PR brings Inertia into the example repository as a first-class, copyable demonstration: it installs the package (dependency + provider + generated facade), wires a complete demo through
config/inertia.go, a root template, anInertia()middleware, a controller, and an/inertia/*route group, and commits the Vue 3/Vite frontend so framework users can run the demo immediately without the installer. Static/publicand/buildroutes serve the favicon and production Vite manifest assets, while thegoravelHotVite plugin writes/removespublic/hotfor zero-config HMR during development.The behavior is locked in with tests: the HTTP suite drives the full Inertia protocol (full-page HTML vs X-Inertia JSON, version-mismatch conflicts, deferred/merged props, session flash and validation errors, redirects, and location), and the installer suite runs
inertia:installend-to-end and restores the committed toolchain and demo so the tree stays clean.