Repo rules
- This provisioning code is designed to run on Manjaro Linux.
This is a monorepo for NAV's K9 case handling system (k9-sak-web), containing React/TypeScript frontend applications for case processing. The project includes both the main K9 application and Ungdomsytelse (ung) application.
Loading actions...
Main instructions and any bundled files for this skill.
This is a monorepo for NAV's K9 case handling system (k9-sak-web), containing React/TypeScript frontend applications for case processing. The project includes both the main K9 application and Ungdomsytelse (ung) application.
yarn, NEVER npm)vi.spyOn for HTTP.yarn for all package operations, never npmMonorepo Structure: All packages live under packages/
V2 Modernization: packages/v2/ contains modernized code with stricter TypeScript rules
tsconfig.jsonPath Aliases:
@fpsak-frontend/* → ./packages/*/src@k9-sak-web/* → ./packages/*/srcloose-ts-check for gradual type checkingloosely-type-checked-files.json for files with relaxed checkingCRITICAL: These dependencies MUST have synchronized versions across all packages:
@navikt/aksel-icons@navikt/ds-css@navikt/ds-react@navikt/ds-tailwind@navikt/ft-plattform-komponenterreact-hook-formreact-router-domIf updating these, ensure all @navikt/ft-* packages are updated to compatible versions, or use resolutions in package.json.
yarn css:modules:typegen@navikt/ds-tailwind for spacing/layout.module.css extensionstylelint for CSS linting: yarn css:lintyarn test, watch mode with yarn test:watchpackages/storybook/README.mdeslint.config.mjs (flat config format)yarn lint:fix to auto-fix issuesyarn ts-check before committingpackages/v2/gui/shared/MyComponent.tsx, export MyComponent)use (e.g., useMyHook.ts exports useMyHook)myUtils.ts)myComponent.module.cssMyComponent.spec.tsx, myUtils.spec.ts)MyComponent.stories.tsx)Packages follow this pattern:
packages/[package-name]/
├── src/
├── index.ts (public API)
└── package.json
Package categories:
behandling-*: Treatment/case type packagesfakta-*: Facts/information gathering componentsprosess-*: Process step componentssak-*: Case-related functionalityutils, types, kodeverk, rest-api, etc.yarn dev (K9) or yarn dev:ung (Ungdomsytelse)yarn ts-checkyarn lint:fixyarn test or yarn test:watchyarn storybookyarn ltb (lint, type-check, build)yarn build (K9) or yarn build:ung (Ungdomsytelse)envDir/feature-toggles.json and ung.feature-toggles.json.env.development in envDir/ directoryyarn install # Install dependencies
yarn dev # Start K9 dev server
yarn dev:ung # Start Ungdomsytelse dev server
yarn build # Build K9 for production
yarn build:ung # Build Ungdomsytelse for production
yarn test # Run tests
yarn test:watch # Run tests in watch mode
yarn ts-check # Type check all code
yarn lint # Lint code
yarn lint:fix # Fix linting issues
yarn css:lint # Lint CSS
yarn css:modules:typegen # Generate CSS module types
yarn storybook # Start Storybook
yarn ltb # Full check (lint, type, build)
yarn knip # Find unused files/exports
npm instead of yarnvi.spyOn for HTTP in tests (If you feel the need to mock HTTP or use vi.spyOn, the test probably belongs in Storybook instead of Vitest)packages/v2/ (for new/refactored code)yarn ts-check to verify typesyarn lint:fix to fix style issuesyarn test to ensure tests passyarn lint- This provisioning code is designed to run on Manjaro Linux.
Project Summary:
Code Style and Structure