Socket ChatApp was built as a fun side project to chat privately with a group of friends at work — for the kind of conversations that don’t really fit on Teams or Slack.
The goal wasn’t to build another enterprise messaging tool, but something simple, private, and fast, inspired by early internet forum and chat sites.
Think late-90s aesthetics, modern sockets, and just enough features to get the job done.
- ⚡ Real-time Magic: Powered by WebSockets for instant gratification. No refreshing required!
- 👥 Group Hangouts: Create or join rooms. Perfect for your squad, your team, or your niche hobby group.
- 🤫 Secret DMs: One-on-one private messaging because some things aren't for the group chat.
- 📣 "Hey You!" Mentions: Tag your friends with
@usernameto make sure they see your message. - 🔔 Never Miss a Beat: Real-time notifications for mentions and new messages.
| Component | Technology | Why we love it |
|---|---|---|
| Backend | Python / Flask | Fast, flexible, and fun. |
| Real-time | Flask-SocketIO | The magic engine behind the instant chat. |
| Database | SQLAlchemy / SQLite | Reliable data storage for all your memories. |
| Frontend | HTML5 / CSS3 / JS | Retro 90s vibes meets modern ES6+ logic. |
Ready to jump in? Follow these steps and you'll be chatting in no time.
git clone https://github.com/chiragx16/Socket_ChatApp.git
cd Socket_ChatApp
Create a virtual environment to keep things tidy:
python -m venv venvInstall the necessary dependencies:
pip install -r requirements.txt
Copy the template and add your secret sauce:
cp .env.example .env
# Open .env and add your SECRET_KEY!
Launch the engine with a single command:
python app.py
Fire up your browser and head to http://localhost:7812.
Pro Tip: If you want that extra layer of security, run
python generate_certi.pyfirst to enable HTTPS!
The app is configured to run on 0.0.0.0, meaning it broadcasts to your local machine and anyone on your same Wi-Fi/Office network.
Example: When you launch the app, you’ll see something like this
- Local:
http://127.0.0.1:7812 - Network:
http://<your-local-LAN-IP>:7812(Your friends use this one!)
Modern browsers are strict! To use Windows Desktop Notifications, the browser requires a Secure Context (HTTPS).
- Option A: Full Experience (With Notifications) You must generate a certificate and enable SSL in
app.py.
# Generate your certi first: python generate_certi.py
ssl_context = ('cert.pem', 'key.pem')
socketio.run(app, host="0.0.0.0", port=port, debug=True, ssl_context=ssl_context)- Option B: Simple Mode (No Notifications) If you don't need pop-up alerts, just run standard HTTP:
socketio.run(app, host="0.0.0.0", port=port, debug=True)GET /- Main chat interfaceGET /api/messages- Retrieve chat messagesGET /api/room_users- Get users in a roomGET /api/notifications- Get user notificationsPOST /api/notifications/read- Mark notifications as read
connect- Establish connectionregister- Register usernamejoin_room- Join a chat roomleave_room- Leave a chat roomsend_message- Send a messagemark_read- Mark messages as readdisconnect- Close connection
connected- Connection establishedregistered- Username registeredroom_joined- Successfully joined roomroom_left- Successfully left roommessage- New message receivedroom_users_update- Room user list updatedmention_notification- User mentioned notificationnotification_update- Notification count updateread_receipt- Messages marked as readerror- Error message
Got a cool idea for a new retro feature? We'd love to see it!
- Fork the repo.
- Create a Feature Branch.
- Commit your magic.
- Open a Pull Request.
