Skip to content

docs: expand the chat room into an application workflow #113

Description

@electrohyun

Location

Expand the existing examples/chat-room application in this repository. Keep it linked from the root README and documented by its own README.

Problem

examples/chat-room is runnable and continuously exercised by CI, but it demonstrates only one room, two clients, and one broadcast.

It does not yet show how Smocket's capabilities fit together in an application workflow. A reader can confirm that the minimal routing example works, but cannot use it to understand how rooms, acknowledgements, targeted delivery, participant roles, and disconnect handling are combined in application code.

The conformance suite remains the source of truth for Socket.IO behavior. This example has a different purpose: showing how already-verified capabilities are used together in an application that remains small enough to read and maintain.

Scope

Expand the existing chat room instead of adding a separate larger example.

The strengthened workflow should exercise application-relevant combinations such as:

  • multiple rooms or channels;
  • more than one broadcast form;
  • acknowledgements for deterministic application flow;
  • delivery to a particular socket;
  • disconnect handling;
  • asymmetric participant roles where the scenario benefits from them.

The exact workflow may be refined during implementation. Each capability should serve the application scenario rather than be added only to reproduce conformance coverage.

The example continues to consume smocket through workspace:* and remains the source-under-review example run by this repository's CI.

Boundaries

This issue does not decide where an independent downstream consumer lives or how it installs a published package. That work belongs to #208.

The application scenario may later be reused by #208 for downstream validation and by #218 for a public case study. Neither issue determines the design or completion of this example.

If the application reveals an unverified or mismatched Socket.IO behavior, that behavior must be measured against real Socket.IO and added to the dual-run conformance suite before the example relies on it as a compatibility guarantee.

Completion

  • The strengthened chat room runs from a clean checkout with pnpm example:chat-room.
  • The example remains backed by smocket: workspace:* and runs against the source under review.
  • CI executes the same application code on every push to main and every pull request.
  • The workflow demonstrates multiple Smocket capabilities as one coherent application scenario.
  • The output or application tests are deterministic.
  • examples/chat-room/README.md explains the workflow and the Smocket APIs it uses.
  • The root README continues to link to the example.
  • The example does not claim compatibility beyond behavior verified by the dual-run conformance suite.
  • pnpm format:check passes.

examples/ remains outside the published package because the package allowlist is files: ["dist"].

Related: #208, #213, #218.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions