Post/standardizing civic apis with protobuf and connectrpc - #3
Merged
mlhamel merged 5 commits intoAug 24, 2026
Merged
Conversation
mlhamel
deleted the
post/standardizing-civic-apis-with-protobuf-and-connectrpc
branch
August 24, 2026 19:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new technical deep dive to the blog: "Standardizing Civic Data APIs with Protobuf and ConnectRPC"
(
content/blog/standardizing-civic-apis-with-protobuf-and-connectrpc/index.md).This post explores the architectural design behind the Civican ecosystem, detailing how
taking a contract-first approach with Protocol Buffers and ConnectRPC solves data fragmentation across Canadian
federal parliamentary (LEGISinfo) and lobbying ([Lobby Canada](https://github.
com/civican/lobbycanada)) records.
Key Highlights & Topics Covered
Contract-First API Architecture (
civican-schemas):.pyi), ConnectRPC async stubs, and Pydanticmodels for automatic OpenAPI integration.
Cross-Domain Schema Composition:
lobbycanada.protoimportslegisinfo.protosoCrossReferenceBillResponseembeds typedBillDetailentities directly, guaranteeing zero schema drift across separate civic domains.Why ConnectRPC over Traditional gRPC / REST:
fetch) andcurl-friendly JSON endpoints without needing an Envoy proxy.Service Implementation (
civican-server):ConnectASGIWrapper.Data Repositories as Ephemeral Consumers:
civican/lobbycanada,civican/legisinfo) remain free of duplicate API serverboilerplate.
make runusinguv run --with "civican-server @ ..."against local DuckDB databases.
Changed Files
content/blog/standardizing-civic-apis-with-protobuf-and-connectrpc/index.md: Full technical article with diagrams,.protosnippets, and Makefile recipes.Verification
zola build— compiled cleanly (0 warnings, 0 broken links).proto,yaml,python,makefile,bash).