Compare commits

..

No commits in common. "ce1b920fb68838484ff450244b74e5f3432c5f74" and "a225433cec6b313b30171032f641c61c8acc4549" have entirely different histories.

34 changed files with 300 additions and 8083 deletions

View file

@ -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, PHPUnit, Larastan, Composer. **Stack:** PHP 8.4, Laravel 13, Inertia Laravel, PHPUnit, Larastan, Composer.
**Location:** `backend/`. **Location:** `backend/`.
@ -26,11 +26,8 @@ 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.
- The Vue application is a separate project under `frontend/website/`. - Routes currently use Inertia, but the Vue client has not been scaffolded.
- Keep frontend source, dependencies, builds, and delivery out of the backend Do not add placeholder frontend assets as part of unrelated backend work.
unless the user explicitly asks to integrate them.
- The backend root route is intentionally unclaimed. The built-in health
endpoint is `/up`.
## Tests ## Tests
@ -102,6 +99,7 @@ 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 static-analysis scripts. - Run the Composer lint and static-analysis scripts when their dependencies
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.

View file

@ -2,96 +2,53 @@
Read `ai/shared.md` first. This file covers frontend-specific rules. Read `ai/shared.md` first. This file covers frontend-specific rules.
## Project context ## Current state
**Stack:** Vue 3.5, TypeScript 6, Vite 8, Vue Router 5, Pinia 4, npm. The Vue frontend has not been scaffolded yet. The backend has Inertia Laravel
installed and an Inertia route, but there is no `package.json`, Vue source
tree, Vite configuration, or frontend test setup.
**Location:** `frontend/website/`. - Do not create the frontend unless the user explicitly asks.
- Do not invent a frontend directory, package manager, dependency version, or
The frontend is a standalone application. Keep its source, dependencies, command before the scaffold establishes it.
development server, and production build independent from the backend unless - When the frontend is created, update this file with its actual paths,
the user explicitly requests integration. package versions, scripts, and testing tools.
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 and view filenames. - Use PascalCase component 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 until the project adopts a deliberate global - Keep component styles scoped unless the scaffold establishes a deliberate
styling system. global styling system.
- Use setup-style Pinia stores named `useXxxStore`. - Follow the routing and page conventions established by the chosen Inertia
- Inspect similar files before introducing a new component, composable, or Vue Router scaffold. Do not mix the two approaches without an explicit
store, or data-access pattern. architectural reason.
- Inspect similar files before introducing a new component, composable, store,
or data-access pattern.
## TypeScript ## TypeScript
- Preserve the strict TypeScript configuration and - Enable and preserve strict mode.
`noUncheckedIndexedAccess`. - Do not use `any`. Model unknown external values as `unknown` and narrow or
- Do not use `any`. Model unknown external values as `unknown`, then narrow or
validate them. validate them.
- Derive types from runtime schemas if the project adopts a schema library. - Derive types from runtime schemas when a schema library is adopted. Do not
Do not maintain a hand-written type that can drift from its schema. maintain a hand-written type that can drift from its validation 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 - Keep request and response types close to the API or store boundary that owns
owns them. them.
- Keep the `@` alias aligned across Vite, TypeScript, and any future test - Add a path alias only when it is configured consistently in Vite,
configuration. TypeScript, tests, and Cypress.
## State and API access ## State and API access
- Use Pinia for shared client state. Keep component-local state in components. - Use the state-management approach chosen by the scaffold consistently.
- Keep server requests and response transformation at an API or store - Keep server data fetching and transformation at an API/store boundary, not
boundary, not scattered through presentation components. 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.
@ -99,25 +56,35 @@ under `dist/` is generated and ignored.
## Testing ## Testing
Cypress is installed, but no frontend test configuration or test script Use layered tests once the frontend test setup exists:
exists yet.
- Do not invent test commands or claim frontend tests passed. - Unit tests cover pure transformations, composables, store logic, computed
- New frontend behavior must still follow the shared test-first workflow. values, and formatting.
Establish the smallest appropriate test setup before implementing behavior - Component tests cover rendering, events, form behavior, and conditional UI.
that needs it. - Cypress tests cover routing, multi-page flows, and request wiring.
- 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.
- Mock backend requests in frontend tests. Do not retest backend persistence, - Import test functions explicitly rather than relying on globals unless the
validation, authentication, or mail behavior through the frontend. scaffold deliberately configures globals.
- 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 focused test while developing once test tooling exists. - Run the formatter, linter, type checker, unit tests, and Cypress scripts
- Run the formatter, linter, type checker, production build, and every defined by the frontend's `package.json`.
configured test script affected by the change. - Do not substitute a hand-picked subset for the repository's eventual full
- Do not claim a green gate when a command fails. Report a baseline or frontend gate.
environmental failure precisely. - If the frontend cannot run because the scaffold or a required service is
absent, report the precise environmental or baseline failure.

View file

