{"id":18868893,"url":"https://github.com/ndlano/ndla-frontend","last_synced_at":"2025-04-14T15:09:20.809Z","repository":{"id":38325612,"uuid":"66640952","full_name":"NDLANO/ndla-frontend","owner":"NDLANO","description":"NDLA Frontend application at https://ndla.no.","archived":false,"fork":false,"pushed_at":"2024-10-29T11:26:51.000Z","size":40636,"stargazers_count":21,"open_issues_count":21,"forks_count":7,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T11:57:09.939Z","etag":null,"topics":["babel","education","express","graphql","javascript","ndla","react","server-side-rendering"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NDLANO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-26T10:57:45.000Z","updated_at":"2024-10-29T11:26:53.000Z","dependencies_parsed_at":"2023-12-20T11:54:47.718Z","dependency_job_id":"23e78d73-812b-46a9-a97b-ded22ef27307","html_url":"https://github.com/NDLANO/ndla-frontend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDLANO%2Fndla-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDLANO%2Fndla-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDLANO%2Fndla-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NDLANO%2Fndla-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NDLANO","download_url":"https://codeload.github.com/NDLANO/ndla-frontend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223634062,"owners_count":17176881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel","education","express","graphql","javascript","ndla","react","server-side-rendering"],"created_at":"2024-11-08T05:15:09.709Z","updated_at":"2024-11-08T05:15:10.349Z","avatar_url":"https://github.com/NDLANO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NDLA front-end\n\n![CI](https://github.com/NDLANO/ndla-frontend/workflows/CI/badge.svg)\n\nThe front-end code powering [https://ndla.no](https://ndla.no).\n\nNorwegian Digital Learning Arena (NDLA) (Norwegian: Nasjonal digital læringsarena) is a joint county enterprise offering [open digital learning assets](https://en.wikipedia.org/wiki/Digital_learning_assets) for upper secondary education. In addition to being a compilation of [open educational resources (OER)](https://en.wikipedia.org/wiki/Open_educational_resources), NDLA provides a range of other online tools for sharing and cooperation.\n\n## Requirements\n\n- Node.JS 20.13\n- yarn v4\n- Docker (optional)\n\n## Getting started\n\nWhat's in the box?\n\n- React\n- GraphQL\n- Express\n- Vite + Babel (ES6)\n\n### Dependencies\n\nAll dependencies are defined in `package.json` and are managed with yarn. To\ninitially install all dependencies and when the list dependency has changed,\nrun `yarn`.\n\n```yarn\nyarn\n```\n\n### Start development server\n\nStart node server with hot reloading middleware listening on port 3000.\n\n```yarn\nyarn start\n```\n\nTo use a different api set the `NDLA_ENVIRONMENT` environment variable.\n\n### Unit tests\n\nTest framework: [Vitest](https://github.com/vitest-dev/vitest/)\n\n```yarn\nyarn test\n```\n\n### e2e tests\n\n[Playwright](https://playwright.dev/) is used for end to end testing.\n\nTo install browsers used in testing run `yarn playwright install` before any of the below commands.\n\n```yarn\nyarn e2e\n```\n\nTo circumvent api call flakiness all request are mocked when the tests are run on ci. Use the following command to record new mocks when api-calls change:\n\n```yarn\nyarn e2e:record\n```\n\nPlaywright tests can also be run in headless mode with mocked API calls.\n\n```yarn\nyarn e2e:headless\n```\n\n### Code style\n\n[Prettier](https://prettier.io/) is used for automatic code formatting.\n\n```yarn\nyarn format\n```\n\n```yarn\nyarn format-check\n```\n\n### Linting\n\nEslint is used for linting.\n\n```yarn\nyarn lint-es\n```\n\nRules are configured in `./eslintrc` and extends [esling-config-ndla](https://github.com/NDLANO/frontend-packages/tree/master/packages/eslint-config-ndla).\n\n#### Gql template linting\n\nThe [eslint-plugin-graphql](https://github.com/apollographql/eslint-plugin-graphql) is used to check the queries against the GraphQL schema.\n\nMake sure you have an running instance of the GraphQL enpoint with your latest changes\n\n```yarn\nyarn generate-gql:server\n```\n\n### TypeScript\n\n[GraphQL code generator](https://www.graphql-code-generator.com/) is used to generate TypeScript types from the local GraphQL schema and queries.\n\n```yarn\nyarn generate-gql:local\n```\n\nThe configuration is found in `codegen.yml`.\n\n## Other scripts\n\n```yarn\n# GTG? Checks code formating, linting and runs unit tests:\nyarn check-all\n```\n\n```yarn\n# Create minified production ready build:\nyarn build\n```\n\n```yarn\n# Start a production build:\nyarn start-prod\n```\n\n```yarn\n# Start a development server with server side rendering disabled:\nyarn start-without-ssr\n```\n\n```yarn\n# Start a development sever which talks to a local graphql server running on [localhost:4000]:\nyarn start-with-local-graphql\n```\n\n```yarn\n# Do you TDD?\nyarn tdd\n```\n\n```bash\n# Docker stuff\n./build.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndlano%2Fndla-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fndlano%2Fndla-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fndlano%2Fndla-frontend/lists"}