How grpc/grpc-dart works
Project type and purpose
• This is an open-source Dart library implementing gRPC (remote procedure calls over HTTP/2).
• It provides both client-side and server-side APIs, plus transport adapters for Dart native, Flutter, and grpc-web.
File structure
• Top-level directories:
• lib/ → the published library code (split into client, server, shared, auth, generated protos).
• example/ → sample apps (helloworld, grpc-web, googleapis, etc.) demonstrating usage.
• interop/ → interop tests against other gRPC implementations.
• test/ → unit and integration tests for client, server, shared components.
• tool/ → helper scripts (code-generation, test runners).
• .github/ → CI/workflow definitions.
• Within lib/src: clear separation of concerns:
• client/ gRPC client API (Channel, Call, Interceptor, transports).
• server/ gRPC server API (Server, Handler, Service, Keepalive).
• shared/ codecs, streams, status, message framing, timeouts.
• auth/ authentication helpers (RSA, IO).
• generated/ compiled .proto → .pb.dart files.
• protos/ source .proto definitions shipped for downstream code gen.
README for additional insights
• Confirms support for Dart native and Flutter, plus grpc-web.
• Directs to examples demonstrating quick-start and advanced use.
• Mentions HTTP/2, mobile-first design, and integration with protoc code generation.
Be detailed but focused
• Every major folder as a component or subcomponent.
• Don’t obscure the big picture: show client ↔ server over HTTP/2, with shared core and extension points clearly delineated.