{"id":18656698,"url":"https://github.com/zendesk/talk_partner_sample_app","last_synced_at":"2025-04-11T18:31:11.729Z","repository":{"id":41790723,"uuid":"190399510","full_name":"zendesk/talk_partner_sample_app","owner":"zendesk","description":"A reference implementation to help app developers to use Talk Partner Edition APIs","archived":false,"fork":false,"pushed_at":"2025-04-08T11:27:14.000Z","size":1431,"stargazers_count":2,"open_issues_count":6,"forks_count":3,"subscribers_count":85,"default_branch":"master","last_synced_at":"2025-04-08T11:31:04.960Z","etag":null,"topics":["zendesk","zendesk-apps"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/zendesk.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}},"created_at":"2019-06-05T13:25:22.000Z","updated_at":"2020-09-27T14:32:04.000Z","dependencies_parsed_at":"2025-04-08T11:36:18.227Z","dependency_job_id":null,"html_url":"https://github.com/zendesk/talk_partner_sample_app","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Ftalk_partner_sample_app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Ftalk_partner_sample_app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Ftalk_partner_sample_app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zendesk%2Ftalk_partner_sample_app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zendesk","download_url":"https://codeload.github.com/zendesk/talk_partner_sample_app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458427,"owners_count":21107077,"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":["zendesk","zendesk-apps"],"created_at":"2024-11-07T07:24:50.407Z","updated_at":"2025-04-11T18:31:10.543Z","avatar_url":"https://github.com/zendesk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![repo-checks](https://github.com/zendesk/talk_partner_sample_app/workflows/repo-checks/badge.svg)\n*Use of this software is subject to important terms and conditions as set forth in the License file*\n\n# Talk Partner Sample App\n\n## Description\nThis repo contains a reference implementation to help developers build [apps for Zendesk products](https://developer.zendesk.com/apps/docs/apps-v2/getting_started) using [Talk Partner Edition APIs](https://developer.zendesk.com/rest_api/docs/voice-api/talk_partner_edition).\n\n## Getting Started\n\n### Dependencies\n- [Node.js](https://nodejs.org/en/) \u003e= 6.11.5\n- [Ruby](https://www.ruby-lang.org/) \u003e= 2.0.x\n\n### Setup\n1. Clone or fork this repo\n2. Change (`cd`) into the `talk_partner_sample_app` directory\n3. Run `yarn install`\n\nYou can use either `yarn` or `npm` as package manager and run the scripts with the corresponding commands.\n\nTo run your app locally in Zendesk, you need the latest [Zendesk Apps Tools (ZAT)](https://github.com/zendesk/zendesk_apps_tools).\n\n### Running locally\n\nTo serve the app to your Zendesk instance with `?zat=true`, run\n\n```\nyarn run watch\nzat server -p dist\n```\n\n## But why?\nThe App Scaffold includes many features to help you maintain and scale your app. Some of the features provided by the App Scaffold are listed below. However, you don't need prior experience in any of these to be able to use the scaffold successfully.\n\n- [ES6 (ES2015)](https://babeljs.io/docs/learn-es2015/)\n\nECMAScript 6, also known as ECMAScript 2015, is the latest version of the ECMAScript standard. The App Scaffold includes the [Babel compiler](https://babeljs.io/) to transpile your code to ES5. This allows you to use ES6 features, such as classes, arrow functions and template strings even in browsers that haven't fully implemented these features.\n\n- [Zendesk Garden](https://garden.zendesk.com/css-components/) UI components\n\nCollection of user interface components for Zendesk products. You’ll find components built to respond to a range of user input devices, tuned to handle right-to-left layouts, and finessed with just the right touch of subtle animation.\n\n- [Webpack 4](https://webpack.github.io/) module bundler\n\nWebpack is a module bundler, we use it to bundle up Javascript modules for use as web applications, also to perform tasks like transforming and transpiling, etc.\n\n- [PostCSS](https://postcss.org//) stylesheets\n\nPostCSS transforms stylesheets with JS plugins. These plugins can lint your CSS, support variables and mixins, transpile future CSS syntax, inline images, and more.\n\n- [StandardJS](https://standardjs.com/) JS linting\n\nStandardJS is a Javascript style guide, it helps catching style issues or code errors, and automatically formats code for you.\n\n- [Jest](https://jestjs.io/) Javascript testing framework\n\nJest is bundled with JSDom and built on top of Jasmine. It's more than just a ReactJS testing framework. In the Zendesk Apps team, we use it for unit and integration testing of the Official Apps. It also includes a good test coverage toolset out of the box.\n\n## Folder structure\n\nThe folder and file structure of the App Scaffold is as follows:\n\n| Name                                    | Description                                                                                  |\n|:----------------------------------------|:---------------------------------------------------------------------------------------------|\n| [`.github/`](#.github)                  | The folder to store PULL_REQUEST_TEMPLATE.md, ISSUE_TEMPLATE.md and CONTRIBUTING.md, etc     |\n| [`dist/`](#dist)                        | The folder in which webpack packages the built version of your app                           |\n| [`spec/`](#spec)                        | The folder in which all of your test files live                                              |\n| [`src/`](#src)                          | The folder in which all of your source JavaScript, CSS, templates and translation files live |\n| [`webpack/`](#src)                      | translations-loader and translations-plugin to support i18n in the application               |\n| [`.babelrc`](#packagejson)              | Configuration file for Babel.js                                                              |\n| [`.browserslistrc`](#packagejson)       | Configuration file for browserslist                                                           |\n| [`jest.config.js`](#packagejson)        | Configuration file for Jest                                                                  |\n| [`package.json`](#packagejson)          | Configuration file for Project metadata, dependencies and build scripts                      |\n| [`postcss.config.js`](#packagejson)     | Configuration file for PostCSS                                                               |\n| [`webpack.config.js`](#webpackconfigjs) | Configuration file that webpack uses to build your app                                       |\n\n#### dist\nThe dist directory is created when you run the app building scripts. You will need to package this folder when submitting your app to the Zendesk Apps Marketplace, It is also the folder you will have to serve when using [ZAT](https://developer.zendesk.com/apps/docs/apps-v2/getting_started#zendesk-app-tools). It includes your app's manifest.json file, an assets folder with all your compiled JavaScript and CSS as well as HTML and images.\n\n#### spec\nThe spec directory is where all your tests and test helpers live. Tests are not required to submit/upload your app to Zendesk and your test files are not included in your app's package, however it is good practice to write tests to document functionality and prevent bugs.\n\n#### src\nThe src directory is where your raw source code lives. The App Scaffold includes different directories for JavaScript, stylesheets, templates, images and translations. Most of your additions will be in here (and spec, of course!).\n\n#### webpack\nThis directory contains custom tooling to process translations at build time:\n\n- translations-loader.js is used by Webpack to convert .json translation files to JavaScript objects, for the app itself.\n- translations-plugin.js is used to extract compulsory translation strings from the en.json file that are used to display metadata about your app on the Zendesk Apps Marketplace.\n\n\n#### .babelrc\n[.babelrc](https://babeljs.io/docs/en/babelrc.html) is the configuration file for babel compiler.\n\n#### .browserslistrc\n.browserslistrc is a configuration file to specify browsers supported by your application, some develop/build tools read info from this file if it exists in your project root. At present, our scaffolding doesn't reply on this file, [default browserslist query](https://github.com/browserslist/browserslist#queries) is used by [Babel](https://babeljs.io/docs/en/babel-preset-env/) and [PostCSS](https://github.com/csstools/postcss-preset-env#browsers)\n\n#### jest.config.js\n[jest.config.js](https://jestjs.io/docs/en/configuration.html) is the configuration file for Jest\n\n#### package.json\npackage.json is the configuration file for [Yarn](https://yarnpkg.com/), which is a package manager for JavaScript. This file includes information about your project and its dependencies. For more information on how to configure this file, see [Yarn package.json](https://yarnpkg.com/en/docs/package-json).\n\n#### postcss.config.js\npostcss.config.js is the configuration file for [PostCSS](https://postcss.org/)\n\n#### webpack.config.js\nwebpack.config.js is a configuration file for [webpack](https://webpack.github.io/). Webpack is a JavaScript module bundler. For more information about webpack and how to configure it, see [What is webpack](http://webpack.github.io/docs/what-is-webpack.html).\n\n## Helpers\nThe App Scaffold provides some helper functions in `/src/javascripts/lib/helpers.js` to help building apps.\n\n### I18n\nThe I18n (internationalization) module in `/src/javascripts/lib/i18n.js` provides a `t` method to look up translations based on a key. For more information, see [Using the I18n module](https://github.com/zendesk/app_scaffold/blob/master/doc/i18n.md).\n\n## Parameters and Settings\nIf you need to test your app with a `parameters` section in `dist/manifest.json`, foreman might crash with a message like:\n\n\u003e Would have prompted for a value interactively, but zat is not listening to keyboard input.\n\nTo resolve this problem, set default values for parameters or create a `settings.yml` file in the root directory of your app scaffold-based project, and populate it with your parameter names and test values. For example, using a parameters section like:\n\n```json\n{\n  \"parameters\": [\n    {\n      \"name\": \"myParameter\"\n    }\n  ]\n}\n```\n\ncreate a `settings.yml` containing:\n\n```yaml\nmyParameter: 'some value!'\n```\n\n## Testing\n\nThe App Scaffold is currently setup for testing with [Jest](https://jestjs.io/). To run specs, run\n\n```\nyarn test\n```\n\nSpecs live under the `spec` directory.\n\n## Deploying\n\nTo check that your app will pass the server-side validation check, run\n\n```\nzat validate --path=dist\n```\n\nIf validation is successful, you can upload the app into your Zendesk account by running\n\n```\nzat create --path=dist\n```\n\nTo update your app after it has been created in your account, run\n\n```\nzat update --path=dist\n```\n\nOr, to create a zip archive for manual upload, run\n\n```\nzat package --path=dist\n```\n\ntaking note of the created filename.\n\nFor more information on the Zendesk Apps Tools please see the [documentation](https://developer.zendesk.com/apps/docs/apps-v2/getting_started#zendesk-app-tools).\n\n## External Dependencies\nExternal dependencies are defined in [webpack.config.js](https://github.com/zendesk/app_scaffold/blob/master/webpack.config.js#L22). This ensures these dependencies are included in your app's `index.html`.\n\n## Zendesk Garden CSS Components\nIncluded [Zendesk Garden CSS Components](https://garden.zendesk.com/css-components/) are listed in [package.json](https://github.com/zendesk/app_scaffold/blob/master/package.json#L25) as dev dependencies. Instead of importing them into the app css bundle, we are building a [jsDelivr CDN](https://www.jsdelivr.com/) link from the dependencies list and inject the link into `index.html` as another `\u003cstyle\u003e` tag. Feel free to add/remove the Garden components as needed, webpack will generate and insert the updated link during the build process.\n\n## Contribute\n* Put up a PR into the master branch.\n* CC and get a review from maintainers.\n\n## Bugs\nSubmit Issues via [GitHub](https://github.com/zendesk/talk_partner_sample_app/issues/new).\n\n## Useful Links\nLinks to maintaining team, confluence pages, Datadog dashboard, Kibana logs, etc\n- https://developer.zendesk.com/\n- https://github.com/zendesk/zendesk_apps_tools\n- https://webpack.github.io\n\n## Copyright and license\nCopyright 2018 Zendesk\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n\nYou may obtain a copy of the License at\nhttp://www.apache.org/licenses/LICENSE-2.0\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Ftalk_partner_sample_app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzendesk%2Ftalk_partner_sample_app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzendesk%2Ftalk_partner_sample_app/lists"}