{"id":18263310,"url":"https://github.com/safe-global/safe-client-gateway","last_synced_at":"2026-01-22T12:09:27.861Z","repository":{"id":53058234,"uuid":"520822851","full_name":"safe-global/safe-client-gateway","owner":"safe-global","description":"Serves as a bridge for the Safe{Wallet} clients (Android, iOS, Web)","archived":false,"fork":false,"pushed_at":"2024-10-29T09:20:37.000Z","size":12071,"stargazers_count":26,"open_issues_count":34,"forks_count":63,"subscribers_count":11,"default_branch":"main","last_synced_at":"2024-10-29T09:22:38.387Z","etag":null,"topics":["ethereum","nestjs","nodejs","safe"],"latest_commit_sha":null,"homepage":"https://docs.safe.global","language":"TypeScript","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/safe-global.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-03T09:47:59.000Z","updated_at":"2024-10-29T07:55:31.000Z","dependencies_parsed_at":"2023-09-21T02:41:53.166Z","dependency_job_id":"34ad28b7-f9f4-4689-bdfa-3d6c37112df3","html_url":"https://github.com/safe-global/safe-client-gateway","commit_stats":null,"previous_names":["safe-global/safe-client-gateway-nest"],"tags_count":108,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-client-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-client-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-client-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/safe-global%2Fsafe-client-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/safe-global","download_url":"https://codeload.github.com/safe-global/safe-client-gateway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"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":["ethereum","nestjs","nodejs","safe"],"created_at":"2024-11-05T11:10:44.525Z","updated_at":"2026-01-22T12:09:27.856Z","avatar_url":"https://github.com/safe-global.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Safe Client Gateway\n\n[![Coverage Status](https://coveralls.io/repos/github/safe-global/safe-client-gateway/badge.svg?branch=main)](https://coveralls.io/github/safe-global/safe-client-gateway?branch=main)\n\n## Motivation\n\nThe Safe Client Gateway serves as a bridge for the Safe{Wallet} clients (Android, iOS, Web).\n\nIt provides UI-oriented mappings and data structures for easier integration with several Safe{Core} services. In essence, it works as a bridge between the frontend and backend, ensuring smooth, efficient data exchange.\n\n## Documentation\n\n- [Client Gateway OpenAPI specification](https://safe-client.safe.global/api)\n- [Deploying the service](https://github.com/safe-global/safe-infrastructure)\n\n## Requirements\n\n- Node.js v24.11.0 'Krypton' LTS ([Node.js Release Schedule](https://nodejs.org/en/about/previous-releases)) – https://nodejs.org/en/\n- Docker Compose – https://docs.docker.com/compose/\n\n## Installation\n\n**Optional:** If you have NVM installed, you can run `nvm use` in the root folder of the project to use the recommended\nNode version set for this project.\n\nWe use Yarn as the package manager for this project. Yarn is bundled with the project so to use it run:\n\n```bash\ncorepack enable \u0026\u0026 yarn install\n```\n\nThe project requires some ABIs that are generated after install. In order to manually generate them, run:\n\n```bash\nyarn generate-abis\n```\n\n## Setup your env\n\nWe recommend using what is available in the .env.sample file:\n\n```bash\ncp .env.sample .env\n```\n\nThen edit your `.env` file with your configuration values.\n\nPlease review the required API keys in the `.env` file and ensure you have created the necessary keys for the services you plan to use.\n\n## Running the app\n\n1. Start Redis instance. By default, it will start on port `6379` of `localhost`.\n\n```shell\ndocker compose up -d redis\n```\n\nIf you run the service locally against a local Safe{Wallet} instance,\n\n- set `TX_SERVICE_API_KEY` to a valid key to avoid hitting the Transaction Service rate limit\n- set `CGW_ENV=development`\n- set `ALLOW_CORS=true`\n\nTo generate a key, go to:\n\n- [Tx Service staging](https://developer.5afe.dev/api-keys)\n- [Tx Service production](https://developer.safe.global/api-keys)\n\n2. Start the Safe Client Gateway\n\n```bash\n# development\nyarn run start\n\n# watch mode\nyarn run start:dev\n\n# production mode\nyarn run start:prod\n```\n\n## Test\n\nThe unit test suite contains tests that require a database connection.\nThis project provides a `db-test` container which also validates the support for SSL connections.\nTo start the container, make sure that the key for the self-signed certificate\nhas the right permissions.\n\n```shell\n# disallow any access to world or group\nchmod 0600 db_config/test/server.key\n```\n\nWith the right permissions set on the `server.key` file we can now start the `db-test` container:\n\n```shell\n# start the db-test container\ndocker compose up -d db-test\n\n# unit tests\nyarn run test\n\n# e2e tests\ndocker-compose up -d redis rabbitmq \u0026\u0026 yarn run test:e2e\n\n# test coverage\nyarn run test:cov\n```\n\n## Linter and Style Guide\n\nWe use [ESLint](https://eslint.org/) as a linter and [Prettier](https://prettier.io/) as a code formatter.\nYou can run `yarn run lint` to execute ESLint and `yarn run format` to execute Prettier.\n\nThese checks can be automatically executed using Git hooks. If you wish to install the provided git hooks:\n\n```shell\nyarn install\nyarn husky install\n```\n\n## Database Migrations\n\nDatabase migrations are configured to execute automatically. To disable them, set the following environment variables:\n\n```\nRUN_MIGRATIONS=false\nDB_MIGRATIONS_EXECUTE=false\n```\n\nFor migrations to be generated automatically, the entity file must follow this structure and naming convention:\n\n`src/**/entities/*.entity.db.ts`\n\nThe file should be located in the `src` folder, inside an `entities` directory. The filename should follow the format `{FILE_NAME}.entity.db.ts`, where `{FILE_NAME}` is replaced with your desired name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-client-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsafe-global%2Fsafe-client-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsafe-global%2Fsafe-client-gateway/lists"}