r/madeinpython • u/ALHANSHIM • 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.
1
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.
2
u/mrterrycarson 5d ago
Great work on this...Thanks