{"id":43049424,"url":"https://github.com/athexweb3/react-native-nitro-grpc","last_synced_at":"2026-01-31T10:13:44.150Z","repository":{"id":329276124,"uuid":"1115317291","full_name":"athexweb3/react-native-nitro-grpc","owner":"athexweb3","description":"⚡️ A fast implementation of Google's `gprc` module written in C/C++ JSI","archived":false,"fork":false,"pushed_at":"2025-12-20T07:35:54.000Z","size":3489,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-21T18:30:33.181Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/athexweb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-12T17:06:34.000Z","updated_at":"2025-12-20T03:49:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/athexweb3/react-native-nitro-grpc","commit_stats":null,"previous_names":["athexweb3/react-native-nitro-grpc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/athexweb3/react-native-nitro-grpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athexweb3%2Freact-native-nitro-grpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athexweb3%2Freact-native-nitro-grpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athexweb3%2Freact-native-nitro-grpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athexweb3%2Freact-native-nitro-grpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athexweb3","download_url":"https://codeload.github.com/athexweb3/react-native-nitro-grpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athexweb3%2Freact-native-nitro-grpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28937946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T08:53:31.997Z","status":"ssl_error","status_checked_at":"2026-01-31T08:51:38.521Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-01-31T10:13:43.480Z","updated_at":"2026-01-31T10:13:44.144Z","avatar_url":"https://github.com/athexweb3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-nitro-grpc\n\u003e **High-performance gRPC for React Native powered by C++ and Nitro Modules.**\n\n[![npm version](https://img.shields.io/npm/v/react-native-nitro-grpc)](https://www.npmjs.com/package/react-native-nitro-grpc)\n[![License](https://img.shields.io/github/license/athexweb3/react-native-nitro-grpc)](https://github.com/athexweb3/react-native-nitro-grpc/blob/main/LICENSE)\n\n`react-native-nitro-grpc` brings **Native C++ gRPC** to React Native, offering superior performance, type safety, and true bi-directional streaming compared to REST or `grpc-web`.\n\n## Why `react-native-nitro-grpc`?\n\n*   **Unmatched Performance**: Uses **Protobuf** (30-50% smaller than JSON) and **Zero-Copy Parsing** in C++ to keep your JS thread free.\n*   **HTTP/2 \u0026 Multiplexing**: One TCP connection for all requests with header compression (HPACK).\n*   **True Bi-directional Streaming**: Real-time data flow for chat, trading, and voice apps without WebSockets.\n*   **Type Safety**: strict TypeScript definitions generated directly from your `.proto` files.\n \n ## 📦 Android Prefab\n \n \u003e **Note:** Generally you don't need to touch this, but if you are looking for the standalone gRPC C++ for Android:\n \n [![](https://jitpack.io/v/athexweb3/react-native-nitro-grpc.svg)](https://jitpack.io/#athexweb3/react-native-nitro-grpc)\n \n We provide a prebuilt **gRPC Android Prefab** package to speed up build times. It hosts the precompiled static libraries for gRPC Core.\n Check out [packages/grpc-android-prefab](packages/grpc-android-prefab) for more details.\n\n## Installation\n\n```bash\nbun install react-native-nitro-grpc\ncd ios \u0026\u0026 bun pods\n```\n\n## Usage\n\n### 1. Define your Types\nYou can use any library to generate TypeScript implementations (like `ts-proto` or `protobufjs`), or define them manually:\n\n```typescript\n// Types are just standard TypeScript interfaces!\ninterface LoginRequest {\n  username: string;\n  password?: string;\n}\n\ninterface LoginResponse {\n  token: string;\n}\n```\n\n### 2. Make Requests\nUse the `GrpcChannel` and `GrpcClient` to make requests to your server.\n\n```typescript\nimport { GrpcChannel, GrpcClient, ChannelCredentials } from 'react-native-nitro-grpc';\n\n// 1. Create a Channel\nconst channel = new GrpcChannel('localhost:50051', ChannelCredentials.createInsecure());\n\n// 2. Create a Client\nconst client = new GrpcClient(channel);\n\nasync function performLogin() {\n  try {\n    // 3. Make a Call\n    const response = await client.unaryCall\u003cLoginRequest, LoginResponse\u003e(\n      '/AuthService/Login',\n      { username: 'user', password: 'password123' }\n    );\n    \n    console.log('Token:', response.token);\n  } catch (error) {\n    console.error('Login failed:', error);\n  }\n}\n```\n\n### 3. Use Interceptors\nAdd powerful middleware for logging, retries, and authentication.\n\n```typescript\nimport { \n  GrpcClient, \n  LoggingInterceptor, \n  RetryInterceptor, \n  GrpcStatus \n} from 'react-native-nitro-grpc';\n\nconst client = new GrpcClient(channel, [\n  // 1. Retry failed requests (Exponential Backoff)\n  new RetryInterceptor({\n    maxAttempts: 3,\n    initialBackoffMs: 500,\n    retryableStatusCodes: [GrpcStatus.UNAVAILABLE],\n  }),\n  \n  // 2. Log requests with redaction\n  new LoggingInterceptor({\n    sensitiveFields: ['password', 'token'],\n    logBody: true,\n  }),\n]);\n```\n\n## Comparison\n\n| Feature | REST | GraphQL | gRPC (`react-native-nitro-grpc`) |\n| :--- | :--- | :--- | :--- |\n| **Format** | JSON (Text) | JSON (Text) | **Protobuf (Binary)** |\n| **Transport** | HTTP/1.1 or 2 | HTTP/1.1 or 2 | **HTTP/2 (Mandatory)** |\n| **Streaming** | No | Subscriptions (WS) | **Native Bi-directional** |\n| **Type Safety** | Loose | Good | **Strict (Native)** |\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## License\n\nMIT\n\n## Contributors\n\n- [Orven Web3](https://github.com/orvenweb3)\n- [Athex Web3](https://github.com/athexweb3)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathexweb3%2Freact-native-nitro-grpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathexweb3%2Freact-native-nitro-grpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathexweb3%2Freact-native-nitro-grpc/lists"}