About this project
Navikt/foreldrepengesoknad is a monorepo that gathers Nav's self-service solutions for foreldrepenger, svangerskapspenger and engangsstønad. The repo is divided into an apps folder with the individual self-service apps and a packages folder with modules that are shared by several of the apps. The code is publicly available, and Team Foreldrepenger states that they welcome pull requests and suggestions for improvement.
For local development, Node 26, pnpm and turborepo are required, in addition to a personal access token from GitHub with the read:packages scope that must also be authorized for navikt via SSO. The token is used in an .npmrc file to fetch dependencies from GitHub Packages. After pnpm install, pnpm setup and global installation of turbo, the entire repo can be built with turbo build and verified with turbo test.
The README describes three ways to work locally. In so-called Vite mode, you run pnpm run lokal:dev in an app and get a local Vite server, typically at localhost:5173 with the app's path. Then you log in to the dev ingress with a test user, find the app's wonderwall port in Docker and add /vite-on to the URL. This sets the cookie use-local-vite-server, which makes the deployed server send an index.html that loads JavaScript from the local development server instead of the prebuilt files. This allows you to use real dev data and the deployed backend while changing the frontend locally. Alternatively, you can run Storybook with pnpm run storybook, or use a local mock server by building the server package and then running dev:mock and dev:lokal.
Furthermore, TypeScript types can be autogenerated from the backend's OpenAPI specification with the script generate-api-types.sh, provided that the value chain is running in autotest. Dependencies can be upgraded across all workspaces with pnpm -r up --interactive --latest, and tests are run with pnpm vitest in the individual app.
Questions about the code or project can be directed to the team's email address, and Nav employees can use the Slack channel #teamforeldrepenger. Contributors who get changes merged in can, according to the README, be rewarded with Nav socks.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.