Development Guide
This guide covers day-to-day development for FVN.li's Laravel 13 + Svelte 5 + Inertia frontend.
Prerequisites
Docker and DDEV
Composer through DDEV
Bun through DDEV
The web container currently runs PHP 8.5, and dependencies are managed from the repo lockfiles.
Initial Setup
Start the Vite dev server:
Open the app at https://fvn-li.ddev.site.
Frontend Stack
Svelte page components live in
resources/js/pages/**/*.svelte.Reusable Svelte components live in
resources/js/components/.Inertia layouts live in
resources/js/layouts/.Reusable state helpers live in
resources/js/hooks/*.svelte.tsor plain TypeScript modules.Browser JSON endpoints use
/browser-apiandbrowser-api.*route names.Stateless external APIs remain under
/api.
Creating Components
Create Svelte components in resources/js/components/:
Create Inertia pages in resources/js/pages/ and return them from Laravel with Inertia::render().
Browser API Calls
Prefer Ziggy route names over hard-coded paths when the route is named:
For file uploads, use authenticatedFetch helpers where the component needs native FormData handling or progress state.
Code Quality
ddev bun types runs svelte-check; it is the primary frontend type gate.
Testing
Run PHP tests through DDEV:
Run Svelte/TypeScript unit tests:
Run Playwright through the DDEV sidecar:
Coverage:
Do not run PHP feature tests concurrently against the shared db_test database unless each process has isolated database state.
Build
Client build:
Client + SSR build:
The SSR entry point is resources/js/ssr.ts, and the browser entry point is resources/js/app.ts.
Debugging
Use browser DevTools for Svelte component output and network requests.
Inertia page props are visible in the page payload and browser globals during development.
Source maps are enabled in development.
Laravel logs are in
storage/logs/laravel.log.Browser API requests should hit
/browser-api; do not add new endpoints under old framework-specific prefixes.
Frontend Best Practices
Use Svelte runes for component-local state.
Keep shared reusable state in
.svelte.tshelpers when it needs Svelte reactivity.Keep plain deterministic logic in
.tsutilities so it can be covered with Vitest.Use
resources/js/utils/http.tsfor Axios calls that need CSRF retry behavior.Prefer accessible native elements and shared dialog helpers.
Keep route names and docs aligned with the current Svelte/browser API naming.