-
-
Notifications
You must be signed in to change notification settings - Fork 24
feat: ephemeral p2p chat #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I've been busy. Thoughts? |
|
I'll have a look at this in the morning, sounds awesome though! I've been a bit busy too: https://hypermind.gg |
Oh snap! Gonna test the chat in a bit |
|
That chat is stylish!! I'd like for the chat to open up like the map in #9 having an icon next to it, once either of these is merged I can work to make sure they both can be used in tandem without UI issues ❤️ |
| if (wasNew) { | ||
| this.diagnostics.increment("newPeersAdded"); | ||
| this.broadcastCallback(); | ||
| if (ENABLE_CHAT && this.chatSystemFn && hops === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could make the hops configurable too
that's awesome, good snag! |
|
Yeah, that map is a cool idea as well. Feel free to move anything around as needed. Cluttering the ui is the last thing we need. Big number go up = main feature lol |
|
ok @lklynet shall we merge the map first, then we can use the same modal system to enable the chat too, this way we don't re-invent the wheel twice. I really REALLY want to make the modals draggable so people can put them wherever they want on screen - bit like what I did a few years back with https://year-book.club (open any window) |
Yeah, that plan sounds solid. I'm going to be away from the computer for the rest of the weekend so it's in your hands lol. Good luck! |
- Enhance footer and debug element styling with better visibility - Increase map modal size and adjust marker appearance - Persist chat collapse state in localStorage and initialize on load
map updates heatmap without refresh
this would introduce a new, opt-in feature that turns the existing peer rotation logic into a unique chat experience.
So here is how it should work: Instead of a global chat, users can only communicate with their ~32 direct peer connections. Because the network topology constantly rotates to prevent islands, these connections change every ~30 seconds. This creates a chaotic, ephemeral chat room where users are constantly entering and leaving.
Ephemeral: No database and no history. Everything vanishes on refresh.
Restricted: Communication is strictly limited to current direct peers.
Anonymous: Users are identified by the last 4 characters of their Node ID.
Uses existing TCP sockets so no new ports or servers required.
Inbound Rate Limiting: Peers drop messages if they exceed 5 msgs / 10 sec.
Outbound Rate Limiting: UI prevents sending if limit is reached.
dentity Verification: Sender ID must match the socket's authenticated Peer ID.
Content Validation: Max 140 chars, string only.
Feature will be disabled by default. Enabled with ENABLE_CHAT=true .
Anyone want to double check this and make sure I'm not missing anything.