@ -13,10 +13,8 @@ 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 standalone Vue frontend exists under `frontend/website/`. - The Vue frontend has not been scaffolded yet. Do not create it unless the
- Keep the frontend independent from the backend. Do not add backend-driven user explicitly asks for that work.
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.
@ -64,9 +62,6 @@ 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.
@ -139,12 +134,9 @@ 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 `frontend/website/node_modules` from - Never symlink `backend/vendor` or a future frontend's `node_modules` from
another checkout. Dependency paths and generated files must remain another checkout. Dependency paths and generated autoloaders 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.
@ -156,9 +148,11 @@ 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`: - Run the Composer checks defined by `backend/composer.json` when their
dependencies are available:
```sh ```sh
composer lint:check
composer types:check composer types:check
composer test composer test
``` ```
@ -168,19 +162,11 @@ gate affected by the change.
### Frontend ### Frontend
- Run these commands from `frontend/website/`: - The frontend does not exist yet. Once scaffolded, use the scripts defined in
its `package.json` for formatting, linting, type checking, unit tests, and
```sh end-to-end tests.
npm run format - Update `ai/frontend-context.md` when the actual scaffold, package manager,
npm run lint and commands are known.
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

View file

@ -0,0 +1,46 @@
<?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(),
],
];
}
}

View file

@ -3,8 +3,10 @@
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;
@ -23,7 +25,8 @@ use Illuminate\Support\Carbon;
#[Hidden(['password', 'remember_token'])] #[Hidden(['password', 'remember_token'])]
class User extends Authenticatable class User extends Authenticatable
{ {
use Notifiable; /** @use HasFactory<UserFactory> */
use HasFactory, Notifiable;
/** /**
* Get the attributes that should be cast. * Get the attributes that should be cast.

View file

@ -1,5 +1,6 @@
<?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;
@ -14,6 +15,7 @@ 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,
]); ]);
}) })

View file

@ -10,6 +10,7 @@
"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"
}, },
@ -46,6 +47,12 @@
"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",
@ -54,10 +61,11 @@
"@test" "@test"
], ],
"types:check": [ "types:check": [
"phpstan analyse --memory-limit=1G" "phpstan analyse"
], ],
"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
View file

@ -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": "29bf8331467e53b3167e4f694dc9618d", "content-hash": "29d1e2d51fd6a59e22604be86a53d7bf",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -1057,6 +1057,78 @@
], ],
"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",

View file

@ -0,0 +1,70 @@
<?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,
],
];

View file

@ -2,14 +2,24 @@
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',
]);
} }
} }

View file

@ -1 +1,5 @@
<?php <?php
use Illuminate\Support\Facades\Route;
Route::inertia('/', 'Welcome')->name('home');

View file

@ -2,14 +2,17 @@
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
{ {
public function test_root_does_not_serve_a_frontend(): void use RefreshDatabase;
{
$response = $this->get('/');
$response->assertNotFound(); public function test_returns_a_successful_response()
{
$response = $this->get(route('home'));
$response->assertOk();
} }
} }

View file

@ -37,6 +37,7 @@
nodejs nodejs
nixfmt nixfmt
nixfmt-tree nixfmt-tree
cypress
yaml-language-server yaml-language-server
typescript typescript
postgresql postgresql

View file

@ -1,8 +0,0 @@
[*.{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

View file

@ -1 +0,0 @@
* text=auto eol=lf

View file

@ -1,39 +0,0 @@
# 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

View file

@ -1,5 +0,0 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"semi": false,
"singleQuote": true
}

View file

@ -1,10 +0,0 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["eslint", "typescript", "unicorn", "oxc", "vue"],
"env": {
"browser": true
},
"categories": {
"correctness": "error"
}
}

View file

@ -1,8 +0,0 @@
{
"recommendations": [
"Vue.volar",
"dbaeumer.vscode-eslint",
"EditorConfig.EditorConfig",
"oxc.oxc-vscode"
]
}

View file

@ -1,48 +0,0 @@
# 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
```

View file

@ -1 +0,0 @@
/// <reference types="vite/client" />

View file

@ -1,26 +0,0 @@
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,
)

View file

@ -1,13 +0,0 @@
<!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>

File diff suppressed because it is too large Load diff

View file

@ -1,50 +0,0 @@
{
"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
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -1,11 +0,0 @@
<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>

View file

@ -1,12 +0,0 @@
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')

View file

@ -1,8 +0,0 @@
import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [],
})
export default router

View file

@ -1,12 +0,0 @@
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 }
})

View file

@ -1,18 +0,0 @@
{
"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"
}
}

View file

@ -1,11 +0,0 @@
{
"files": [],
"references": [
{
"path": "./tsconfig.node.json"
},
{
"path": "./tsconfig.app.json"
}
]
}

View file

@ -1,27 +0,0 @@
// 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"
}
}

View file

@ -1,20 +0,0 @@
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)),
},
},
})