Skip to content

Add shared gRPC proto contract for portfolio items - #656

Open
conorheffron with Copilot wants to merge 7 commits into
mainfrom
copilot/investigate-gprc-proto-interfaces
Open

Add shared gRPC proto contract for portfolio items#656
conorheffron with Copilot wants to merge 7 commits into
mainfrom
copilot/investigate-gprc-proto-interfaces

Conversation

Copilot AI commented May 16, 2026

Copy link
Copy Markdown
Contributor

This spike explores defining the service interface in ironoc while leaving implementation to a separate module or repository. It introduces a contract-only protobuf definition for the existing portfolio-items use case so downstream services can generate shared types and implement the interface independently.

  • What changed

    • Added src/main/proto/ironoc/portfolio/v1/portfolio_items.proto
    • Defined a PortfolioItemsService gRPC surface with a ListPortfolioItems RPC
    • Modeled PortfolioItem to match the current portfolio item payload shape used by ironoc
  • Contract shape

    • Request includes pagination hooks:
      • page_size
      • page_token
    • Response includes:
      • items
      • next_page_token
  • Documentation

    • Updated README.md with the contract location, protoc generation example, and intended usage pattern for external modules/projects
  • Intended use

    • ironoc remains the owner of the interface definition
    • another module/project can generate Java types from the proto
    • that separate module can implement the gRPC server/client without coupling new functionality to the main web app
service PortfolioItemsService {
  rpc ListPortfolioItems(ListPortfolioItemsRequest) returns (ListPortfolioItemsResponse);
}

message ListPortfolioItemsRequest {
  int32 page_size = 1;
  string page_token = 2;
}

message ListPortfolioItemsResponse {
  repeated PortfolioItem items = 1;
  string next_page_token = 2;
}

Agent-Logs-Url: https://github.com/conorheffron/ironoc/sessions/627d7008-c5c0-4167-b2ec-094d79ec684d

Co-authored-by: conorheffron <8218626+conorheffron@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a contract-only gRPC/protobuf spike for portfolio project data so external modules can generate shared types and later implement the catalog service.

Changes:

  • Added a new portfolio_projects.proto contract with a PortfolioProjectCatalog service and portfolio item messages.
  • Documented how external projects can generate Java code from the shared proto contract.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/main/proto/ironoc/portfolio/v1/portfolio_projects.proto Defines the initial portfolio gRPC/protobuf contract.
README.md Adds documentation for locating and generating code from the proto spike.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated

To support a new use case where `iRonoc` owns an interface but the implementation lives in a separate module or repository, a shared protobuf contract now lives at:

`/home/runner/work/ironoc/ironoc/src/main/proto/ironoc/portfolio/v1/portfolio_projects.proto`
Comment thread README.md Outdated
Comment on lines +226 to +229
protoc \
--proto_path=src/main/proto \
--java_out=/path/to/generated-sources \
src/main/proto/ironoc/portfolio/v1/portfolio_projects.proto
Comment on lines +24 to +25
string image_theme = 5;
string image_alt = 6;
Agent-Logs-Url: https://github.com/conorheffron/ironoc/sessions/627d7008-c5c0-4167-b2ec-094d79ec684d

Co-authored-by: conorheffron <8218626+conorheffron@users.noreply.github.com>
Copilot AI changed the title [WIP] Investigate the use of gprc proto interfaces for new use case Add shared gRPC proto contract for portfolio items May 16, 2026
@conorheffron
conorheffron marked this pull request as ready for review May 16, 2026 14:54
@conorheffron conorheffron added java-be Java / Server Side Tasks java Pull requests that update Java code labels May 24, 2026
@conorheffron conorheffron moved this from In progress to In review in @conorheffron's ironoc (portfolio site) Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code java-be Java / Server Side Tasks

Projects

Development

Successfully merging this pull request may close these issues.

Spike: Investigate the use of gprc proto interfaces for new use case

3 participants