Skip to content

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.

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
  • 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 GET responses carry Cache-Control headers (typically public, max-age=60 for anonymous callers and private, max-age=15 for authenticated ones). Respect them in your client.
  • Unknown routes return 502 rather than 404. Treat any 5xx on an unexpected path as “route does not exist”.