{"id":24764492,"url":"https://github.com/seamapi/fake-template","last_synced_at":"2026-02-16T05:32:43.076Z","repository":{"id":219835775,"uuid":"450981501","full_name":"seamapi/fake-template","owner":"seamapi","description":"Template for creating Fake Devices","archived":false,"fork":false,"pushed_at":"2026-01-27T01:03:36.000Z","size":1360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-08T00:41:12.449Z","etag":null,"topics":["maintained"],"latest_commit_sha":null,"homepage":"","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/seamapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-01-23T01:59:36.000Z","updated_at":"2024-08-30T17:06:22.000Z","dependencies_parsed_at":"2025-05-31T13:07:37.066Z","dependency_job_id":"bf9e6f39-6dc3-4b90-b8da-1d33a91daf6c","html_url":"https://github.com/seamapi/fake-template","commit_stats":null,"previous_names":["seamapi/fake-template"],"tags_count":13,"template":true,"template_full_name":null,"purl":"pkg:github/seamapi/fake-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Ffake-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Ffake-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Ffake-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Ffake-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/fake-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Ffake-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29500832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["maintained"],"created_at":"2025-01-28T22:31:50.720Z","updated_at":"2026-02-16T05:32:43.059Z","avatar_url":"https://github.com/seamapi.png","language":"TypeScript","readme":"# Fake Template\n\n[![GitHub Actions](https://github.com/seamapi/fake-template/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/fake-template/actions/workflows/check.yml)\n\nPackage skeleton for a fake.\n\n## Description\n\nTODO: Describe fake here.\n\n## Bootstrapping a new fake\n\n1. [Trigger a makenew workflow from this repository][makenew workflow]. 🚀\n   - Provide a value for each required input.\n   - There are no defaults.\n   - Example values are shown in parentheses.\n2. When the workflow completes, clone your new repo and start coding!\n\n[makenew workflow]: https://github.com/seamapi/fake-template/actions/workflows/makenew.yml\n\n### Updating from this skeleton\n\nIf you want to pull in future updates from this skeleton,\nyou can fetch and merge in changes from this repository.\n\nAdd this as a new remote with\n\n```\n$ git remote add makenew git@github.com:seamapi/fake-template.git\n```\n\nYou can then fetch and merge changes with\n\n```\n$ git fetch --no-tags makenew\n$ git merge makenew/main\n```\n\n## Third Party API Fakes\n\nThird party APIs are simulated in testing and staging environments using fakes.\nFakes:\n\n- Mimic functionality of the third party API and internal state management without needing any physical devices.\n- Enable reliable local testing.\n- Enable staging environments for customers.\n- Allow comparing API responses to look for discrepancies, reducing maintenance burden.\n\nRead more about the difference between fakes, mocks and stubs in [this StackOverflow post](https://stackoverflow.com/a/346440/559475).\n\n## Implementing a Fake\n\nThe fake will be automatically published to Github Packages as an NPM module, using npm-semantic-release.\n\nThis template uses the following:\n\n- [EdgeSpec](https://github.com/seamapi/edgespec) for API routes.\n- Zustand for state management.\n- AVA for tests.\n\nThe fakes should implement the following interfaces:\n\n- Start one or more HTTP servers on a provided port.\n- Create or manipulate internal state (without using the API directly) to configure test fixtures,\n  e.g., create a user, create an API key, create a sample device.\n- Save and load internal state.\n\n## Fake Checklist\n\n- [ ] Fill in package name at `lib/logger.ts` and `pages/api/health.ts`\n- [ ] Insomnia Export JSON File in `research/insomnia_config.json`\n- [ ] Has README with instructions: how it works, links to relevant third party documentation or blogs, feature list, etc.\n- [ ] Implements minimal set of endpoints needed to poll devices and perform actions.\n- [ ] Added to [Seam Connect fake config map](https://github.com/seamapi/seam-connect/blob/main/lib/sandbox/fake-config-map.ts).\n- [ ] Sample DB data imported into [seam-connect's sample-scenarios folder](https://github.com/seamapi/seam-connect/tree/main/lib/sandbox/sample-scenarios).\n- [ ] Any environment variables, e.g., `MANUFACTURER_BASE_URL` added to seam-connect README and `getWorkspaceEnv` file.\n\n## Installation\n\nAdd this as a dependency to your project using [npm]\nby adding the line below to your project's `.npmrc`,\n\n```\n@seamapi:registry=https://npm.pkg.github.com\n```\n\nand installing the package with\n\n```\n$ npm install @seamapi/fake-template\n```\n\n[npm]: https://www.npmjs.com/\n\n## Development and Testing\n\n### Quickstart\n\n```\n$ git clone https://github.com/seamapi/fake-template.git\n$ cd fake-template\n$ nvm install\n$ npm install\n$ npm run test:watch\n```\n\nPrimary development tasks are defined under `scripts` in `package.json`\nand available via `npm run`.\nView them with\n\n```\n$ npm run\n```\n\n### Source code\n\nThe [source code] is hosted on GitHub.\nClone the project with\n\n```\n$ git clone git@github.com:seamapi/fake-template.git\n```\n\n[source code]: https://github.com/seamapi/fake-template\n\n### Requirements\n\nYou will need [Node.js] with [npm] and a [Node.js debugging] client.\n\nBe sure that all commands run under the correct Node version, e.g.,\nif using [nvm], install the correct version with\n\n```\n$ nvm install\n```\n\nSet the active version for each shell session with\n\n```\n$ nvm use\n```\n\nEnsure you are authenticated with the [GitHub Packages npm registry],\nthen install the development dependencies with\n\n```\n$ npm install\n```\n\n[Node.js]: https://nodejs.org/\n[Node.js debugging]: https://nodejs.org/en/docs/guides/debugging-getting-started/\n[npm]: https://www.npmjs.com/\n[nvm]: https://github.com/creationix/nvm\n[GitHub Packages npm registry]: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry#authenticating-to-github-packages\n\n### Publishing\n\n#### Automatic\n\nNew versions are released automatically with [semantic-release]\nas long as commits follow the [Angular Commit Message Conventions].\n\n[Angular Commit Message Conventions]: https://semantic-release.gitbook.io/semantic-release/#commit-message-format\n[semantic-release]: https://semantic-release.gitbook.io/\n\n#### Manual\n\nPublish a new version by triggering a [version workflow_dispatch on GitHub Actions].\nThe `version` input will be passed as the first argument to [npm-version].\n\nThis may be done on the web or using the [GitHub CLI] with\n\n```\n$ gh workflow run version.yml --raw-field version=\u003cversion\u003e\n```\n\n[GitHub CLI]: https://cli.github.com/\n[npm-version]: https://docs.npmjs.com/cli/version\n[version workflow_dispatch on GitHub Actions]: https://github.com/seamapi/fake-template/actions?query=workflow%3Aversion\n\n## GitHub Actions\n\n_GitHub Actions should already be configured: this section is for reference only._\n\nThe following repository secrets must be set on [GitHub Actions]:\n\n- `GH_TOKEN`: A personal access token for the bot user with\n  `packages:write` and `contents:write` permission.\n- `GIT_USER_NAME`: The GitHub bot user's real name.\n- `GIT_USER_EMAIL`: The GitHub bot user's email.\n- `GPG_PRIVATE_KEY`: The GitHub bot user's [GPG private key].\n- `GPG_PASSPHRASE`: The GitHub bot user's GPG passphrase.\n\n[GitHub Actions]: https://github.com/features/actions\n[GPG private key]: https://github.com/marketplace/actions/import-gpg#prerequisites\n\n## Contributing\n\n\u003e If using squash merge, edit and ensure the commit message follows the [Angular Commit Message Conventions] specification.\n\u003e Otherwise, each individual commit must follow the [Angular Commit Message Conventions] specification.\n\n1. Create your feature branch (`git checkout -b my-new-feature`).\n2. Make changes.\n3. Commit your changes (`git commit -am 'Add some feature'`).\n4. Push to the branch (`git push origin my-new-feature`).\n5. Create a new draft pull request.\n6. Ensure all checks pass.\n7. Mark your pull request ready for review.\n8. Wait for the required approval from the code owners.\n9. Merge when ready.\n\n[Angular Commit Message Conventions]: https://semantic-release.gitbook.io/semantic-release/#commit-message-format\n\n## License\n\nThis npm package is Copyright (c) 2021-2023 Seam Labs, Inc.\n\n## Warranty\n\nThis software is provided by the copyright holders and contributors \"as is\" and\nany express or implied warranties, including, but not limited to, the implied\nwarranties of merchantability and fitness for a particular purpose are\ndisclaimed. In no event shall the copyright holder or contributors be liable for\nany direct, indirect, incidental, special, exemplary, or consequential damages\n(including, but not limited to, procurement of substitute goods or services;\nloss of use, data, or profits; or business interruption) however caused and on\nany theory of liability, whether in contract, strict liability, or tort\n(including negligence or otherwise) arising in any way out of the use of this\nsoftware, even if advised of the possibility of such damage.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Ffake-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Ffake-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Ffake-template/lists"}