{"id":16163375,"url":"https://github.com/gregorwolf/mt-beershop","last_synced_at":"2025-04-07T18:28:03.018Z","repository":{"id":160675794,"uuid":"452058933","full_name":"gregorwolf/mt-beershop","owner":"gregorwolf","description":"SAP BTP Multitenancy Beershop","archived":false,"fork":false,"pushed_at":"2023-12-21T21:32:52.000Z","size":1171,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-13T20:18:52.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/gregorwolf.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-01-25T22:10:35.000Z","updated_at":"2024-12-30T10:32:14.000Z","dependencies_parsed_at":"2023-12-21T22:29:19.750Z","dependency_job_id":"5ee341e2-6c50-4023-88ef-3e0adf33888c","html_url":"https://github.com/gregorwolf/mt-beershop","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/gregorwolf%2Fmt-beershop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fmt-beershop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fmt-beershop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorwolf%2Fmt-beershop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorwolf","download_url":"https://codeload.github.com/gregorwolf/mt-beershop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247706463,"owners_count":20982607,"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":[],"created_at":"2024-10-10T02:35:24.663Z","updated_at":"2025-04-07T18:28:02.989Z","avatar_url":"https://github.com/gregorwolf.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAP Multitenancy Beershop\n\n## Prerequisites\n\nYou have a SAP BTP Cloud Foundry Subaccount with a running SAP HANA Cloud database.\n\n## Setup\n\n```\nnpm i\nnpm i -g mbt\nmbt build\ncf deploy mta_archives/mt-beershop_1.0.0.mtar\ncf csk mt-beershop-db-mt dev\ncf csk mt-beershop-uaa-mt dev\ncf csk mt-beershop-registry dev\ncf csk mt-beershop-destination dev\ncf csk mt-beershop-connectivity dev\ncf service-key mt-beershop-db-mt dev\ncf service-key mt-beershop-uaa-mt dev\ncf service-key mt-beershop-registry dev\ncf service-key mt-beershop-destination dev\ncf service-key mt-beershop-connectivity dev\n```\n\nCreate _default-env.json_ with this content and the corresponding credentials from the last 4 commands and also the content for VCAP_APPLICATION from the deployed srv app:\n\n```JSON\n{\n  \"VCAP_SERVICES\": {\n    \"service-manager\": [\n      {\n        \"label\": \"service-manager\",\n        \"name\": \"mt-beershop-db-mt\",\n        \"credentials\": {\n        },\n        \"syslog_drain_url\": null\n      }\n    ],\n    \"xsuaa\": [\n      {\n        \"label\": \"xsuaa\",\n        \"name\": \"mt-beershop-uaa-mt\",\n        \"tags\": [\"xsuaa\"],\n        \"credentials\": {\n        }\n      }\n    ],\n    \"saas-registry\": [\n      {\n        \"label\": \"saas-registry\",\n        \"name\": \"mt-beershop-registry\",\n        \"tags\": [\n          \"SaaS\"\n        ],\n        \"credentials\": {}\n      }\n    ],\n    \"destination\": [\n      {\n        \"label\": \"destination\",\n        \"name\": \"mt-beershop-destination\",\n        \"tags\": [\n          \"destination\",\n          \"conn\",\n          \"connsvc\"\n        ],\n        \"credentials\": {}\n      }\n    ],\n    \"connectivity\": [\n      {\n        \"label\": \"connectivity\",\n        \"name\": \"mt-beershop-connectivity\",\n        \"tags\": [\"connectivity\", \"conn\", \"connsvc\"],\n        \"credentials\": {}\n      }\n    ]\n  },\n  \"VCAP_APPLICATION\": {},\n  \"destinations\": [\n    {\n      \"name\": \"S4HANA\",\n      \"url\": \"https://sapes5.sapdevcenter.com\",\n      \"username\": \"\u003cYour ES5 Username\u003e\",\n      \"password\": \"\u003cYour ES5 Password\u003e\"\n    }\n  ]\n}\n```\n\n## Local test\n\nCreate a _.env_ file in the tests folder with this content:\n\n```\ntenant_id=anonymous\nlocalhost=http://localhost:4004\n```\n\nstart the CAP Backend using:\n\n```\nnpm run watch\n```\n\nThis script does include the `cds build` step as otherwise the deployment to the HDI container fails as the MTX module returns `no model found, skip build`.\n\nCreate a new subscription using the PUT request in _tests/01-subscribe.http_. Test the endpoints with _tests/beershop.http_. You can also open http://localhost:4004/ via a browser and test the Fiori preview of the Beers entity.\n\n## Update tenant schema\n\nIf you changed the database schema you can run _tests/02-update-tenant.http_ to deploy the new schema.\n\n## Delete HDI Container\n\nRun the delete in _tests/03-delete-tenant.http_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fmt-beershop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorwolf%2Fmt-beershop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorwolf%2Fmt-beershop/lists"}