Skip to content

useWebSocket defaults to port 8000 while the backend runs on 6003 #1627

Closed

Description

@yusuftomilola

Problem

hooks/useWebSocket.ts connects to process.env.NEXT_PUBLIC_WS_URL || 'http://localhost:8000', but the API (and its socket.io gateway) listens on 6003 by default. Without an undocumented env var the hook fails to connect, and the hook is not used by any page, so the real-time pipeline has never run end to end.

Proposed change

Derive the default from NEXT_PUBLIC_API_URL's origin, pass the access token in the handshake (the gateway requires auth), and subscribe to the notification events in a provider so queries invalidate on server events.

Acceptance criteria

  • A new notification appears without a page refresh against a local backend.

Activity

  1. aduagba4133 commented on Oct 17, 2026

    @aduagba4133

    @aduagba4133 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Kindly assign it to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @aduagba4133 to this issue.

  2. devzakari-sketch commented on Oct 17, 2026

    @devzakari-sketch
    Contributor

    @devzakari-sketch has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi maintainer, i can handle this for you

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @devzakari-sketch to this issue.

  3. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @devzakari-sketch! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @devzakari-sketch: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @devzakari-sketch's PR #1689 was approved and merged by @yusuftomilola.

    🏆 @devzakari-sketch: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (888 total points). Track your full progress on GrantFox.

    👏 Great work, @devzakari-sketch! Keep contributing to DistinctCodes.

  5. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @devzakari-sketch as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @devzakari-sketch: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions