luckyframework / luckyframework/lucky

Feature Request: Add out-of-the-box support for websockets

Open
#554 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Crystal
Stars
2.7k
Forks
172
PR merge metrics
No merged PRs in 30d

Description

For anyone that comes looking for websocket support, you can dive in to the built in websocket support for now.

https://gitter.im/luckyframework/Lobby?at=5b5a51a61be9bb57bcc749bd

However, this is obviously something we should support out of the box with Lucky. I've never actually used websockets, so I don't know if they use HTTP methods or not, but looking at Kemal docs I would assume something like

class SomeAction < WebsocketAction
  route "/" do
    # maybe context.on_message
    # or have access to socket.on_message here?
  end
end

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Crystal's built-in HTTP::WebSocket support and the linked Kemal websocket documentation. The issue suggests a WebsocketAction with routing, but does not define the API, affected files, tests, or acceptance criteria; completion would require agreeing on that integration and verifying it with websocket behavior tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
crystal
Domain
backend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.