CLN-07: Copied .proto sources from chat-server and stream-server
to proto/{common,chat,stream}/. Original copies remain until builds
are updated to use the shared directory.
34 lines
1.6 KiB
Markdown
34 lines
1.6 KiB
Markdown
# Centralized Protobuf Definitions (CLN-07)
|
|
|
|
This directory contains the **canonical source** of all `.proto` files for the Veza monorepo.
|
|
|
|
## Structure
|
|
|
|
```
|
|
proto/
|
|
├── common/
|
|
│ └── auth.proto # Shared auth service (ValidateToken, GetUserInfo, etc.)
|
|
├── stream/
|
|
│ └── stream.proto # Stream service (veza-stream-server)
|
|
├── chat/
|
|
│ └── chat.proto # Chat service (veza-chat-server)
|
|
└── README.md
|
|
```
|
|
|
|
## Intent
|
|
|
|
- **Single source of truth**: All protobuf definitions live here. Edit these files when changing API contracts.
|
|
- **Generated code stays in place**: Go/Rust generated code remains in `veza-backend-api`, `veza-chat-server`, and `veza-stream-server`. Build scripts in those projects should use this directory as the `--proto_path` when invoking `protoc`.
|
|
- **Shared common types**: `common/auth.proto` is imported by both `chat.proto` and `stream.proto`.
|
|
|
|
## Consumers
|
|
|
|
| Consumer | Proto files used | Generated output location |
|
|
|---------------------|-------------------------|----------------------------------|
|
|
| veza-chat-server | chat.proto, common/auth.proto | (existing generated dirs) |
|
|
| veza-stream-server | stream.proto, common/auth.proto | (existing generated dirs) |
|
|
| veza-backend-api | All (if applicable) | (existing generated dirs) |
|
|
|
|
## Migration note
|
|
|
|
The original `.proto` files were duplicated in `veza-chat-server/proto/` and `veza-stream-server/proto/`. Those copies can be removed or symlinked to this directory once build pipelines are updated to use `proto/` as the source.
|