{"id":23384854,"url":"https://github.com/sap-archive/btp-full-stack-typescript-app","last_synced_at":"2025-04-11T02:40:27.021Z","repository":{"id":65674305,"uuid":"436311077","full_name":"SAP-archive/btp-full-stack-typescript-app","owner":"SAP-archive","description":"A sample project to demonstrate how to implement a full-stack app with SAP Cloud Application Programming Model, plus SAPUI5 and TypeScript.","archived":false,"fork":false,"pushed_at":"2024-02-26T19:32:13.000Z","size":501,"stargazers_count":73,"open_issues_count":4,"forks_count":26,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-25T00:14:43.193Z","etag":null,"topics":["cloud-foundry","full-stack","sample","sap-btp","sap-btp-cloud-foundry","sap-cap","sap-hana","sapui5","typescript"],"latest_commit_sha":null,"homepage":"https://blogs.sap.com/2021/12/09/full-stack-typescript-app-for-cloud-foundry-sample-repository/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-archive.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}},"created_at":"2021-12-08T16:12:02.000Z","updated_at":"2024-11-05T11:57:51.000Z","dependencies_parsed_at":"2024-04-11T16:43:07.083Z","dependency_job_id":null,"html_url":"https://github.com/SAP-archive/btp-full-stack-typescript-app","commit_stats":null,"previous_names":["sap-archive/btp-full-stack-typescript-app","sap-samples/btp-full-stack-typescript-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fbtp-full-stack-typescript-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fbtp-full-stack-typescript-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fbtp-full-stack-typescript-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-archive%2Fbtp-full-stack-typescript-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-archive","download_url":"https://codeload.github.com/SAP-archive/btp-full-stack-typescript-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248330922,"owners_count":21085800,"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":["cloud-foundry","full-stack","sample","sap-btp","sap-btp-cloud-foundry","sap-cap","sap-hana","sapui5","typescript"],"created_at":"2024-12-21T23:30:16.612Z","updated_at":"2025-04-11T02:40:26.995Z","avatar_url":"https://github.com/SAP-archive.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Open in Visual Studio Code][vscode-image]][vscode-url]\n[![License Status][license-image]][license-url]\n[![REUSE status][reuse-image]][reuse-url]\n\n![](https://img.shields.io/badge/STATUS-NOT%20CURRENTLY%20MAINTAINED-red.svg?longCache=true\u0026style=flat)\n\n# Important Notice\nThis public repository is read-only and no longer maintained. For the latest sample code repositories, visit the [SAP Samples](https://github.com/SAP-samples) organization.\n\n# Full Stack TypeScript App\n\nThis sample project is a full stack application for the SAP BTP, Cloud Foundry environment that utilizes the SAP Cloud Application Programming Model (CAP) for Node.js and SAPUI5 with TypeScript.\n\n[TypeScript](https://www.typescriptlang.org/) is a superset of JavaScript, which can essentially be described as JavaScript with syntax for types. The additionally added syntax allows a better editor integration and aims to catch errors early in development.\n\nThis project shows a full stack app entirely build with TypeScript. It is based on a basic lecture schedule scenario. The backend service features a simple data model (Rooms, Professors, Courses, Lectures) and provides data to populate a lecture schedule, which is displayed as a planning calendar on the frontend. Users can either view or manage the lecture schedule depending on the roles that are assigned to them.\n\n![diagram](diagram.png)\n\n**UI5 TypeScript Frontend**: A freestyle SAPUI5 app serves as the frontend for the project. Component, Controller, and Formatter are implemented using the perks of TypeScript. If you want to learn more about TypeScript with UI5, have a look at the following resources:\n\n-   [Getting Started with TypeScript for UI5 Application Development](https://blogs.sap.com/2021/07/01/getting-started-with-typescript-for-ui5-application-development/)\n-   [Central entry point for everything TypeScript-related in SAPUI5/OpenUI5](https://sap.github.io/ui5-typescript/)\n-   [UI5 TypeScript Hello World App](https://github.com/SAP-samples/ui5-typescript-helloworld)\n\n**CAP TypeScript Backend**: The backend service is implemented with CAP Node.js. TypeScript is used to write the service handler for the lecture service. A tsconfig.json file is used to define TypeScript compiler options and configuration. You can find more on using TypeScript with CAP here:\n\n-   [CAP Node.js SDK - Using TypeScript](https://cap.cloud.sap/docs/node.js/typescript)\n-   [Hello World! TypeScript sample](https://github.com/SAP-samples/cloud-cap-samples/tree/main/hello)\n\nFor a more detailed description of the sample app and takeaways when using TypeScript, please take a look at the accompanying **blog post**: [Full Stack TypeScript App for Cloud Foundry - Sample Repository](https://blogs.sap.com/2021/12/09/full-stack-typescript-app-for-cloud-foundry-sample-repository)\n\n## Requirements\n\n-   [Node.js](https://nodejs.org/en/download/) LTS Version 14\n-   [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/) for dependency management\n-   install [@sap/cds-dk](https://www.npmjs.com/package/@sap/cds-dk) globally\n-   install [@ui5/cli](https://www.npmjs.com/package/@ui5/cli) globally\n\n## Download and Installation\n\n1. Clone the project:\n\n```sh\ngit clone https://github.com/SAP-samples/btp-full-stack-typescript-app.git\ncd btp-full-stack-typescript-app\n```\n\n(or download from https://github.com/SAP-samples/btp-full-stack-typescript-app/archive/main.zip)\n\n2. In the btp-full-stack-typescript-app folder, use npm (or yarn) to install the dependencies:\n\n```sh\nnpm install\n```\n\n3. In the app/lectures sub-folder, use npm (or yarn) to install the dependencies:\n\n```sh\ncd app/lectures\nnpm install\n```\n\n## Run, Build and Deploy the App\n\n\u003e `npm run start` is for production purposes and **not intended to be used on your local machine**. Since TypeScript code itself cannot be executed, a transpile step to JavaScript is needed before running the project. Choose one of the following options instead to run the app.\n\n### Run the App locally\n\n```sh\nnpm run start-service:ts\n```\n\nThe service is now available at http://localhost:4004.\n\n```sh\nnpm run start-ui:ts\n```\n\nThe UI5 app is now running on http://localhost:8080/index.html (a browser window with this URL opens automatically).\n\nFor local development with **mock authentication** use one of the following **users** to test the app:\n| ID | password |\n| ----------- | ----------- |\n| _admin_ | _initial_ |\n| _viewer_ | _initial_ |\n\n### Run the App locally in watch mode\n\n```sh\nnpm run watch\n```\n\nThis starts a local development server in watch mode. Changes to files (including the uncompiled TypeScript resources) are automatically detected and applied. The CAP service is now available at http://localhost:4004 (a browser window with this URL opens automatically to show the generic index.html page), and the UI5 app can be accessed at http://localhost:4004/webapp/index.html.\n\nFor local development with **mock authentication** use one of the following **users** to test the app:\n| ID | password |\n| ----------- | ----------- |\n| _admin_ | _initial_ |\n| _viewer_ | _initial_ |\n\n### Build the MTA and Deploy to Cloud Foundry\n\n\u003e Additional preparation steps and tools are required to deploy the application to SAP BTP, Cloud Foundry environment. For more information and guidance on the initial setup, please have a look at these tutorials and resources:\n\u003e\n\u003e -   [Create a trial account on SAP BTP](https://developers.sap.com/tutorials/hcp-create-trial-account.html)\n\u003e -   [Create SAP HANA Cloud Service instance](https://developers.sap.com/tutorials/btp-app-hana-cloud-setup.html#08480ec0-ac70-4d47-a759-dc5cb0eb1d58)\n\u003e -   [Install Cloud Foundry CLI](https://developers.sap.com/tutorials/cp-cf-download-cli.html)\n\u003e -   [Install MultiApps CF CLI Plugin](https://github.com/cloudfoundry-incubator/multiapps-cli-plugin)\n\u003e -   [Install Cloud MTA Build Tool](https://sap.github.io/cloud-mta-build-tool/download/)\n\n```sh\nmbt build -t ./\n```\n\n```sh\ncf login\ncf deploy lecture-schedule_1.0.0.mtar\n```\n\n## Limitations\n\n-   The local database uses in-memory mode. Data will be re-initialized after each restart.\n-   The provided sample data only covers a specific timeframe (CW47/2021 to CW05/2022)\n-   The user role check for UI adjustments is based on the standalone approuter and BTP roles. Therefore it is not available when running the app locally.\n\n## Known Issues\n\nNone at the moment.\n\n## How to obtain Support\n\nThis content is provided \"as-is\" with no other support.\n\n## License\n\nCopyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.\n\n[license-image]: https://img.shields.io/github/license/SAP-samples/btp-full-stack-typescript-app.svg\n[license-url]: https://github.com/SAP-samples/btp-full-stack-typescript-app/blob/main/LICENSE\n[reuse-image]: https://api.reuse.software/badge/github.com/SAP-samples/btp-full-stack-typescript-app\n[reuse-url]: https://api.reuse.software/info/github.com/SAP-samples/btp-full-stack-typescript-app\n[vscode-image]: https://open.vscode.dev/badges/open-in-vscode.svg\n[vscode-url]: https://open.vscode.dev/SAP-samples/btp-full-stack-typescript-app/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-archive%2Fbtp-full-stack-typescript-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-archive%2Fbtp-full-stack-typescript-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-archive%2Fbtp-full-stack-typescript-app/lists"}