Commit Graph
6 Commits
Author SHA1 Message Date
Manuel Raynaud 27f76fcf68 ♻️(backend) take adavantage of yhub 0.5.0 json encoding returns
The version 0.5.0 can manage response format by using accept and
content-type headers. In python we can't use for now the lib0 decoder so
we have to use the json format. When the lib0 decoder will be available
in pycrdt we will use it. So we can now use directly the /ydoc api to
fetch a document content instead the custom api made for this.
2026-08-12 16:45:50 +02:00
Manuel Raynaud a7852a20de (collaboration) notify the backend when the worker persists new content
notify the backend when the worker persists new content for
a document, so the lists ordered by `updated_at` follow the edits made on the
collaboration server. The backend serves it on
`POST /api/v1.0/documents/{id}/content-updated/`, authenticated with a short
lived RS256 JWT the collaboration server signs (`aud: "docs-backend"`) and
the backend verifies against the JWKS the collaboration server publishes on
`/collaboration/jwks/v1` — the mirror of the admin token the backend signs to
call it, so no long lived secret is shared and either side can roll its key
on its own
2026-08-12 16:45:49 +02:00
Manuel Raynaud 99e9b59e56 (collaboration) add a get-ydoc endpoint on yhub
`GET /collaboration/get-ydoc/v1/docs/{id}` answers the current Yjs state of a
document as a raw binary update, the read counterpart of create-ydoc, and
204 when the document has no content yet
2026-08-12 16:45:48 +02:00
Manuel Raynaud bd811531fe (backend) implement reset-connections and create-ydoc in YHubService
The reset-connections and create-ydoc are the first action we want to
implement in the YHubService. They will be used in next commits.
2026-08-12 16:45:47 +02:00
Manuel Raynaud 09ea0213b4 ♻️(backend) audience is an enum to be used by the JWTService
To ease the use of the audience with the JWTService, we choose to create
an enum holding all the possible values and then use them in the Yhub
and Y-converter services.
2026-08-12 16:45:46 +02:00
Manuel Raynaud 5845ad8a03 (backend) add a service to call the yhub REST API
The backend application will have to call the yhub REST API for some
operations. We want to use a dedicated service to do that. This first
commit introduces the shape of this service, it only does the
configuration for now, calling actions will be implemented later.
2026-08-12 16:45:46 +02:00