Lupyd Server overview
The Lupyd Server (lupyd-rust-server) is the REST backend for Lupyd’s social
features: user profiles, the social graph (follow, block, accept), posts and replies,
votes, saved posts, reports, trending hashtags, and notifications.
It is written in Rust on hyper 1.x with a Tokio runtime and serves both HTTP/1.1 and HTTP/2 (cleartext h2c). PostgreSQL is its only datastore.
At a glance
Section titled “At a glance”| Protocol | HTTP/1.1 and HTTP/2 |
| Encoding | Protocol Buffers request and response bodies |
| Authentication | Authorization: Bearer <JWT> issued by Auth0 — see Authentication |
| IDs | ULIDs as strings in URLs, 16 raw bytes in protobuf |
| CORS | Access-Control-Allow-Origin: * on every response |
| Request timeout | 2 seconds (then 408 Request Timeout) |
| Default port | 39201 |
Conventions
Section titled “Conventions”- Bodies are protobuf, not JSON. Encode requests with the message named in the
API reference and decode responses the same way.
Some responses set
Content-Type: application/x-protobuf; proto=<message>. - Lists in query strings are comma-separated, with the comma URL-encoded as
%2C(for example?users=alice%2Cbob). - Caching: public
GETresponses carryCache-Controlheaders (typicallypublic, max-age=60for anonymous callers andprivate, max-age=15for authenticated ones). Respect them in your client. - Unknown routes return
502rather than404. Treat any5xxon an unexpected path as “route does not exist”.
AuthenticationAuth0 JWTs and permission bits.
API referenceEvery endpoint, parameter, and response.
Data typesProtobuf messages and bitmasks.
Self-hostingBuild, configure, and run the server.