{"id":31053110,"url":"https://github.com/nishantcoder108/grpc-todo-typescript","last_synced_at":"2025-09-15T01:52:19.016Z","repository":{"id":310627914,"uuid":"1039482874","full_name":"NishantCoder108/grpc-todo-typescript","owner":"NishantCoder108","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-17T10:36:40.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-06T21:00:45.186Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/NishantCoder108.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-08-17T10:36:34.000Z","updated_at":"2025-08-17T10:36:43.000Z","dependencies_parsed_at":"2025-08-19T10:29:58.655Z","dependency_job_id":"b71fab08-b705-41ac-94f6-e6f9292189ff","html_url":"https://github.com/NishantCoder108/grpc-todo-typescript","commit_stats":null,"previous_names":["nishantcoder108/grpc-todo-typescript"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NishantCoder108/grpc-todo-typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantCoder108%2Fgrpc-todo-typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantCoder108%2Fgrpc-todo-typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantCoder108%2Fgrpc-todo-typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantCoder108%2Fgrpc-todo-typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NishantCoder108","download_url":"https://codeload.github.com/NishantCoder108/grpc-todo-typescript/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NishantCoder108%2Fgrpc-todo-typescript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275194020,"owners_count":25421441,"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-09-14T02:00:10.474Z","response_time":75,"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":[],"created_at":"2025-09-15T01:52:16.406Z","updated_at":"2025-09-15T01:52:19.007Z","avatar_url":"https://github.com/NishantCoder108.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gRPC Todo (TypeScript)\n\nA minimal, production‑minded gRPC service and client in TypeScript. It demonstrates unary and server‑streaming RPCs, request deadlines, metadata‑based auth, and a clean path toward codegen and TLS.\n\n## Features\n- Todo service with Create/Get/Delete (unary) and List (server‑streaming)\n- Per‑request deadlines (client)\n- Metadata auth (Authorization: `Bearer devtoken`)\n- Contract‑first design via Protobuf (`proto/todo/v1/todo.proto`)\n\n## Tech\n- Node 18+, TypeScript\n- `@grpc/grpc-js`, `@grpc/proto-loader`\n\n## Quick start\n1) Install dependencies\n```bash\nnpm install\n```\n2) Run the server\n```bash\nnpm run dev:server\n# gRPC server listening on 0.0.0.0:50051\n```\n3) Run the client (in another terminal)\n```bash\nnpm run dev:client\n# created/got/list/deleted logs\n```\n\n## Project structure\n```\nproto/\n  todo/v1/todo.proto      # Protobuf API contract (single source of truth)\nsrc/\n  server.ts               # gRPC server (handlers, auth, streaming)\n  client.ts               # gRPC client (deadlines, metadata)\n```\n\n## API\n`proto/todo/v1/todo.proto` defines:\n- Messages: `Todo`, `CreateTodoRequest/Response`, `GetTodoRequest/Response`, `DeleteTodoRequest/Response`, `ListTodosRequest/Response`\n- Service: `TodoService` with RPCs `CreateTodo`, `GetTodo`, `DeleteTodo`, `ListTodos` (server‑streaming)\n\nExample (Node client):\n```ts\nclient.CreateTodo({ title: \"Learn gRPC\" }, md, { deadline }, cb);\n```\n- `md` includes `authorization: Bearer devtoken`\n- `deadline` is a `Date` (e.g., 3s)\n\n## Transport \u0026 Security\n- Dev: plaintext h2c via `createInsecure()`\n- Prod: TLS\n  - Server: `ServerCredentials.createSsl(...)`\n  - Client: `credentials.createSsl(ca)`\n  - Prefer mTLS for service‑to‑service auth\n\n## Next steps (roadmap)\n- Strong typing via `ts-proto` codegen\n- DB repository (SQLite/Postgres) instead of in‑memory store\n- Outbox + Kafka for events\n- TLS/mTLS, health, reflection, observability (OpenTelemetry)\n- Tests (unit + bufconn integration) and CI\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantcoder108%2Fgrpc-todo-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnishantcoder108%2Fgrpc-todo-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnishantcoder108%2Fgrpc-todo-typescript/lists"}