# gururakesh/grpc-sample architecture

> Architecture diagram of the GitHub repository gururakesh/grpc-sample, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/gururakesh/grpc-sample
- Repository: https://github.com/gururakesh/grpc-sample

## Overview

This is a small gRPC car-park sample. Its apparent workflow is a caller submits a vehicle through the client, the server dispatches the parking request to the service implementation, and a response is returned; the contract also defines a server-streaming operation. Only the protocol file was excerpted, so Java component connections are shown as unverified, with no source evidence claimed for their wiring.

Main entry points: [`src/main/java/org/sample/park/server/CarParkServer.java`](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServer.java) (Car park server), [`src/main/java/org/sample/park/client/CarParkClient.java`](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/client/CarParkClient.java) (Car park client), [`src/main/java/org/sample/park/server/CarParkServiceImpl.java`](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServiceImpl.java) (Parking implementation), [`src/main/resources/CarPark.proto`](https://github.com/gururakesh/grpc-sample/blob/main/src/main/resources/CarPark.proto) (Parking RPCs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client"]
  node_client_app["Car park client<br/>[CarParkClient.java]"]
end

subgraph group_service["Parking service"]
  node_server["Car park server<br/>[CarParkServer.java]"]
  node_implementation["Parking implementation"]
end

subgraph group_contract["RPC contract"]
  node_protocol["Parking RPCs<br/>[CarPark.proto]"]
end

node_caller(("Caller"))

node_caller -.->|"submits vehicle"| node_client_app
node_client_app -.->|"sends request"| node_server
node_server -.->|"dispatches request"| node_implementation
node_implementation -.->|"returns response"| node_server
node_client_app -.->|"uses contract"| node_protocol
node_server -.->|"serves contract"| node_protocol

click node_client_app "https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/client/CarParkClient.java"
click node_server "https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServer.java"
click node_implementation "https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServiceImpl.java"
click node_protocol "https://github.com/gururakesh/grpc-sample/blob/main/src/main/resources/CarPark.proto"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client_app toneBlue
class node_server,node_implementation toneAmber
class node_protocol toneMint
class node_caller toneIndigo
```

## Components

### Client

- [Car park client](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/client/CarParkClient.java): `src/main/java/org/sample/park/client/CarParkClient.java`

### Parking service

- [Car park server](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServer.java): `src/main/java/org/sample/park/server/CarParkServer.java`
- [Parking implementation](https://github.com/gururakesh/grpc-sample/blob/main/src/main/java/org/sample/park/server/CarParkServiceImpl.java): `src/main/java/org/sample/park/server/CarParkServiceImpl.java`

### RPC contract

- [Parking RPCs](https://github.com/gururakesh/grpc-sample/blob/main/src/main/resources/CarPark.proto): `src/main/resources/CarPark.proto`

### Other components

- **Caller**

## Connections

- Caller → Car park client: submits vehicle
- Car park client → Car park server: sends request
- Car park server → Parking implementation: dispatches request
- Parking implementation → Car park server: returns response
- Car park client → Parking RPCs: uses contract
- Car park server → Parking RPCs: serves contract
