{"id":23819861,"url":"https://github.com/kth/kursinfo-web","last_synced_at":"2025-10-09T10:35:03.794Z","repository":{"id":35797899,"uuid":"149733282","full_name":"KTH/kursinfo-web","owner":"KTH","description":"En app som sköter generering av kurssida i Kurs- och programkatalogen. Sidan innehåller introducerande beskrivning, allmän information om kurs, kursplan och information om kurstillfällen.","archived":false,"fork":false,"pushed_at":"2025-09-26T09:17:22.000Z","size":46085,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-09-26T11:25:52.389Z","etag":null,"topics":["kth"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KTH.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-21T08:25:11.000Z","updated_at":"2025-09-18T10:13:42.000Z","dependencies_parsed_at":"2023-11-24T10:47:25.267Z","dependency_job_id":"6d9fad70-0275-4b6d-8e28-79fd52f398bb","html_url":"https://github.com/KTH/kursinfo-web","commit_stats":null,"previous_names":[],"tags_count":2140,"template":false,"template_full_name":null,"purl":"pkg:github/KTH/kursinfo-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fkursinfo-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fkursinfo-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fkursinfo-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fkursinfo-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KTH","download_url":"https://codeload.github.com/KTH/kursinfo-web/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KTH%2Fkursinfo-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001268,"owners_count":26083040,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["kth"],"created_at":"2025-01-02T07:16:06.246Z","updated_at":"2025-10-09T10:35:03.765Z","avatar_url":"https://github.com/KTH.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Welcome to kursinfo-web 👋\n\n![Version](https://img.shields.io/badge/version-2.0.0-blue.svg?cacheSeconds=2592000)\n![Prerequisite](https://img.shields.io/badge/node-18-blue.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)\n\n## Introduction\n\nThe course information project (KIP) is an initiative at KTH that was launched in 2018 to improve the quality and availability of information about KTH:s courses. The background to the project is, among other things, that it was difficult for the student to find information about the courses and even more difficult to compare information about several courses. The reason for the problems is scattered course information in several places and that there is no uniformity or assigned places for the course information. The project takes measures to consolidate course information into two locations and to present the information in a manner that is uniform for KTH. The student should find the right information about the course, depending on their needs. The result of the project is a public course site where the correct course information is collected and presented uniformly. Also, a tool is developed for teachers to enter and publish course information. Eventually, this will lead to the student making better decisions based on their needs, and it will also reduce the burden on teachers and administration regarding questions and support for the student.\n\n### 🏠 [Homepage](https://github.com/KTH/kursinfo-web)\n\n## Overview\n\nKursinfo-web is a microservice with the public view of course information. It uses [React](https://reactjs.org//), [MobX](https://mobx.js.org/), and is based on [node-web](https://github.com/KTH/node-web).\n\n### API:s\n\nKursinfo-web fetches data from:\n\n- Course information API\n  - Dev (Stage): [api-r.referens.sys.kth.se/api/kursinfo](https://api-r.referens.sys.kth.se/api/kursinfo)\n  - Prod (Active): [api.kth.se/api/kursinfo](https://api.kth.se/api/kursinfo)\n- API to generate course syllabuses’ PDF:s\n  - Dev (Stage): [api-r.referens.sys.kth.se/api/kursplan](https://api-r.referens.sys.kth.se/api/kursplan)\n  - Prod (Active): [api.kth.se/api/kursplan](https://api.kth.se/api/kursplan)\n- Course memo API\n  - Dev (Stage): [api-r.referens.sys.kth.se/api/kurs-pm-data](https://api-r.referens.sys.kth.se/api/kurs-pm-data)\n  - Prod (Active): [api.kth.se/api/kurs-pm-data](https://api.kth.se/api/kurs-pm-data)\n- API för kurs- och programinformation\n  - Dev (Stage): [https://ladok-mellanlagring-lab.azure-api.net]\n  - Prod (Active): [https://ladok-mellanlagring.azure-api.net]\n- Ladok Mellanlager\n  - Dev (Stage): [https://ladok-mellanlagring-lab.azure-api.net]\n\n### Related projects\n\n- [kursinfo-admin-web](https://github.com/KTH/kursinfo-admin-web)\n- [kursinfo-api](https://github.com/KTH/kurs-pm-data-api)\n- [kursplan-api](https://github.com/KTH/kursplan-api)\n- [kurs-pm-data-api](https://github.com/KTH/kurs-pm-data-api)\n- [node-web](https://github.com/KTH/node-web)\n- [studadm-om-kursen-packages](https://github.com/KTH/studadm-om-kursen-packages)\n\n## Prerequisites\n\n- Node.js 18.0.0\n- Ansible Vault\n\n### Secrets for Development\n\nSecrets during local development are stored in a gitignored `.env` file (`env.in` can be used as template for your `.env` file). More details about environment variable setup and secrets can be found in [confluence](https://confluence.sys.kth.se/confluence/x/OYKBDQ).\n\n## For Development\n\n### Install\n\nFirst time you might need to use options `--ignore-scripts` because of npm resolutions:\n\n```sh\nnpm install --ignore-scripts\n```\n\nor\n\n```sh\nnpm install\n\n```\n\nYou might need to install as well:\n\n```sh\nnpm install cross-env\nnpm install concurrently\n```\n\n### Environment variables\nThe required environment variables to run this project for development are listed in the `.env.in` file. You can retrieve their corresponding values from the Azure portal and populate the environment variables accordingly. To fetch all the environment variables, use the following command:\n\n- Ensure you are logged in to Azure before running this command. You can log in by using the `az acr login` command. \n\n- For running this command you need to be logge in on Azure for this you can run `az acr login` command\n\n### Usage\n\nStart the service on [localhost:3000/student/kurser/kurs/:courseCode](http://localhost:3000/student/kurser/kurs/:courseCode).\n\n```sh\nnpm run start-dev\n```\n\n### Debug in Visual Studio Code\n\nIt's possible to use debugging options available in Visual Studio Code\nAdd to .vscode file launch.json:\n\n- _Microsoft_\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"name\": \"Debug kursinfo-web\",\n      \"program\": \"${workspaceFolder}\\\\app.js\",\n      \"envFile\": \"${workspaceFolder}\\\\.env\",\n      \"env\": {\n        \"NODE_ENV\": \"development\"\n      }\n    }\n  ]\n}\n```\n\n- _Mac, Unix and so on_\n\n```json\n{\n  \"version\": \"0.2.0\",\n  \"configurations\": [\n    {\n      \"type\": \"node\",\n      \"request\": \"launch\",\n      \"name\": \"Debug kursinfo-web\",\n      \"program\": \"${workspaceFolder}/app.js\",\n      \"envFile\": \"${workspaceFolder}/.env\",\n      \"env\": {\n        \"NODE_ENV\": \"development\"\n      }\n    }\n  ]\n}\n```\n\n## Run Locally Using Docker\n\nYou can run the project locally using Docker for an isolated and consistent environment. Follow these steps:\n\n#### Build Docker Image\n\nFirst, build the Docker image by running the following command:\n\nIf you are using mac change `docker build -f Dockerfile-dev -t \"$IMAGE_NAME\"` with `docker build --platform linux/arm64/v8 -f Dockerfile-dev -t \"$IMAGE_NAME\"`.\n\n\n```sh\nnpm run docker:build\n```\n\nThis will execute the `docker-build-image.sh` script in development mode `(dev)` this script will create Dockerfile-dev file which will be used for running the project locally using docker.\n\n#### Run Docker Container\n\nAfter the image has been built, you can start the Docker container using the following command:\n\n```sh\nnpm run docker:run\n```\n\nThis will execute the `docker-run-image.sh` script in development mode `(dev)`, running the application locally in Docker.\n\nThe application now will be accessible at http://localhost:3000/student/kurser/kurs/:courseCode.\n\n- To run this project locally, ensure all required environment variables are set. You can do this by running the command: `npm run fetch-all-env-variables`.\n\n#### Alternative approach for running locally using Docker\n\nalternatively you can run the following command:\n\n```sh\ndocker-compose up\n```\n\nHere you need to remove the .in at the end of the `docker-compose.yml.in`.\n\n\n- Run `az acr login --name kthregistry` before running the scripts.\n\n## Deploy\n\nThe deployment process is described in [Build, release, deploy](https://confluence.sys.kth.se/confluence/x/aY3_Ag). Technical details, such as configuration, is described in [How to deploy your 🐳 application using Cellus-Registy](https://gita.sys.kth.se/Infosys/cellus-registry/blob/master/HOW-TO-DEPLOY.md) and [🔧 How To Configure Your Application For The Pipeline](https://gita.sys.kth.se/Infosys/cellus-registry/blob/master/HOW-TO-CONFIGURE.md).\n\n## Author\n\n👤 **KTH**\n\n- Website: [kth.github.io/](https://kth.github.io/)\n- Github: [@KTH](https://github.com/KTH)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fkursinfo-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkth%2Fkursinfo-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth%2Fkursinfo-web/lists"}