{"id":28298672,"url":"https://github.com/ubleipzig/dacap","last_synced_at":"2026-07-04T22:31:19.392Z","repository":{"id":71117243,"uuid":"109963530","full_name":"ubleipzig/dacap","owner":"ubleipzig","description":"Dynamic And Caching API-Proxy","archived":false,"fork":false,"pushed_at":"2018-08-15T08:21:20.000Z","size":1457,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-18T06:35:38.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubleipzig.png","metadata":{"files":{"readme":"Readme.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2017-11-08T10:50:37.000Z","updated_at":"2022-12-06T08:58:18.000Z","dependencies_parsed_at":"2023-06-02T20:00:18.203Z","dependency_job_id":null,"html_url":"https://github.com/ubleipzig/dacap","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/ubleipzig/dacap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fdacap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fdacap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fdacap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fdacap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubleipzig","download_url":"https://codeload.github.com/ubleipzig/dacap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubleipzig%2Fdacap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35138074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"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":[],"created_at":"2025-05-23T06:14:29.910Z","updated_at":"2026-07-04T22:31:19.381Z","avatar_url":"https://github.com/ubleipzig.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dacap\n\n[![pipeline status](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/badges/master/pipeline.svg)](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/commits/master)\n[![coverage report](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/badges/master/coverage.svg)](https://git.sc.uni-leipzig.de/ubl/bdd_dev/dacap/commits/master)\n\nThe service *Dynamic And Compressing Api Proxy* can be used to handle as proxy for self-defined API-Endpoints. All cached responses will be kept in memory. Please calculate to provide enough memory therefor.\n\nUse of service can be worth if you deal with slow api-endpoints in production environment.\n\n## Requirements\n\n* node \u003e= v8.2.1\n* npm \u003e= v5.3.0\n\n## local Execution\n\n### Installation\n\n```bash\n$# npm install -g @ubleipzig/dacap\n```\n### Execution\n\n``` bash\n$# dacap\n```\n\n## as Container\n\n```bash\n$# docker run -p 3000:3000 -v /my/hosts/data/folder:/data ubleipzig/dacap\n```\n\nYou can customize multiple values, see [Advanced Configuration]\n\n## Usage\n\nAfter starting the Admin-Interface the application is available at `http://localhost:3000/admin/`.\n\nFirst of all a *Cache* has to be defined where all requests of an API-Endpoint are stored. This is done at the Admin-Interface.\n\nFill in the *url* of the *API-Endpoint* (e.g. `http://foo.example.com/`) and a *Cache-Name* (e.g. `foo`).\n\nAll API-Requests which will usually go to:\n\n`http://foo.example.com/?query=foo\u0026offset=0\u0026limit=10`\n\nyou can call by:\n\n`http://localhost:3000/ep/foo/?query=foo\u0026offset=0\u0026limit=10`\n\n* *Be sure to append the slash after the Cache-Name, otherwise the Endpoint cannot be resolved.*\n* *Everything after the Cache-Name and Slash will be passed to the API-Endpoint.*\n\n## Advanced Configuration\n\nThe service can be configured by environment variables. Following options are available:\n\n* `data_dir`: Specifies the folder where the cache is stored in intervals. This is only used to make it more easy to restart the service without adding all Endpoints again. After restart the service reads the saved cache-file and keeps it in memory. By default this points to the `data`-folder where the process was invoked. Make sure it can be created if not existing and written if already existing.\n* `proxy_path`: Specifies a path where endpoints will be accessable after registering. By default this is `ep/`. **Because it is relative to the `proxy_url` you must not start with a slash.**\n* `proxy_port`: Specifies a port number where the service is listening. Defaults to `3000`.\n* `proxy_url`: Specifies an absolute url of the service with protocol and port if it differs from defaults (e.g. `https://api.example.com:8443/dacap/`). Defaults to `http://localhost:${proxy_port}/`. **Remember to always add a trailing slash.**\n* `cache_ttl`: Specifies a time-to-live in seconds of a cached request. After this the cache will be refreshed. Defaults to `600`\n* `default_check_period`: Specifies the interval in seconds the cache is checked for expiry. Defaults to `60`\n* `array_value_size`: Unknown configuration. Defaults to `40`\n* `object_value_size`: Unknown configuration. Defaults to `80`\n* `autosave_interval`: Specifies the interval the cache is stored to disk. Defaults to `60`.\n* `register_name`: Specifies the name of register where the cache is stored. Defaults to `api-cache`.\n* `strip_path`: Specifies if the path should be stripped processing requests. Defaults to `true`.\n* `user`: Specifies an user for simple basic authentication. Defaults to `undefined`.\n* `password`: Specifies a password for simple basic authentication. Defaults to `undefined`.\n\n**Only if both `user` and `password` are specified basic-auth is enabled**\n\n## Documentation\n\nDocs was created with [mkdocs] and published to [Github Pages]\n\n## CI / CD\n\nThe CI/CD process is accomplished by gitlab at https://git.sc.uni-leipzig.de/. To build, test, publish and deploy the application the following stages are performed:\n\n### prepare\n\nthis stage prepares the application by installing all dependencies and building all js-files from typescript.\n\n#### npm_install\nThis job is performed on an official node-image, by time of writing [node:10-alpine]. This job is done on all git references.\n\n### test\n\n#### npm_ci\nThis job performes all automated tests that exist for the application. This job is performed on an official node-image, by time of writing [node]:10-alpine. This job is done on all git references.\n\n### bundle_npm\n\nThis stage build the npm-package which is going to be published later.\n\n#### npm_pack\n\nThis job performes the packaging of the npm-package and provides an `artifact.zip` containing the package as `tgz`-file.\nThis job is performed on an official node-image, by time of writing [node]:10-alpine. This job is done on all git references.\n\n### build_image\n\nThis stage builds the docker image.\n\n#### build_image\n\nThis job builds the Image and is providing an `artifact.zip` containing the saved image as file `image.tar.gz`. This job is performed with the official docker-image [docker]:latest and a service-image [docker]:dind.\n\nThis Job depends on *npm_pack* and the resulting artifact containing the npm-package.\n\n### publish\n\nThis stage takes care of all publishing jobs\n\n#### npm_publish\n\nThis job publishes the npm-package created by *npm_pack* and is therefore depending on it. This job is performed on an official node-image, by time of writing [node]:10-alpine.\n\nThis job is done only on tags named beginning with `release/`.\n\n#### docker_publish_production:\n\nThis job publishes the image created by *build_image* and tags the versions according to the released package version.\n\nThis job is performed with the official docker-image [docker]:latest and a service-image [docker]:dind.\n\nThis Job depends on *build_image* and the resulting artifact containing the docker-image.\n\nThis job is done only on tags named beginning with `release/`.\n\n#### docker_publish_alpha:\n\nThis job publishes the image created by *build_image* and tags it as *alpha-\u003cissue\u003e*, overwriting a possibly existing one.\n\nThis job is performed with the official docker-image [docker]:latest and a service-image [docker]:dind.\n\nThis Job depends on *build_image* and the resulting artifact containing the docker-image.\n\nThis Job is done only on branches named beginning with `\u003cissue\u003e-`.\n\n#### docker_publish_staging:\n\nThis job publishes the image created by *build_image* and tags it as *staging*,overwriting a possibly existing one.\n\nThis job is performed with the official docker-image [docker]:latest and a service-image [docker]:dind.\n\nThis Job depends on *build_image* and the resulting artifact containing the docker-image.\n\nThis Job is done only on master.\n\n### deploy\n\nThis stage takes care of all deploy-jobs\n\n#### deploy_alpha:\n\nThis job deploys the the published alpha-image created by *docker_publish_alpha* to the k8s-kluster into the namespace *dacap-alpha*\n\nThis job is performed with the helm docker-image [dtzar/helm-kubectl]:2.9.1.\n\nThis Job depends on *docker_publish_alpha*.\n\nThis Job is done only on banches named beginning with `\u003cissue\u003e-`.\n\n### docs\n\nThis stage takes care of publishing the documentation\n\n#### gh_pages\n\nThis job clones the repository and performs `mkdocs gh-deploy`, which creates the documentation and puts it into a special branch `gh-pages`. This branch is parsed by github.com and publishes the documentation under [Github Pages].\n\nThis job is performed with the docker-image [squidfunk/mkdocs-material]:2.7.2.\n\nThis job is done only on tags named beginning with `release/`.\n\n### mirror\n\nThis stage takes care of mirroring the repo to remote servers\n\n#### github_mirror\n\nThis job clones the repository and adds the remote `github`-repository. Then it performs a `git push --mirror github`.\n\nThis job is performed with the docker-image [alpine/git].\n\n[Advanced Configuration]: #advanced-configuration\n[mkdocs]: https://www.mkdocs.org/\n[Github Pages]: https://ubleipzig.github.io/dacap/\n\n[node]: https://hub.docker.com/_/node/\n[docker]: https://hub.docker.com/_/docker/\n[dtzar/helm-kubectl]: https://hub.docker.com/r/dtzar/helm-kubectl/\n[squidfunk/mkdocs-material]: https://hub.docker.com/r/squidfunk/mkdocs-material/\n[alpine/git]: https://hub.docker.com/r/alpine/git/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubleipzig%2Fdacap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubleipzig%2Fdacap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubleipzig%2Fdacap/lists"}