So hereโs the thing: I wanted to apply for a Java internship.
But I had a problem.
๐ I had literally zero Java projects.
So like any rational dev in a crunch, I built a full 1-on-1 chat app in Java โ in a single night โ using:
- Raw sockets ๐งต
- MySQL via JDBC ๐พ
- A UI built with... Swing (yes, I suffered)
๐ฌ How It Works
Itโs a basic 1-on-1 chat system:
- One client sends a message
- Server catches it
- Stores it in MySQL
- Relays it to the other client
- Repeat until one of them rage quits
I tested it with two terminals pretending to be people. Worked fine.
(Wasn't weird. Youโre weird.)
๐ง What Broke My Brain
Two things:
- Swing UI โ now I understand why no one uses it in 2025
- Message storing โ I had the DB, I had the connection, but somehow chat history just would not cooperate
๐งช What Iโd Improve (If I Had Time or Sanity)
- Add a homepage to select/chat with users
- Group chat support (so it feels more like WhatsApp and less like Notepad wars)
- Possibly deploy it โ but lol
๐งฑ Tech Stack
- Java
- MySQL
- JDBC
- Java Sockets (multithreaded)
- Java Swing (regrettably)
๐ github.com/Zenoguy/ChatApp-Java
Forked from a tutorial by Code for Interview, but heavily modified โ I added:
- Message persistence
- UI wiring
- DB syncing
- Tons of tweaks, logs, and near-tears
๐ง Final Thoughts
Was it a mess? Yes.
Did I learn Java networking, JDBC, and that Swing is cursed? Also yes.
Would I do it again?
Probably. But next time, with JavaFX. Or better yet... not Java.
If you're building something similar, feel free to use the repo โ or just laugh at my struggle.
And if youโve got tips for improving the UI or DB layer, drop them below ๐


Top comments (0)