{"id":19291720,"url":"https://github.com/hirosystems/api-toolkit","last_synced_at":"2025-04-22T06:31:46.879Z","repository":{"id":181267909,"uuid":"618253728","full_name":"hirosystems/api-toolkit","owner":"hirosystems","description":"API toolkit","archived":false,"fork":false,"pushed_at":"2024-10-31T16:48:15.000Z","size":425,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2024-11-03T10:04:17.024Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/hirosystems.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-03-24T04:17:12.000Z","updated_at":"2024-10-02T20:26:39.000Z","dependencies_parsed_at":"2023-07-14T18:42:20.068Z","dependency_job_id":"34e6f506-dbe0-4688-9dc3-941d213c3a61","html_url":"https://github.com/hirosystems/api-toolkit","commit_stats":{"total_commits":41,"total_committers":5,"mean_commits":8.2,"dds":0.3414634146341463,"last_synced_commit":"b224e0673f09b71d52b8506f487c91aa60afdce5"},"previous_names":["hirosystems/api-toolkit"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fapi-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fapi-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fapi-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirosystems%2Fapi-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirosystems","download_url":"https://codeload.github.com/hirosystems/api-toolkit/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223891065,"owners_count":17220511,"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-11-09T22:27:27.950Z","updated_at":"2025-04-22T06:31:46.870Z","avatar_url":"https://github.com/hirosystems.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n       /     /   ▶ API Toolkit\n      / --- /      A comprehensive collection of tools designed by Hiro to simplify common tasks in\n     /     /       API development.\n\n[![NPM Package](https://img.shields.io/npm/v/@hirosystems/api-toolkit.svg?style=flat-square)](https://www.npmjs.org/package/@hirosystems/api-toolkit)\n\nThe API Toolkit Library is a comprehensive collection of tools designed by Hiro to simplify common\ntasks in API development. This library provides functionalities for database management, application\nshutdown handlers, migration helpers, server version management, etc. It aims to streamline the\ndevelopment process and improve code quality by offering convenient and reusable modules.\n\n## Installation\n\nYou can start by installing the API Toolkit Library using npm:\n\n```\nnpm install @hirosystems/api-toolkit\n```\n\nYou should also customize the following ENV variables that control how log messages are displayed:\n\n```env\nAPPLICATION_NAME=your-api-name\nLOG_LEVEL=info\n```\n\n## Featured tools\n\nPlease see each tool's source directory for additional documentation\n\n### Postgres\n\n* Superclass for connection support and SQL transaction management using\n  [postgres.js](https://github.com/porsager/postgres)\n* Connection helpers with automatic retry logic, using the standard postgres ENV variables\n* Migration tools for migration apply and rollback using\n  [node-pg-migrate](https://github.com/salsita/node-pg-migrate)\n* Type definitions and conversion helpers for postgres to node type management and viceversa\n\n### Shutdown handlers\n\n* Node.js signal handlers that provide a way to shut down long-running application components\ngracefully on unhandled exceptions or interrupt signals.\n\n### Profiler server\n\n* Fastify server that controls a profiler capable of generating:\n    * `.cpuprofile` files for CPU usage analysis\n    * `.heapsnapshot` files for memory usage analysis\n\n### Logger\n\n* Standardized logger configuration using [pino](https://github.com/pinojs/pino)\n\n### Server versioning\n\n* `api-toolkit-git-info` executable tool to generate API versioning information based on Git branch,\n  tag, and latest commit\n* Helpers to extract version info to display at runtime or on documentation\n\n### Fastify\n\n* API server creation with CORS, Typebox and Pino logging\n* OpenAPI generator plugin with YAML and JSON exports\n\n### Helpers\n\n* Value conversion functions (hex strings, hashes, etc.)\n* Timer tools (stopwatch, waiters, etc.)\n\n## License\n\nThe API Toolkit Library is released under the Apache 2.0 License. See the LICENSE file for more\ndetails.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fapi-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirosystems%2Fapi-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirosystems%2Fapi-toolkit/lists"}