{"id":18724649,"url":"https://github.com/digital-blueprint/sublibrary-app","last_synced_at":"2025-11-11T16:30:17.925Z","repository":{"id":65580552,"uuid":"593983392","full_name":"digital-blueprint/sublibrary-app","owner":"digital-blueprint","description":"Library application","archived":false,"fork":false,"pushed_at":"2024-04-09T13:15:35.000Z","size":4010,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-10T05:50:11.934Z","etag":null,"topics":["alma","dbp","digital-blueprint","sublibrary"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@digital-blueprint/sublibrary-app","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-blueprint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-01-27T10:11:18.000Z","updated_at":"2024-04-15T06:59:54.075Z","dependencies_parsed_at":"2024-04-15T06:59:33.140Z","dependency_job_id":"fa4f9c12-df33-4e74-9ef3-104073f600bd","html_url":"https://github.com/digital-blueprint/sublibrary-app","commit_stats":{"total_commits":1144,"total_committers":12,"mean_commits":95.33333333333333,"dds":0.6048951048951049,"last_synced_commit":"b25b0a9350e40e910e1128e6edad6ea46ff45e1a"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fsublibrary-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fsublibrary-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fsublibrary-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fsublibrary-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-blueprint","download_url":"https://codeload.github.com/digital-blueprint/sublibrary-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239593064,"owners_count":19664855,"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":["alma","dbp","digital-blueprint","sublibrary"],"created_at":"2024-11-07T14:07:24.896Z","updated_at":"2025-11-11T16:30:17.864Z","avatar_url":"https://github.com/digital-blueprint.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sublibrary Application\n\n[GitHub Repository](https://github.com/digital-blueprint/sublibrary-app) |\n[npmjs package](https://www.npmjs.com/package/@digital-blueprint/sublibrary-app) |\n[Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/sublibrary-app/) |\n[Sublibrary Bundle](https://gitlab.tugraz.at/dbp/sublibrary/dbp-relay-sublibrary-bundle)\n\n[![Build and Test](https://github.com/digital-blueprint/sublibrary-app/actions/workflows/build-test-publish.yml/badge.svg)](https://github.com/digital-blueprint/sublibrary-app/actions/workflows/build-test-publish.yml)\n\n![overview](https://raw.githubusercontent.com/digital-blueprint/sublibrary-app/main/docs/overview.svg)\n\nWith the dbp sublibrary app you can assign call number, borrow books, return library books, extend loan periods, \nshow current loans, show current book orders and show the budgets.\n\n## Prerequisites\n\n- You need library officer permissions to be allowed to use the application\n- You need the [API server](https://gitlab.tugraz.at/dbp/relay/dbp-relay-server-template) running\n- You need the [Dbp Relay Sublibrary Bundle](https://github.com/digital-blueprint/relay-sublibrary-bundle) for the API server to talk to the Alma backend\n\n## Local development\n\n```bash\n# get the source\ngit clone git@github.com:digital-blueprint/sublibrary-app.git\ncd sublibrary-app\ngit submodule update --init\n\n# install dependencies\nnpm install\n\n# constantly build dist/bundle.js and run a local web-server on port 8001 \nnpm run watch-local\n\n# constantly build dist/bundle.js and run a local web-server on port 8001 using a custom assets directory assets_custom/\nnpm run watch-custom\n\n# run tests\nnpm test\n```\n\nJump to \u003chttp://localhost:8001\u003e, and you should get a Single Sign On login page.\n\nExample book barcodes: `+F58330104`, `+F58019101`, `+F53498803`\n\n\nBy default, the application is built using the assets in `assets/`. However, custom assets can also be used to build the application. The custom assets can be added to the directory `assets_custom/dbp-sublibrary/assets/`. This allows developers to easily develop and build the application for different environments.\n\n\n## Remote development\n\n\u003chttps://dbp-dev.tugraz.at/apps/library\u003e\n\nRun `npm run watch-dev` to build the `dist/bundle.js` constantly and upload the `dist` folder to the server.\n\n## Roll back a release\n\n```bash\nCOMPOSER_VENDOR_DIR=_temp composer require \"deployer/deployer\" \"deployer/recipes\"\n# Check if the config is pointing to the server you want\n./_temp/bin/dep config:hosts production\n# Do the rollback\n./_temp/bin/dep rollback production\n```\n\n## Demo system\n\n\u003chttps://dbp-demo.tugraz.at/apps/library\u003e\n\nBuild bundle for the demo environment\n\n```bash\nAPP_ENV=demo npm run build\n```\n\n## Using this app as pre-built package\n\n### Install app\n\nIf you want to install the dbp sublibrary app in a new folder `sublibrary-app` with a path prefix `/` you can call:\n\n```bash\nnpx @digital-blueprint/cli install-app sublibrary sublibrary-app /\n```\n\nAfterwards you can point your Apache web-server to `sublibrary-app/public`.\n\nMake sure you are allowing `.htaccess` files in your Apache configuration.\n\nAlso make sure to add all of your resources you are using (like your API and Keycloak servers) to the\n`Content-Security-Policy` in your `sublibrary-app/public/.htaccess`, so the browser allows access to those sites.\n\nYou can also use this app directly from the [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/sublibrary-app/)\nfor example like this: [dbp-sublibrary/index.html](https://github.com/digital-blueprint/sublibrary-app/-/tree/master/examples/dbp-sublibrary/index.html)\n\nNote that you will need a Keycloak server along with a client id for the domain you are running this html on.\n\n### Update app\n\nIf you want to update the dbp sublibrary app in the current folder you can call:\n\n```bash\nnpx @digital-blueprint/cli update-app library\n```\n\n## Activities\n\nThis app has the following activities:\n- `dbp-sublibrary-book-list`\n- `dbp-sublibrary-budget`\n- `dbp-sublibrary-create-loan`\n- `dbp-sublibrary-loan-list`\n- `dbp-sublibrary-order-list`\n- `dbp-sublibrary-renew-loan`\n- `dbp-sublibrary-return-book`\n- `dbp-sublibrary-shelving`\n\nYou can find the documentation of these activities in the [sublibrary activities documentation](https://github.com/digital-blueprint/sublibrary-app/-/tree/master/src).\n\n## Adapt app\n\n### Functionality\n\nYou can add multiple attributes to the `\u003cdbp-sublibrary\u003e` tag.\n\n| attribute name | value | Link to description |\n|----------------|-------| ------------|\n| `provider-root` | Boolean | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `lang`         | String | [language-select](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/language-select#attributes) | \n| `entry-point-url` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `keycloak-config` | Object | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `base-path` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `src` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `html-overrides` | String | [common](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common#overriding-slots-in-nested-web-components) |\n| `themes` | Array | [theme-switcher](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/theme-switcher#themes-attribute) |\n| `darkModeThemeOverride` | String | [theme-switcher](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/theme-switcher#themes-attribute) |\n\n#### Mandatory attributes\n\nIf you are not using the `provider-root` attribute to \"terminate\" all provider attributes\nyou need to manually add these attributes so that the topic will work properly:\n\n```html\n\u003cdbp-sublibrary\n        auth\n        requested-login-status\n        analytics-event\n\u003e\n\u003c/dbp-sublibrary\u003e\n```\n\n### Design\n\nFor frontend design customizations, such as logo, colors, font, favicon, and more, take a look at the [theming documentation](https://dbp-demo.tugraz.at/dev-guide/frontend/theming/).\n\n## \"dbp-sublibrary\" slots\n\nThese are common slots for the app-shell. You can find the documentation of these slots in the [app-shell documentation](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell).\nFor the app specific slots take a look at the [sublibrary activities](https://github.com/digital-blueprint/sublibrary-app/-/tree/master/src).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Fsublibrary-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-blueprint%2Fsublibrary-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Fsublibrary-app/lists"}