Compare commits
6 commits
a225433cec
...
ce1b920fb6
| Author | SHA1 | Date | |
|---|---|---|---|
| ce1b920fb6 | |||
| 334e8d1792 | |||
| ff95e2d2ee | |||
| 15925b856b | |||
| c176be3536 | |||
| 2b53e2b8ac |
34 changed files with 8082 additions and 299 deletions
|
|
@ -4,7 +4,7 @@ Read `ai/shared.md` first. This file covers backend-specific rules.
|
||||||
|
|
||||||
## Project context
|
## Project context
|
||||||
|
|
||||||
**Stack:** PHP 8.4, Laravel 13, Inertia Laravel, PHPUnit, Larastan, Composer.
|
**Stack:** PHP 8.4, Laravel 13, PHPUnit, Larastan, Composer.
|
||||||
|
|
||||||
**Location:** `backend/`.
|
**Location:** `backend/`.
|
||||||
|
|
||||||
|
|
@ -26,8 +26,11 @@ pattern.
|
||||||
duplicating query fragments.
|
duplicating query fragments.
|
||||||
- Avoid speculative interfaces and abstractions with only one trivial
|
- Avoid speculative interfaces and abstractions with only one trivial
|
||||||
implementation.
|
implementation.
|
||||||
- Routes currently use Inertia, but the Vue client has not been scaffolded.
|
- The Vue application is a separate project under `frontend/website/`.
|
||||||
Do not add placeholder frontend assets as part of unrelated backend work.
|
- Keep frontend source, dependencies, builds, and delivery out of the backend
|
||||||
|
unless the user explicitly asks to integrate them.
|
||||||
|
- The backend root route is intentionally unclaimed. The built-in health
|
||||||
|
endpoint is `/up`.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|
@ -99,7 +102,6 @@ pattern.
|
||||||
|
|
||||||
- Run the focused test during development.
|
- Run the focused test during development.
|
||||||
- Run `php artisan test` before completion.
|
- Run `php artisan test` before completion.
|
||||||
- Run the Composer lint and static-analysis scripts when their dependencies
|
- Run the Composer static-analysis scripts.
|
||||||
are available.
|
|
||||||
- Fix failures caused by the change. Report unrelated baseline failures
|
- Fix failures caused by the change. Report unrelated baseline failures
|
||||||
precisely rather than hiding them or expanding scope without authorization.
|
precisely rather than hiding them or expanding scope without authorization.
|
||||||
|
|
|
||||||
|
|
@ -2,53 +2,96 @@
|
||||||
|
|
||||||
Read `ai/shared.md` first. This file covers frontend-specific rules.
|
Read `ai/shared.md` first. This file covers frontend-specific rules.
|
||||||
|
|
||||||
## Current state
|
## Project context
|
||||||
|
|
||||||
The Vue frontend has not been scaffolded yet. The backend has Inertia Laravel
|
**Stack:** Vue 3.5, TypeScript 6, Vite 8, Vue Router 5, Pinia 4, npm.
|
||||||
installed and an Inertia route, but there is no `package.json`, Vue source
|
|
||||||
tree, Vite configuration, or frontend test setup.
|
|
||||||
|
|
||||||
- Do not create the frontend unless the user explicitly asks.
|
**Location:** `frontend/website/`.
|
||||||
- Do not invent a frontend directory, package manager, dependency version, or
|
|
||||||
command before the scaffold establishes it.
|
The frontend is a standalone application. Keep its source, dependencies,
|
||||||
- When the frontend is created, update this file with its actual paths,
|
development server, and production build independent from the backend unless
|
||||||
package versions, scripts, and testing tools.
|
the user explicitly requests integration.
|
||||||
|
|
||||||
|
The scaffold uses:
|
||||||
|
|
||||||
|
- `src/App.vue` as the root component.
|
||||||
|
- `src/main.ts` to create the app and install the router and Pinia.
|
||||||
|
- `src/router/index.ts` for routes.
|
||||||
|
- `src/stores/` for Pinia stores.
|
||||||
|
- `@` as an alias for `src/` in both Vite and TypeScript.
|
||||||
|
|
||||||
|
There are no views, shared components, API layer, or configured test suite
|
||||||
|
yet. Cypress is installed as a frontend development dependency, but there is
|
||||||
|
no Cypress configuration or npm test script. Do not invent an architecture
|
||||||
|
before requested behavior establishes one.
|
||||||
|
|
||||||
|
## Package management and commands
|
||||||
|
|
||||||
|
Use npm and keep `package-lock.json` committed. Run commands from
|
||||||
|
`frontend/website/`.
|
||||||
|
|
||||||
|
Install dependencies in a fresh checkout or worktree:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the development server on the port assigned by the shell hook:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run dev -- --port "$VITE_PORT"
|
||||||
|
```
|
||||||
|
|
||||||
|
`process-compose` does not start or proxy the frontend.
|
||||||
|
|
||||||
|
The available validation commands are:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run format
|
||||||
|
npm run lint
|
||||||
|
npm run type-check
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
`npm run format` and `npm run lint` rewrite files. Review the resulting diff.
|
||||||
|
`npm run build` runs type checking and the production build. Build output
|
||||||
|
under `dist/` is generated and ignored.
|
||||||
|
|
||||||
## Vue conventions
|
## Vue conventions
|
||||||
|
|
||||||
Apply these rules once a Vue 3 frontend exists:
|
|
||||||
|
|
||||||
- Use the Composition API and `<script setup lang="ts">`.
|
- Use the Composition API and `<script setup lang="ts">`.
|
||||||
- Use PascalCase component filenames.
|
- Use PascalCase component and view filenames.
|
||||||
|
- Put reusable components under `src/components/`.
|
||||||
|
- Put route-level views under `src/views/` and register them in
|
||||||
|
`src/router/index.ts`.
|
||||||
- Keep page, component, composable, and store responsibilities distinct.
|
- Keep page, component, composable, and store responsibilities distinct.
|
||||||
- Prefer small components with explicit props and emitted events.
|
- Prefer small components with explicit props and emitted events.
|
||||||
- Keep component styles scoped unless the scaffold establishes a deliberate
|
- Keep component styles scoped until the project adopts a deliberate global
|
||||||
global styling system.
|
styling system.
|
||||||
- Follow the routing and page conventions established by the chosen Inertia
|
- Use setup-style Pinia stores named `useXxxStore`.
|
||||||
or Vue Router scaffold. Do not mix the two approaches without an explicit
|
- Inspect similar files before introducing a new component, composable,
|
||||||
architectural reason.
|
store, or data-access pattern.
|
||||||
- Inspect similar files before introducing a new component, composable, store,
|
|
||||||
or data-access pattern.
|
|
||||||
|
|
||||||
## TypeScript
|
## TypeScript
|
||||||
|
|
||||||
- Enable and preserve strict mode.
|
- Preserve the strict TypeScript configuration and
|
||||||
- Do not use `any`. Model unknown external values as `unknown` and narrow or
|
`noUncheckedIndexedAccess`.
|
||||||
|
- Do not use `any`. Model unknown external values as `unknown`, then narrow or
|
||||||
validate them.
|
validate them.
|
||||||
- Derive types from runtime schemas when a schema library is adopted. Do not
|
- Derive types from runtime schemas if the project adopts a schema library.
|
||||||
maintain a hand-written type that can drift from its validation schema.
|
Do not maintain a hand-written type that can drift from its schema.
|
||||||
- Validate payloads at trust boundaries, especially backend responses and
|
- Validate payloads at trust boundaries, especially backend responses and
|
||||||
user-submitted forms.
|
user-submitted forms.
|
||||||
- Keep request and response types close to the API or store boundary that owns
|
- Keep request and response types close to the API or store boundary that
|
||||||
them.
|
owns them.
|
||||||
- Add a path alias only when it is configured consistently in Vite,
|
- Keep the `@` alias aligned across Vite, TypeScript, and any future test
|
||||||
TypeScript, tests, and Cypress.
|
configuration.
|
||||||
|
|
||||||
## State and API access
|
## State and API access
|
||||||
|
|
||||||
- Use the state-management approach chosen by the scaffold consistently.
|
- Use Pinia for shared client state. Keep component-local state in components.
|
||||||
- Keep server data fetching and transformation at an API/store boundary, not
|
- Keep server requests and response transformation at an API or store
|
||||||
scattered through presentation components.
|
boundary, not scattered through presentation components.
|
||||||
- Represent loading, empty, success, validation-error, and unexpected-error
|
- Represent loading, empty, success, validation-error, and unexpected-error
|
||||||
states explicitly.
|
states explicitly.
|
||||||
- Do not cast unchecked JSON directly to an application interface.
|
- Do not cast unchecked JSON directly to an application interface.
|
||||||
|
|
@ -56,35 +99,25 @@ Apply these rules once a Vue 3 frontend exists:
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|
||||||
Use layered tests once the frontend test setup exists:
|
Cypress is installed, but no frontend test configuration or test script
|
||||||
|
exists yet.
|
||||||
|
|
||||||
- Unit tests cover pure transformations, composables, store logic, computed
|
- Do not invent test commands or claim frontend tests passed.
|
||||||
values, and formatting.
|
- New frontend behavior must still follow the shared test-first workflow.
|
||||||
- Component tests cover rendering, events, form behavior, and conditional UI.
|
Establish the smallest appropriate test setup before implementing behavior
|
||||||
- Cypress tests cover routing, multi-page flows, and request wiring.
|
that needs it.
|
||||||
|
- Unit tests should cover pure transformations, composables, and store logic.
|
||||||
|
- Component tests should cover rendering, events, form behavior, and
|
||||||
|
conditional UI.
|
||||||
|
- End-to-end tests should cover routing, multi-page flows, and request wiring.
|
||||||
- Prefer the cheapest layer that proves the behavior.
|
- Prefer the cheapest layer that proves the behavior.
|
||||||
- Import test functions explicitly rather than relying on globals unless the
|
- Mock backend requests in frontend tests. Do not retest backend persistence,
|
||||||
scaffold deliberately configures globals.
|
validation, authentication, or mail behavior through the frontend.
|
||||||
- Build test data with small typed builders instead of repeated bare object
|
|
||||||
literals.
|
|
||||||
|
|
||||||
## Frontend/backend test boundary
|
|
||||||
|
|
||||||
- Mock backend requests in frontend tests.
|
|
||||||
- A frontend test should verify how the UI consumes a response and which
|
|
||||||
request it sends, not retest Laravel's business rules.
|
|
||||||
- Test backend persistence, validation, authentication, and mail behavior in
|
|
||||||
PHPUnit.
|
|
||||||
- Keep mocked response bodies typed against the frontend's exported API or
|
|
||||||
store types.
|
|
||||||
- When runtime schemas exist, parse mock-builder output through the same
|
|
||||||
schema so drift fails at the test boundary.
|
|
||||||
|
|
||||||
## Before completing frontend work
|
## Before completing frontend work
|
||||||
|
|
||||||
- Run the formatter, linter, type checker, unit tests, and Cypress scripts
|
- Run the focused test while developing once test tooling exists.
|
||||||
defined by the frontend's `package.json`.
|
- Run the formatter, linter, type checker, production build, and every
|
||||||
- Do not substitute a hand-picked subset for the repository's eventual full
|
configured test script affected by the change.
|
||||||
frontend gate.
|
- Do not claim a green gate when a command fails. Report a baseline or
|
||||||
- If the frontend cannot run because the scaffold or a required service is
|
environmental failure precisely.
|
||||||
absent, report the precise environmental or baseline failure.
|
|
||||||
|
|
|
||||||
38
ai/shared.md
38
ai/shared.md
|
|
@ -13,8 +13,10 @@ these rules.
|
||||||
unfinished assignments across the remaining dates.
|
unfinished assignments across the remaining dates.
|
||||||
- Planned features in `README.md` are future ideas, not authorized scope.
|
- Planned features in `README.md` are future ideas, not authorized scope.
|
||||||
- The Laravel backend exists under `backend/`.
|
- The Laravel backend exists under `backend/`.
|
||||||
- The Vue frontend has not been scaffolded yet. Do not create it unless the
|
- The standalone Vue frontend exists under `frontend/website/`.
|
||||||
user explicitly asks for that work.
|
- Keep the frontend independent from the backend. Do not add backend-driven
|
||||||
|
rendering, asset delivery, or build integration unless the user explicitly
|
||||||
|
asks for it.
|
||||||
- PostgreSQL is the development and runtime database.
|
- PostgreSQL is the development and runtime database.
|
||||||
- PHPUnit uses in-memory SQLite for isolated tests.
|
- PHPUnit uses in-memory SQLite for isolated tests.
|
||||||
|
|
||||||
|
|
@ -62,6 +64,9 @@ those changes with the most relevant parser, formatter, dry run, or check.
|
||||||
|
|
||||||
- Run backend commands from `backend/`, or explicitly change into it in the
|
- Run backend commands from `backend/`, or explicitly change into it in the
|
||||||
command.
|
command.
|
||||||
|
- Run frontend commands from `frontend/website/`.
|
||||||
|
- `process-compose` does not start the frontend. Start it separately with
|
||||||
|
`npm run dev -- --port "$VITE_PORT"` when needed.
|
||||||
- When a normally valid check fails because a required service is down,
|
- When a normally valid check fails because a required service is down,
|
||||||
surface the environmental failure. Do not skip the check or silently switch
|
surface the environmental failure. Do not skip the check or silently switch
|
||||||
to a different database or service.
|
to a different database or service.
|
||||||
|
|
@ -134,9 +139,12 @@ those changes with the most relevant parser, formatter, dry run, or check.
|
||||||
direnv exec <worktree> true
|
direnv exec <worktree> true
|
||||||
```
|
```
|
||||||
|
|
||||||
- Never symlink `backend/vendor` or a future frontend's `node_modules` from
|
- Never symlink `backend/vendor` or `frontend/website/node_modules` from
|
||||||
another checkout. Dependency paths and generated autoloaders must remain
|
another checkout. Dependency paths and generated files must remain
|
||||||
worktree-local.
|
worktree-local.
|
||||||
|
- The shell hook installs backend dependencies but does not install frontend
|
||||||
|
dependencies. Run `npm install` from `frontend/website/` when provisioning a
|
||||||
|
fresh worktree.
|
||||||
|
|
||||||
Do not push anything. Make commits as the TDD workflow requires.
|
Do not push anything. Make commits as the TDD workflow requires.
|
||||||
|
|
||||||
|
|
@ -148,11 +156,9 @@ gate affected by the change.
|
||||||
### Backend
|
### Backend
|
||||||
|
|
||||||
- Run tests from `backend/` with `php artisan test`.
|
- Run tests from `backend/` with `php artisan test`.
|
||||||
- Run the Composer checks defined by `backend/composer.json` when their
|
- Run the Composer checks defined by `backend/composer.json`:
|
||||||
dependencies are available:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
composer lint:check
|
|
||||||
composer types:check
|
composer types:check
|
||||||
composer test
|
composer test
|
||||||
```
|
```
|
||||||
|
|
@ -162,11 +168,19 @@ gate affected by the change.
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
|
|
||||||
- The frontend does not exist yet. Once scaffolded, use the scripts defined in
|
- Run these commands from `frontend/website/`:
|
||||||
its `package.json` for formatting, linting, type checking, unit tests, and
|
|
||||||
end-to-end tests.
|
```sh
|
||||||
- Update `ai/frontend-context.md` when the actual scaffold, package manager,
|
npm run format
|
||||||
and commands are known.
|
npm run lint
|
||||||
|
npm run type-check
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
- The formatter and linters rewrite files. Review their changes before
|
||||||
|
committing.
|
||||||
|
- No frontend test runner is configured yet. Do not claim unit, component, or
|
||||||
|
end-to-end test coverage until the relevant scripts exist and pass.
|
||||||
|
|
||||||
### Environment and integration
|
### Environment and integration
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Inertia\Middleware;
|
|
||||||
|
|
||||||
class HandleInertiaRequests extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The root template that's loaded on the first page visit.
|
|
||||||
*
|
|
||||||
* @see https://inertiajs.com/server-side-setup#root-template
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $rootView = 'app';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines the current asset version.
|
|
||||||
*
|
|
||||||
* @see https://inertiajs.com/asset-versioning
|
|
||||||
*/
|
|
||||||
public function version(Request $request): ?string
|
|
||||||
{
|
|
||||||
return parent::version($request);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the props that are shared by default.
|
|
||||||
*
|
|
||||||
* @see https://inertiajs.com/shared-data
|
|
||||||
*
|
|
||||||
* @return array<string, mixed>
|
|
||||||
*/
|
|
||||||
public function share(Request $request): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
...parent::share($request),
|
|
||||||
'name' => config('app.name'),
|
|
||||||
'auth' => [
|
|
||||||
'user' => $request->user(),
|
|
||||||
],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,10 +3,8 @@
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Database\Factories\UserFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||||
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
use Illuminate\Database\Eloquent\Attributes\Hidden;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Illuminate\Support\Carbon;
|
use Illuminate\Support\Carbon;
|
||||||
|
|
@ -25,8 +23,7 @@ use Illuminate\Support\Carbon;
|
||||||
#[Hidden(['password', 'remember_token'])]
|
#[Hidden(['password', 'remember_token'])]
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
/** @use HasFactory<UserFactory> */
|
use Notifiable;
|
||||||
use HasFactory, Notifiable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the attributes that should be cast.
|
* Get the attributes that should be cast.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Middleware\HandleInertiaRequests;
|
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Foundation\Application;
|
||||||
use Illuminate\Foundation\Configuration\Exceptions;
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||||||
use Illuminate\Foundation\Configuration\Middleware;
|
use Illuminate\Foundation\Configuration\Middleware;
|
||||||
|
|
@ -15,7 +14,6 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||||
)
|
)
|
||||||
->withMiddleware(function (Middleware $middleware): void {
|
->withMiddleware(function (Middleware $middleware): void {
|
||||||
$middleware->web(append: [
|
$middleware->web(append: [
|
||||||
HandleInertiaRequests::class,
|
|
||||||
AddLinkHeadersForPreloadedAssets::class,
|
AddLinkHeadersForPreloadedAssets::class,
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3",
|
"php": "^8.3",
|
||||||
"inertiajs/inertia-laravel": "^3.2",
|
|
||||||
"laravel/framework": "^13.17",
|
"laravel/framework": "^13.17",
|
||||||
"laravel/tinker": "^3.0"
|
"laravel/tinker": "^3.0"
|
||||||
},
|
},
|
||||||
|
|
@ -47,12 +46,6 @@
|
||||||
"Composer\\Config::disableProcessTimeout",
|
"Composer\\Config::disableProcessTimeout",
|
||||||
"@php artisan dev"
|
"@php artisan dev"
|
||||||
],
|
],
|
||||||
"lint": [
|
|
||||||
"pint --parallel"
|
|
||||||
],
|
|
||||||
"lint:check": [
|
|
||||||
"pint --parallel --test"
|
|
||||||
],
|
|
||||||
"ci:check": [
|
"ci:check": [
|
||||||
"Composer\\Config::disableProcessTimeout",
|
"Composer\\Config::disableProcessTimeout",
|
||||||
"npm run lint:check",
|
"npm run lint:check",
|
||||||
|
|
@ -61,11 +54,10 @@
|
||||||
"@test"
|
"@test"
|
||||||
],
|
],
|
||||||
"types:check": [
|
"types:check": [
|
||||||
"phpstan analyse"
|
"phpstan analyse --memory-limit=1G"
|
||||||
],
|
],
|
||||||
"test": [
|
"test": [
|
||||||
"@php artisan config:clear --ansi",
|
"@php artisan config:clear --ansi",
|
||||||
"@lint:check",
|
|
||||||
"@types:check",
|
"@types:check",
|
||||||
"@php artisan test"
|
"@php artisan test"
|
||||||
],
|
],
|
||||||
|
|
|
||||||
74
backend/composer.lock
generated
74
backend/composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "29d1e2d51fd6a59e22604be86a53d7bf",
|
"content-hash": "29bf8331467e53b3167e4f694dc9618d",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
|
@ -1057,78 +1057,6 @@
|
||||||
],
|
],
|
||||||
"time": "2026-07-17T13:53:03+00:00"
|
"time": "2026-07-17T13:53:03+00:00"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "inertiajs/inertia-laravel",
|
|
||||||
"version": "v3.2.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/inertiajs/inertia-laravel.git",
|
|
||||||
"reference": "e6ad31fbafb3c8d1c269c93ab12da3712c077744"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/inertiajs/inertia-laravel/zipball/e6ad31fbafb3c8d1c269c93ab12da3712c077744",
|
|
||||||
"reference": "e6ad31fbafb3c8d1c269c93ab12da3712c077744",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"ext-json": "*",
|
|
||||||
"laravel/framework": "^11.35|^12.0|^13.0",
|
|
||||||
"php": "^8.2.0",
|
|
||||||
"symfony/console": "^7.0|^8.0"
|
|
||||||
},
|
|
||||||
"conflict": {
|
|
||||||
"laravel/boost": "<2.2.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"guzzlehttp/guzzle": "^7.15.2|^8.0",
|
|
||||||
"larastan/larastan": "^3.0",
|
|
||||||
"laravel/pint": "^1.16",
|
|
||||||
"mockery/mockery": "^1.3.3",
|
|
||||||
"orchestra/testbench": "^9.2|^10.0|^11.0",
|
|
||||||
"phpunit/phpunit": "^11.5|^12.0"
|
|
||||||
},
|
|
||||||
"suggest": {
|
|
||||||
"ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command."
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"extra": {
|
|
||||||
"laravel": {
|
|
||||||
"providers": [
|
|
||||||
"Inertia\\ServiceProvider"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"autoload": {
|
|
||||||
"files": [
|
|
||||||
"./helpers.php"
|
|
||||||
],
|
|
||||||
"psr-4": {
|
|
||||||
"Inertia\\": "src"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Jonathan Reinink",
|
|
||||||
"email": "jonathan@reinink.ca",
|
|
||||||
"homepage": "https://reinink.ca"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "The Laravel adapter for Inertia.js.",
|
|
||||||
"keywords": [
|
|
||||||
"inertia",
|
|
||||||
"laravel"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/inertiajs/inertia-laravel/issues",
|
|
||||||
"source": "https://github.com/inertiajs/inertia-laravel/tree/v3.2.1"
|
|
||||||
},
|
|
||||||
"time": "2026-07-29T09:10:23+00:00"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v13.23.0",
|
"version": "v13.23.0",
|
||||||
|
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Server Side Rendering
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| These options configures if and how Inertia uses Server Side Rendering
|
|
||||||
| to pre-render each initial request made to your application's pages
|
|
||||||
| so that server rendered HTML is delivered for the user's browser.
|
|
||||||
|
|
|
||||||
| See: https://inertiajs.com/server-side-rendering
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'ssr' => [
|
|
||||||
'enabled' => true,
|
|
||||||
'url' => 'http://127.0.0.1:13714',
|
|
||||||
// 'bundle' => base_path('bootstrap/ssr/ssr.mjs'),
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Pages
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| These options configure how Inertia discovers page components on the
|
|
||||||
| filesystem. The paths and extensions are used to locate components
|
|
||||||
| when rendering responses and during testing assertions.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'pages' => [
|
|
||||||
|
|
||||||
'paths' => [
|
|
||||||
resource_path('js/pages'),
|
|
||||||
],
|
|
||||||
|
|
||||||
'extensions' => [
|
|
||||||
'js',
|
|
||||||
'jsx',
|
|
||||||
'svelte',
|
|
||||||
'ts',
|
|
||||||
'tsx',
|
|
||||||
'vue',
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Testing
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The values described here are used to locate Inertia components on the
|
|
||||||
| filesystem. For instance, when using `assertInertia`, the assertion
|
|
||||||
| attempts to locate the component as a file relative to the paths.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'testing' => [
|
|
||||||
|
|
||||||
'ensure_pages_exist' => true,
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
@ -2,24 +2,14 @@
|
||||||
|
|
||||||
namespace Database\Seeders;
|
namespace Database\Seeders;
|
||||||
|
|
||||||
use App\Models\User;
|
|
||||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
class DatabaseSeeder extends Seeder
|
class DatabaseSeeder extends Seeder
|
||||||
{
|
{
|
||||||
use WithoutModelEvents;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Seed the application's database.
|
* Seed the application's database.
|
||||||
*/
|
*/
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
// User::factory(10)->create();
|
|
||||||
|
|
||||||
User::factory()->create([
|
|
||||||
'name' => 'Test User',
|
|
||||||
'email' => 'test@example.com',
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
Route::inertia('/', 'Welcome')->name('home');
|
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,14 @@
|
||||||
|
|
||||||
namespace Tests\Feature;
|
namespace Tests\Feature;
|
||||||
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
class ExampleTest extends TestCase
|
||||||
{
|
{
|
||||||
use RefreshDatabase;
|
public function test_root_does_not_serve_a_frontend(): void
|
||||||
|
|
||||||
public function test_returns_a_successful_response()
|
|
||||||
{
|
{
|
||||||
$response = $this->get(route('home'));
|
$response = $this->get('/');
|
||||||
|
|
||||||
$response->assertOk();
|
$response->assertNotFound();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@
|
||||||
nodejs
|
nodejs
|
||||||
nixfmt
|
nixfmt
|
||||||
nixfmt-tree
|
nixfmt-tree
|
||||||
cypress
|
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
typescript
|
typescript
|
||||||
postgresql
|
postgresql
|
||||||
|
|
|
||||||
8
frontend/website/.editorconfig
Normal file
8
frontend/website/.editorconfig
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
end_of_line = lf
|
||||||
|
max_line_length = 100
|
||||||
1
frontend/website/.gitattributes
vendored
Normal file
1
frontend/website/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
* text=auto eol=lf
|
||||||
39
frontend/website/.gitignore
vendored
Normal file
39
frontend/website/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
.DS_Store
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
coverage
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
|
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Cypress
|
||||||
|
/cypress/videos/
|
||||||
|
/cypress/screenshots/
|
||||||
|
|
||||||
|
# Vitest
|
||||||
|
__screenshots__/
|
||||||
|
|
||||||
|
# Vite
|
||||||
|
*.timestamp-*-*.mjs
|
||||||
5
frontend/website/.oxfmtrc.json
Normal file
5
frontend/website/.oxfmtrc.json
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
||||||
|
"semi": false,
|
||||||
|
"singleQuote": true
|
||||||
|
}
|
||||||
10
frontend/website/.oxlintrc.json
Normal file
10
frontend/website/.oxlintrc.json
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||||
|
"plugins": ["eslint", "typescript", "unicorn", "oxc", "vue"],
|
||||||
|
"env": {
|
||||||
|
"browser": true
|
||||||
|
},
|
||||||
|
"categories": {
|
||||||
|
"correctness": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
8
frontend/website/.vscode/extensions.json
vendored
Normal file
8
frontend/website/.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"recommendations": [
|
||||||
|
"Vue.volar",
|
||||||
|
"dbaeumer.vscode-eslint",
|
||||||
|
"EditorConfig.EditorConfig",
|
||||||
|
"oxc.oxc-vscode"
|
||||||
|
]
|
||||||
|
}
|
||||||
48
frontend/website/README.md
Normal file
48
frontend/website/README.md
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
# website
|
||||||
|
|
||||||
|
This template should help get you started developing with Vue 3 in Vite.
|
||||||
|
|
||||||
|
## Recommended IDE Setup
|
||||||
|
|
||||||
|
[VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
|
||||||
|
|
||||||
|
## Recommended Browser Setup
|
||||||
|
|
||||||
|
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
|
||||||
|
- [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
|
||||||
|
- [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
|
||||||
|
- Firefox:
|
||||||
|
- [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
|
||||||
|
- [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
|
||||||
|
|
||||||
|
## Type Support for `.vue` Imports in TS
|
||||||
|
|
||||||
|
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
|
||||||
|
|
||||||
|
## Customize configuration
|
||||||
|
|
||||||
|
See [Vite Configuration Reference](https://vite.dev/config/).
|
||||||
|
|
||||||
|
## Project Setup
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Hot-Reload for Development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Type-Check, Compile and Minify for Production
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lint with [ESLint](https://eslint.org/)
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run lint
|
||||||
|
```
|
||||||
1
frontend/website/env.d.ts
vendored
Normal file
1
frontend/website/env.d.ts
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/// <reference types="vite/client" />
|
||||||
26
frontend/website/eslint.config.ts
Normal file
26
frontend/website/eslint.config.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
import { globalIgnores } from 'eslint/config'
|
||||||
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
||||||
|
import pluginVue from 'eslint-plugin-vue'
|
||||||
|
import pluginOxlint from 'eslint-plugin-oxlint'
|
||||||
|
import skipFormatting from 'eslint-config-prettier/flat'
|
||||||
|
|
||||||
|
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
||||||
|
// import { configureVueProject } from '@vue/eslint-config-typescript'
|
||||||
|
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
|
||||||
|
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
||||||
|
|
||||||
|
export default defineConfigWithVueTs(
|
||||||
|
{
|
||||||
|
name: 'app/files-to-lint',
|
||||||
|
files: ['**/*.{vue,ts,mts,tsx}'],
|
||||||
|
},
|
||||||
|
|
||||||
|
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
||||||
|
|
||||||
|
...pluginVue.configs['flat/essential'],
|
||||||
|
vueTsConfigs.recommended,
|
||||||
|
|
||||||
|
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
|
||||||
|
|
||||||
|
skipFormatting,
|
||||||
|
)
|
||||||
13
frontend/website/index.html
Normal file
13
frontend/website/index.html
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<link rel="icon" href="/favicon.ico">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Vite App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
7625
frontend/website/package-lock.json
generated
Normal file
7625
frontend/website/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
50
frontend/website/package.json
Normal file
50
frontend/website/package.json
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"name": "website",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "run-p type-check \"build-only {@}\" --",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"build-only": "vite build",
|
||||||
|
"type-check": "vue-tsc --build",
|
||||||
|
"lint": "run-s \"lint:*\"",
|
||||||
|
"lint:oxlint": "oxlint . --fix",
|
||||||
|
"lint:eslint": "eslint . --fix --cache",
|
||||||
|
"format": "oxfmt src/"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"pinia": "^4.0.2",
|
||||||
|
"vue": "^3.5.40",
|
||||||
|
"vue-router": "^5.2.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@tsconfig/node24": "^24.0.4",
|
||||||
|
"@types/node": "^24.13.3",
|
||||||
|
"@vitejs/plugin-vue": "^6.0.8",
|
||||||
|
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
||||||
|
"@vue/eslint-config-typescript": "^14.9.0",
|
||||||
|
"@vue/tsconfig": "^0.9.1",
|
||||||
|
"cypress": "^15.19.0",
|
||||||
|
"eslint": "^10.7.0",
|
||||||
|
"eslint-config-prettier": "^10.1.8",
|
||||||
|
"eslint-plugin-oxlint": "~1.76.0",
|
||||||
|
"eslint-plugin-vue": "~10.9.2",
|
||||||
|
"jiti": "^2.7.0",
|
||||||
|
"npm-run-all2": "^9.0.2",
|
||||||
|
"oxfmt": "^0.59.0",
|
||||||
|
"oxlint": "~1.76.0",
|
||||||
|
"typescript": "~6.0.0",
|
||||||
|
"vite": "^8.1.5",
|
||||||
|
"vite-plugin-vue-devtools": "^8.1.5",
|
||||||
|
"vue-eslint-parser": "^10.4.1",
|
||||||
|
"vue-tsc": "^3.3.7"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^22.18.0 || >=24.12.0"
|
||||||
|
},
|
||||||
|
"allowScripts": {
|
||||||
|
"cypress@15.19.0": true
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
frontend/website/public/favicon.ico
Normal file
BIN
frontend/website/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
11
frontend/website/src/App.vue
Normal file
11
frontend/website/src/App.vue
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<h1>You did it!</h1>
|
||||||
|
<p>
|
||||||
|
Visit <a href="https://vuejs.org/" target="_blank" rel="noopener">vuejs.org</a> to read the
|
||||||
|
documentation
|
||||||
|
</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
12
frontend/website/src/main.ts
Normal file
12
frontend/website/src/main.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { createApp } from 'vue'
|
||||||
|
import { createPinia } from 'pinia'
|
||||||
|
|
||||||
|
import App from './App.vue'
|
||||||
|
import router from './router'
|
||||||
|
|
||||||
|
const app = createApp(App)
|
||||||
|
|
||||||
|
app.use(createPinia())
|
||||||
|
app.use(router)
|
||||||
|
|
||||||
|
app.mount('#app')
|
||||||
8
frontend/website/src/router/index.ts
Normal file
8
frontend/website/src/router/index.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
|
routes: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router
|
||||||
12
frontend/website/src/stores/counter.ts
Normal file
12
frontend/website/src/stores/counter.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
export const useCounterStore = defineStore('counter', () => {
|
||||||
|
const count = ref(0)
|
||||||
|
const doubleCount = computed(() => count.value * 2)
|
||||||
|
function increment() {
|
||||||
|
count.value++
|
||||||
|
}
|
||||||
|
|
||||||
|
return { count, doubleCount, increment }
|
||||||
|
})
|
||||||
18
frontend/website/tsconfig.app.json
Normal file
18
frontend/website/tsconfig.app.json
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"extends": "@vue/tsconfig/tsconfig.dom.json",
|
||||||
|
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||||
|
"exclude": ["src/**/__tests__/*"],
|
||||||
|
"compilerOptions": {
|
||||||
|
// Extra safety for array and object lookups, but may have false positives.
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
|
|
||||||
|
// Path mapping for cleaner imports.
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
},
|
||||||
|
|
||||||
|
// `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
|
||||||
|
// Specified here to keep it out of the root directory.
|
||||||
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo"
|
||||||
|
}
|
||||||
|
}
|
||||||
11
frontend/website/tsconfig.json
Normal file
11
frontend/website/tsconfig.json
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"files": [],
|
||||||
|
"references": [
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.node.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./tsconfig.app.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
27
frontend/website/tsconfig.node.json
Normal file
27
frontend/website/tsconfig.node.json
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
// TSConfig for modules that run in Node.js environment via either transpilation or type-stripping.
|
||||||
|
{
|
||||||
|
"extends": "@tsconfig/node24/tsconfig.json",
|
||||||
|
"include": [
|
||||||
|
"vite.config.*",
|
||||||
|
"vitest.config.*",
|
||||||
|
"cypress.config.*",
|
||||||
|
"playwright.config.*",
|
||||||
|
"eslint.config.*"
|
||||||
|
],
|
||||||
|
"compilerOptions": {
|
||||||
|
// Most tools use transpilation instead of Node.js's native type-stripping.
|
||||||
|
// Bundler mode provides a smoother developer experience.
|
||||||
|
"module": "preserve",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
|
||||||
|
// Include Node.js types and avoid accidentally including other `@types/*` packages.
|
||||||
|
"types": ["node"],
|
||||||
|
|
||||||
|
// Disable emitting output during `vue-tsc --build`, which is used for type-checking only.
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
// `vue-tsc --build` produces a .tsbuildinfo file for incremental type-checking.
|
||||||
|
// Specified here to keep it out of the root directory.
|
||||||
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
frontend/website/vite.config.ts
Normal file
20
frontend/website/vite.config.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
||||||
|
import vueDevTools from 'vite-plugin-vue-devtools'
|
||||||
|
|
||||||
|
// https://vite.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [
|
||||||
|
vue(),
|
||||||
|
vueJsx(),
|
||||||
|
vueDevTools(),
|
||||||
|
],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue