{"id":34525218,"url":"https://github.com/kiva/protocol-gateway","last_synced_at":"2026-05-25T13:31:06.315Z","repository":{"id":39071340,"uuid":"301696013","full_name":"kiva/protocol-gateway","owner":"kiva","description":"API gateway for Kiva Protocol microservices","archived":false,"fork":false,"pushed_at":"2023-02-11T15:44:03.000Z","size":2047,"stargazers_count":1,"open_issues_count":10,"forks_count":3,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-04-13T09:17:37.894Z","etag":null,"topics":["protocol","protocol-backend"],"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/kiva.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":"SECURITY.txt","support":null}},"created_at":"2020-10-06T10:54:16.000Z","updated_at":"2022-01-14T20:19:00.000Z","dependencies_parsed_at":"2023-02-18T07:31:02.570Z","dependency_job_id":null,"html_url":"https://github.com/kiva/protocol-gateway","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/kiva/protocol-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiva","download_url":"https://codeload.github.com/kiva/protocol-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiva%2Fprotocol-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27995843,"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-12-24T02:00:07.193Z","response_time":83,"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":["protocol","protocol-backend"],"created_at":"2025-12-24T05:07:45.763Z","updated_at":"2025-12-24T05:07:45.931Z","avatar_url":"https://github.com/kiva.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gateway\n\naka: NestJS Gateway, Gateway Service\n\n## Quickstart\n\nWe can run the gateway in isolation with the docker compose in this directory\nor as part of the complete backend stack. See master\n[README](https://github.com/kiva/protocol-integration-tests/blob/main/README.md) for details.\n\n## Dependencies\n\nDependencies are components which are required to build and run the service\nlocally and in production. Dependencies include language, libraries, other\nservices, data, config, environment, platform.\n\n### Language / Libraries:\n\n- NestJS\n- http-proxy-middleware: this is what the gateway uses to proxy requests to mapped microservice routes\n- See `package.json` in this directory for the full list of library dependencies\n\n### Service\n\n[Note: Gateway will run without any other services (TODO: confirm this) but\nwill only be able to service ping healthchecks]\n\n- Wallet Sync Service (plaintext HTTP, no authentication required, internal to VPC)\n\n### Data\n\nGateway is stateless (no database)\n\n### Env / Config\n\nLocally (and in CICD) the service uses the .env config file in this directory\nwhich is populated from the dotEnvFiles.contents in the top level of the\nprotocol repo. It uses that .env file to specify which environment the service\nis running in and then uses that information to pull config from\n`src/config/env.json` in this directory.\n\nIn deployed environments the service uses the kubernetes secrets file to set\nthe environment which then determines which section of the config json the\nservice reads (from the `src/config/env.json` in this directory).\n\n## Features / Aspects\n\nThe gateway routes requests coming from the ingress to the specific internal\nservices required. It also authenticates and authorizes requests via Auth0. It\nalso generates a request ID to attach to the request sent onward if that isn't\nprovided by the request.\n\n- All routes are defined in gateway.routes.ts (and documented with Swagger).\n- Routes are protected by AuthenticationMiddleware which calls the auth0 service to verify the Authorization header.\n- Traced by opentracing.\n- Logs to stdout/stderr in human readable and JSON format.\n- Rate limiting\n- CORS whitelisting\n- Standard vulnerability protections (via helmet)\n\n## Known Bugs / Quirks\n\nNone\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Fprotocol-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiva%2Fprotocol-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiva%2Fprotocol-gateway/lists"}