SKILL.md
Frontend Best Practices
Comprehensive frontend development guidelines for React, TypeScript, Vue, CSS, performance, accessibility, and component design. Contains rules prioritized by impact to guide code generation and review.
When to Apply
Reference these guidelines when:
- Writing new React or Vue components
- Implementing client-side data fetching or state management
- Reviewing frontend code for quality or accessibility issues
- Refactoring existing UI code
- Optimizing bundle size or rendering performance
- Enforcing coding standards across the team
Quick Reference
adra-network-layers-when-to-use- Layer package map; pair withnuxt-layer-vs-adra-module+nuxt-adra-extends-layer-orderadra-network-libraries-api-when-to-use- UI/library package map; HTTP/OpenAPI wiring →api-clients-workspace-packages+api-service-nuxt-layer-useapiadra-network-modules-when-to-use- Module capability map; list hygiene →nuxt-adra-modules-compositionadra-network-tooling-packages-when-to-use- Use shared ADRA helper/tooling packages in the correct runtime or dev scopeapi-clients-workspace-packages- Consume HTTP/OpenAPI viaapi-service,openapi-clients/*, and Nuxt layers—not per-app axios copiesapi-service-nuxt-layer-useapi- UseuseApi()in app code; layer inextendspernuxt-adra-extends-layer-order; packages →api-clients-workspace-packagesauthentication-module-useauth- UseuseAuth()from@adra-network/authentication-moduleand access computed refs correctlycommon-config-layer-nuxt-when-to-use- Baseline layer inextendsafter favicon; full chain →nuxt-adra-extends-layer-ordercss-classes-rem-framework-styling- Prefer CSS classes and Vuetify/Tailwind utilities over inline styles; useremnotpxfor type and spacingfeature-flag-usage-frontend- UseuseFlag()composable consistently across middleware, composables, templates, and menusnuxt-adra-extends-layer-order- Order ADRAextends: favicon → common-config → api-service-nuxt-layer → ui-layernuxt-adra-modules-composition- List each ADRA module once; auth before rbac; add i18n/feature-flag/help only when needednuxt-layer-vs-adra-module- Layers for shared nuxt.config presets; modules for runtime registration; plain deps for import-only libsnuxt-runtime-config-adra-namespace- Merge shared module options underruntimeConfig.public.adrawith a per-moduleconfigKeynuxt-ui-layer-usage- Vuetify, fonts, ADRA UI auto-imports viaui-layerinextends; do not duplicate stack; order →nuxt-adra-extends-layer-orderpnpm-workspace-catalog-dependencies- Useworkspace:for@adra-network/andcatalog:for shared third-party versionsrbac-module-usage- Use@adra-network/rbac-modulefor tenant-scoped route protection and UI gatingshared-packages-no-app-domain- Keeppackages/generic; no imports fromfrontends/or single-app routes and copy in shared libstesting-utilities-use-createpathhelper- Use@adra-network/testing-utilities(Nuxt module +createPathHelper) for CI-safe Playwright E2E paths and predictable auth state
How to Use
Read individual rule files for detailed explanations and code examples:
rules/feature-flag-usage-frontend.md
Each rule file contains:
- Brief explanation of why it matters
- Incorrect code example with explanation
- Correct code example with explanation
- Additional context and references