Skip to content

Draft v0 spec: shared presence over WebSocket - #1

Merged
RalfLeonFasler merged 4 commits into
mainfrom
spec-v0-draft
Nov 6, 2026
Merged

RalfLeonFasler merged 4 commits into
mainfrom
spec-v0-draft

Conversation

@RalfLeonFasler

Copy link
Copy Markdown
Contributor

Summary

First draft of the v0 protocol: shared presence on routes, over one WebSocket per app (wss://<host>/v0). Each app keeps its own physics and reports its riders' positions; the server relays them to the other apps.

  • spec/v0.md: the specification (connection, routes, app IDs, messages, errors, /v0/stats, limits, privacy)
  • routes/velodrome-250.json: the first shared route, a flat 250 m loop
  • schemas/: JSON Schemas for route files, app messages, server messages and stats
  • examples/: every JSON example in the spec as a file, plus invalid app messages named <error code>--<description>.json. The reference server tests against these.
  • apps.md: optional list of app IDs (no registration needed; IDs are self-declared)
  • tools/validate.py + CI: checks routes, schemas, examples, and that the spec's JSON blocks match the example files

Test plan

  • python3 tools/validate.py exits 0
  • Mutations caught: a loop route with mismatched elevations, an invalid example made valid, a spec block that differs from its example file
  • The reference server (OpenBikeNet/server, branch design-v0) passes its tests against these examples

🤖 Generated with Claude Code

RalfLeonFasler and others added 4 commits November 6, 2026 13:32
Defines the connection, the 1D route format with velodrome-250 as the
first route, join/update/leave messages, self-declared app IDs and public
usage statistics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RalfLeonFasler
RalfLeonFasler merged commit 0613cf7 into main Nov 6, 2026
1 check passed
@RalfLeonFasler
RalfLeonFasler deleted the spec-v0-draft branch November 6, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant