Frontend
The UI is Vue 3, TypeScript and Tailwind v4 on top of Nuxt UI. The write frontend code skill holds the project rules. The shared Vue and TypeScript skills cover the general ones. Each folder under resources/js/components and resources/js/pages has a README.md with its own rules. Read it before you add a file there.
Where code goes
components/baseholds thinApp*wrappers over Nuxt UI. Only this folder imports@nuxt/ui.components/commonholds reusable components with no domain knowledge.components/domainholds feature components, grouped by feature.components/layoutholds panels and navigation.pagesholds route views that only compose components.composablesandstoreshold reactive logic and Pinia state. API calls and business logic go there or in domain components. They never go in pages or base components.
Rules
- Use
<script setup lang="ts">, then the template, then styles if needed. - Type everything. Do not use
anyor non-null assertions to quiet the compiler. Useimport typefor types and@/for imports. - Backend types come from
@/interfaces/generated. Never edit that folder. Runphp bin/intellisenseafter a backend change. - Keep state minimal. Derive values with
computed. Split a component that does more than one thing. - Use
gapfor spacing between siblings, not margins. - Style with the semantic and token utilities. See the design system.
- Support dark mode. Use icons by full literal name such as
i-hugeicons-cancel-01. - Add
data-testidto elements that tests need. - Let
npm run style:fixformat the code.
Tests
- Vitest specs live in
resources/js/testsand mirror the source path. Start fromresources/js/tests/_templates/component.test.template.ts. - Test behavior. Select by
data-testidor role, never by class name. Mock API calls and stores. - A flow that crosses pages gets a Playwright spec in
tests/E2E/tests.