{"id":28624280,"url":"https://github.com/commercetools/commercetools-ts-sdk-developer-training","last_synced_at":"2025-10-06T18:59:05.962Z","repository":{"id":286613581,"uuid":"961911882","full_name":"commercetools/commercetools-ts-sdk-developer-training","owner":"commercetools","description":"This repo is used during commercetools TypeScript Developer Training","archived":false,"fork":false,"pushed_at":"2025-08-11T11:50:26.000Z","size":1398,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T13:08:02.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/commercetools.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-07T11:08:48.000Z","updated_at":"2025-08-11T11:43:31.000Z","dependencies_parsed_at":"2025-04-28T11:29:07.070Z","dependency_job_id":"8688c577-208f-4880-8c73-890932b0e47a","html_url":"https://github.com/commercetools/commercetools-ts-sdk-developer-training","commit_stats":null,"previous_names":["commercetools/commercetools-ts-sdk-developer-training"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/commercetools/commercetools-ts-sdk-developer-training","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-ts-sdk-developer-training","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-ts-sdk-developer-training/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-ts-sdk-developer-training/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-ts-sdk-developer-training/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/commercetools","download_url":"https://codeload.github.com/commercetools/commercetools-ts-sdk-developer-training/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/commercetools%2Fcommercetools-ts-sdk-developer-training/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278663357,"owners_count":26024389,"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-06T02:00:05.630Z","response_time":65,"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-06-12T07:11:42.711Z","updated_at":"2025-10-06T18:59:05.958Z","avatar_url":"https://github.com/commercetools.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# commercetools-ts-sdk-developer-training\n\nA training project demonstrating the commercetools TypeScript SDK in a fullstack setup using **NestJS** for the Backend-for-Frontend (BFF) and a lightweight frontend built with **HTML, CSS, and JavaScript**.\n\n**Important Note:**  \nWe are using **NestJS** for demonstration purposes in this project. It is not a recommendation or endorsement of NestJS over other server-side frameworks. Any other JavaScript-based server-side framework (such as Express, Koa, Hapi, etc.) can be used to build a similar Backend-for-Frontend (BFF) layer. The choice of framework is entirely up to your preferences and project requirements.\n\n## 🎯 Goals\n\n- Learn how to use the commercetools TypeScript SDK in a backend service.\n- Explore a simple UI that interacts with the BFF to trigger commercetools API calls.\n- Practice realistic e-commerce use cases like product listing, cart management, and checkout flow.\n\n## 🗂️ Project Structure\n\n- **Backend**: NestJS-based BFF layer.\n- **Frontend**: Lightweight UI using HTML, CSS, and JavaScript for interacting with the backend.\n- **commercetools SDK**: Demonstrates integrations with commercetools’ APIs.\n\n## Features\n\n- Provides a basic NestJS setup for interacting with commercetools APIs.\n- Includes a simple frontend for triggering e-commerce actions (e.g., product browsing, cart management, and checkout).\n- Full-stack application structure to demonstrate how to use the commercetools TypeScript SDK effectively.\n\n## Getting Started\n\n### Setup API Client in Merchant Center\n\nBefore running the project, you need to create an API client in the commercetools Merchant Center and provide its credentials in the `.env` file.\n\n1. Go to the [commercetools Merchant Center](https://mc.europe-west1.gcp.commercetools.com/).\n2. Create a new API client:\n   - Navigate to **Project settings** \u003e **API clients**.\n   - Click on **Create API Client** and select Admin client template from drop down list.\n   - Make a note of the **Project Key**, **Client ID**, **Client Secret** and **scopes**.\n\n### Installation\n\n```bash\n$ npm install\n```\n\n### Configure Environment Variables\n\nThe environment variables need to be set in the `.env` file. Copy the contents of the `.env.sample` file into a new `.env` file, then replace the placeholders with the values you got from your API client.\n\nExample `.env` file:\n\n```\nCTP_PROJECT_KEY=your_project_key\nCTP_CLIENT_SECRET=your_client_secret\nCTP_CLIENT_ID=your_client_id\nCTP_SCOPES=\n```\n\n### Running the Project\n\nFor development:\n\n```bash\n$ npm run start\n```\n\nFor watching file changes in development:\n\n```bash\n$ npm run start:dev\n```\n\nFor production mode:\n\n```bash\n$ npm run start:prod\n```\n\n### Running Tests\n\n```bash\n# Unit tests\n$ npm run test\n\n# End-to-end tests\n$ npm run test:e2e\n```\n\n### Frontend\n\nFor viewing the frontend, plese go to http://localhost:3000\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://github.com/nestjs/nest/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-ts-sdk-developer-training","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcommercetools%2Fcommercetools-ts-sdk-developer-training","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcommercetools%2Fcommercetools-ts-sdk-developer-training/lists"}