{"id":50373708,"url":"https://github.com/structured-world/structured-proxy","last_synced_at":"2026-05-30T08:30:31.571Z","repository":{"id":344399130,"uuid":"1181739176","full_name":"structured-world/structured-proxy","owner":"structured-world","description":"Universal gRPC→REST transcoding proxy — config-driven, works with any gRPC service","archived":false,"fork":false,"pushed_at":"2026-03-25T18:34:19.000Z","size":67,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-26T19:16:20.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/structured-world.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T15:01:57.000Z","updated_at":"2026-03-25T18:32:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/structured-world/structured-proxy","commit_stats":null,"previous_names":["structured-world/structured-proxy"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/structured-world/structured-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structured-world%2Fstructured-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structured-world%2Fstructured-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structured-world%2Fstructured-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structured-world%2Fstructured-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/structured-world","download_url":"https://codeload.github.com/structured-world/structured-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/structured-world%2Fstructured-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33686018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-30T08:30:30.965Z","updated_at":"2026-05-30T08:30:31.564Z","avatar_url":"https://github.com/structured-world.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# structured-proxy\n\nUniversal, config-driven gRPC→REST transcoding proxy. One binary, different YAML configs — different products.\n\nWorks with **any** gRPC service via proto descriptor files. No code generation, no custom handlers — just configuration.\n\n## Features\n\n- **Dynamic REST routes** from proto descriptors using `google.api.http` annotations\n- **Auto-generated OpenAPI** documentation from proto messages\n- **Server-streaming** RPC → SSE/chunked HTTP responses\n- **Rate limiting (Shield)** — endpoint classification + per-identifier limiting via YAML\n- **JWT/OIDC validation** — route-level auth policies with JWKS auto-discovery\n- **Path aliasing** — configurable route remapping (e.g., `/oauth2/*` → `/v1/oauth2/*`)\n- **Maintenance mode** — 503 with configurable exempt paths\n- **Health endpoints** — `/health/live`, `/health/ready`, `/health/startup`\n- **Prometheus metrics** — `/metrics` endpoint\n- **Zero code changes** between services — same binary, different config\n\n## Quick Start\n\n```bash\n# Install\ncargo install structured-proxy\n\n# Run with your service config\nstructured-proxy --config my-service.yaml\n```\n\n## Configuration\n\n```yaml\n# my-service.yaml\nlisten: \"0.0.0.0:8080\"\n\nupstream:\n  address: \"http://127.0.0.1:50051\"\n\ndescriptor:\n  file: \"my-service.descriptor.bin\"\n  # OR: reflection: true\n\ncors:\n  allow_origins: [\"*\"]\n\n# Optional: path aliases\naliases:\n  - from: \"/api/v1/*\"\n    to: \"/my.package.v1.MyService/*\"\n\n# Optional: rate limiting\nshield:\n  enabled: true\n  default_rpm: 60\n  endpoints:\n    - pattern: \"/api/v1/heavy-*\"\n      rpm: 10\n      identifier: header:x-api-key\n```\n\nGenerate the descriptor file from your proto:\n\n```bash\nbuf build -o my-service.descriptor.bin\n# or\nprotoc --descriptor_set_out=my-service.descriptor.bin --include_imports *.proto\n```\n\n## Library Usage\n\n```rust\nuse structured_proxy::{ProxyConfig, build_proxy};\n\n#[tokio::main]\nasync fn main() -\u003e anyhow::Result\u003c()\u003e {\n    let config = ProxyConfig::from_file(\"my-service.yaml\")?;\n    let app = build_proxy(config).await?;\n\n    let listener = tokio::net::TcpListener::bind(\"0.0.0.0:8080\").await?;\n    axum::serve(listener, app).await?;\n    Ok(())\n}\n```\n\n## How It Works\n\n1. Load proto descriptor (file or gRPC reflection)\n2. Parse `google.api.http` annotations → generate REST routes\n3. Incoming HTTP request → transcode to gRPC (path params, query params, JSON body → protobuf)\n4. Forward to upstream gRPC service\n5. Response protobuf → transcode to JSON\n6. Serve OpenAPI spec at `/openapi.json`\n\n## Architecture\n\n```\nClient (HTTP/JSON)\n    │\n    ▼\n┌─────────────────────┐\n│  structured-proxy    │\n│                      │\n│  ┌────────────────┐  │\n│  │ Shield (rate)  │  │\n│  ├────────────────┤  │\n│  │ Auth (JWT)     │  │\n│  ├────────────────┤  │\n│  │ Transcoder     │  │  REST → gRPC\n│  │ (prost-reflect)│  │  JSON → Protobuf\n│  ├────────────────┤  │\n│  │ OpenAPI gen    │  │  /openapi.json\n│  └────────────────┘  │\n└─────────┬────────────┘\n          │ gRPC\n          ▼\n   Upstream Service\n```\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructured-world%2Fstructured-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstructured-world%2Fstructured-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructured-world%2Fstructured-proxy/lists"}