From ff95e2d2eeac410c8f5e60362d3ba458f68ebfb6 Mon Sep 17 00:00:00 2001 From: Yisroel Baum Date: Thu, 30 Jul 2026 23:15:16 +0300 Subject: [PATCH] document standalone vue workflow Update the AI guidance for the scaffolded npm application, its actual validation scripts, and its independent runtime boundary. Record the current lack of frontend test tooling without inventing commands. --- ai/backend-context.md | 9 ++- ai/frontend-context.md | 144 +++++++++++++++++++++++++---------------- ai/shared.md | 34 +++++++--- 3 files changed, 118 insertions(+), 69 deletions(-) diff --git a/ai/backend-context.md b/ai/backend-context.md index 740118b..3d5dea4 100644 --- a/ai/backend-context.md +++ b/ai/backend-context.md @@ -4,7 +4,7 @@ Read `ai/shared.md` first. This file covers backend-specific rules. ## Project context -**Stack:** PHP 8.4, Laravel 13, Inertia Laravel, PHPUnit, Larastan, Composer. +**Stack:** PHP 8.4, Laravel 13, PHPUnit, Larastan, Composer. **Location:** `backend/`. @@ -26,8 +26,11 @@ pattern. duplicating query fragments. - Avoid speculative interfaces and abstractions with only one trivial implementation. -- Routes currently use Inertia, but the Vue client has not been scaffolded. - Do not add placeholder frontend assets as part of unrelated backend work. +- The Vue application is a separate project under `frontend/website/`. +- 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 diff --git a/ai/frontend-context.md b/ai/frontend-context.md index 7d9dba7..b8a3097 100644 --- a/ai/frontend-context.md +++ b/ai/frontend-context.md @@ -2,53 +2,94 @@ 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 -installed and an Inertia route, but there is no `package.json`, Vue source -tree, Vite configuration, or frontend test setup. +**Stack:** Vue 3.5, TypeScript 6, Vite 8, Vue Router 5, Pinia 4, npm. -- Do not create the frontend unless the user explicitly asks. -- Do not invent a frontend directory, package manager, dependency version, or - command before the scaffold establishes it. -- When the frontend is created, update this file with its actual paths, - package versions, scripts, and testing tools. +**Location:** `frontend/website/`. + +The frontend is a standalone application. Keep its source, dependencies, +development server, and production build independent from the backend unless +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 test setup yet. Do not +invent an architecture for them 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 -Apply these rules once a Vue 3 frontend exists: - - Use the Composition API and `