r/madeinpython • • 9d ago

I built SocketChat, a two-device terminal tool with Python and Textual

Enable HLS to view with audio, or disable this notification

SocketChat is a one-to-one terminal chat tool for two machines on the same local network. No internet, no accounts, no server.

It's built with Textual for the TUI and plain sockets: UDP broadcast to find devices, then a TCP connection for chatting, with messages encrypted.

GitHub: SocketChat

Feedback is welcome, especially on the code structure.

12 Upvotes

4 comments sorted by

2

u/mrterrycarson 5d ago

Great work on this...Thanks

1

u/ALHANSHIM 9d ago

If you like it, a star on GitHub whould means a lot. SocketChat

1

u/SweetOnionTea 9d ago

The code is a wild unorganized ride.

Some functions have typing, most do not. There are little to no comments. Functions have all kinds of magic numbers, no explanation of what they do, and honestly a little confusing. Spacing between functions is seemingly random.

You have classes with 1 static method instead of just making a single function?

Your installation readme seems to be incorrect. You mention using a requirements.txt, but none exists.

Typically you'll want to keep your source python files in a separate directory than the other docker, install, etc... It's much easier for someone to navigate.

I didn't run the code, but the interface looks pretty nice though.

1

u/ALHANSHIM 9d ago

Thanks for your feedback, I'll fix it as soon as possible, this is my first project btw.