The SDK is proto-first: nothing in the public surface is hand-written. Every client, doc, and HTTP handler is generated from a single set ofDocumentation Index
Fetch the complete documentation index at: https://docs.sdk.anghami.com/llms.txt
Use this file to discover all available pages before exploring further.
.proto files using buf v2 and sebuf.
Repository layout
Source of truth (edited by hand)
Generated (never edited, but committed)
Build pipeline
make generate runs buf generate, which fans out to nine plugins:
| # | Plugin | Output |
|---|---|---|
| 1 | protoc-gen-go | Go types |
| 2 | protoc-gen-go-http (sebuf) | Go HTTP handlers |
| 3 | protoc-gen-openapiv3 (yaml, bundled) | docs/api/anghami-sdk.openapi.yaml |
| 4 | protoc-gen-openapiv3 (json, bundled) | docs/api/anghami-sdk.openapi.json |
| 5 | protoc-gen-swift | Swift types |
| 6 | protoc-gen-ts_proto | TypeScript interfaces |
| 7 | protoc (java, lite) | Java classes |
| 8 | protoc (python) | Python modules |
| 9 | protoc-gen-mypy | Python type stubs |
@Generated annotations from Java, and emit __init__.py files for Python packages.
HTTP shape
Every RPC compiles into a stable path defined in the proto viasebuf.http. Reads are GET, mutations and batch operations are POST:
GET with path parameters; multi-resource batch reads use POST with :batchGet suffix and a typed body. The full path/method mapping for every operation is in the API Reference.
Versioning
- Proto packages are versioned — every package is
sdk.{service}.v1. Breaking changes ship asv2packages alongsidev1until consumers migrate. make breakingruns againstmain— any breaking change tov1fails CI.- Generated code follows proto versioning — TS/Go/Swift packages export typed namespaces matching the proto packages.
Why proto-first
- One source, many surfaces. OpenAPI, REST clients, and HTTP handlers stay in lock-step — they’re all derivatives of the same
.proto. - Strict contracts. Validation rules (
buf.validate) live in the proto and apply identically on every client and server. - Documentation by construction. Every field/message/RPC has a leading comment (enforced by
buf lint COMMENTS), so the OpenAPI you import already has descriptions on every operation.