{"id":30104944,"url":"https://github.com/sh13y/secure-chat","last_synced_at":"2026-05-02T10:43:27.110Z","repository":{"id":307441767,"uuid":"1029456429","full_name":"sh13y/Secure-Chat","owner":"sh13y","description":"A real-time secure chat application with end-to-end encryption built with TypeScript, React, Node.js, and MongoDB","archived":false,"fork":false,"pushed_at":"2025-07-31T07:03:34.000Z","size":690,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T10:14:56.841Z","etag":null,"topics":["chat-application","encryption","jwt","mongodb","nodejs","react","real-time","secure-chat","typescript","websocket"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sh13y.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-31T04:47:24.000Z","updated_at":"2025-07-31T07:03:38.000Z","dependencies_parsed_at":"2025-07-31T10:25:45.648Z","dependency_job_id":null,"html_url":"https://github.com/sh13y/Secure-Chat","commit_stats":null,"previous_names":["sh13y/secure-chat"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sh13y/Secure-Chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sh13y%2FSecure-Chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sh13y%2FSecure-Chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sh13y%2FSecure-Chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sh13y%2FSecure-Chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sh13y","download_url":"https://codeload.github.com/sh13y/Secure-Chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sh13y%2FSecure-Chat/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269649994,"owners_count":24453574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat-application","encryption","jwt","mongodb","nodejs","react","real-time","secure-chat","typescript","websocket"],"created_at":"2025-08-09T23:16:55.949Z","updated_at":"2026-05-02T10:43:27.072Z","avatar_url":"https://github.com/sh13y.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Secure Chat: The 13% Complete Edition 🚀\n\nA real-time chat application with end-to-end encryption. Because your messages deserve to be as secure as a secret spy dossier, not a sticky note on the fridge.\n\n\u003e **Project Status:** Currently hibernating while I battle the final boss-my degree. This project is about 13% done, which in developer years is basically a full season of a TV show. I’ll be back when my professors release me from academic captivity, whichever comes first\\!\n\n-----\n\n### Inspiration\n\nEver watched \"Day of The Jackal\" and thought, \"Hey, those USB-based encrypted chats look cool?\" Well, same here\\! While I can't guarantee this app will help you in international espionage (and I legally have to advise against that), it's my humble attempt at creating something similar. Just remember: with great encryption comes great responsibility... and occasionally forgotten passwords.\n\n*Disclaimer: No jackals were harmed in the making of this chat app. 🦊*\n\n-----\n\n### Features\n\n  - User registration and authentication with **JWT** (because we need to know who you are before you start sending encrypted messages).\n  - Real-time messaging using **WebSockets** (no more refreshing the page to see if someone replied).\n  - End-to-end message encryption (so only you and the recipient can read the messages).\n  - Message read status tracking (for when you need to know if you're being ignored).\n  - Unread message counter (for when you're popular but too busy to reply).\n  - Delete messages and entire chat conversations (because some things are better left unsaid).\n  - User search functionality (to find your chat buddy in the wild).\n  - **MongoDB** integration for message persistence (your secrets are safe, even if you close the app).\n  - CORS enabled (so the frontend and backend can be friends).\n\n-----\n\n### Tech Stack\n\n  - **Frontend:** React (TypeScript) - Because who doesn't love strongly-typed code?\n  - **Backend:** Node.js with Express - The backbone of our secret communication service.\n  - **WebSocket:** `ws` library - The magic that makes it all real-time.\n  - **Database:** MongoDB - Where all the secrets are stored (securely, of course).\n  - **Authentication:** JWT - Our bouncer for the secure club.\n  - **Encryption:** A custom encryption service - Because why use an off-the-shelf solution when you can build your own?\n\n-----\n\n### Demo\n\nThis is what a top-secret chat app looks like when you're not an international spy.\n\n#### Register Page\n\n![Register Page](assets/Screenshot%202025-07-31%20112856.png)\n\n\n#### Sample Chat (Two Users)\n\nThe application supports real-time conversations between users with encrypted message delivery:\n\n**User Perspective 1:**\n![Chat User 1](assets/Screenshot%202025-07-31%20112350.png)\n\n**User Perspective 2:**  \n![Chat User 2](assets/Screenshot%202025-07-31%20112620.png)\n\n-----\n\n### Getting Started\n\nTo get this whole operation running on your local machine, follow these highly classified steps.\n\n1.  **Clone the repository:**\n    `git clone https://github.com/sh13y/Secure-Chat.git`\n2.  **Install dependencies:**\n    `npm install`\n3.  **Set up environment variables:** Create a `.env` file with the following, and fill in the blanks like you're cracking a code.\n\n\u003c!-- end list --\u003e\n\n```\nPORT=3001\nMONGODB_URI=your_mongodb_connection_string\nJWT_SECRET=your_jwt_secret\n```\n\n#### MongoDB Atlas Setup\n\n  - **Create a MongoDB Atlas account** at [mongodb.com/atlas](https://mongodb.com/atlas).\n  - **Create a new cluster** (the free tier is plenty for your clandestine needs).\n  - **Set up database access:** Create a user with read/write permissions.\n  - **Set up network access:** Add your current IP address. (Or use `0.0.0.0/0` for all IPs, but that's like leaving the front door unlocked. Not recommended for a \"secure\" chat app.)\n  - **Get your connection string:** Copy the string and replace `\u003cusername\u003e`, `\u003cpassword\u003e`, and `\u003cdatabase-name\u003e` with your details.\n\n**Example connection string format:**\n`mongodb+srv://username:password@cluster.aslazkn.mongodb.net/secure_chat?retryWrites=true\u0026w=majority`\n\n-----\n\n### Recent Updates (The Grand Return\\!)\n\nAfter a brief hibernation, I've re-emerged to squash some bugs and make this a smoother ride.\n\n#### 🔧 Live Message Updating Fixed\\!\n\nI've identified and fixed the issues with live message updating in your Secure Chat application. Now messages will appear instantly for both the sender and receiver.\n\n**🐛 Issues Found \u0026 Fixed:**\n\n  - **Duplicate `useEffect` Hooks:** There were two identical WebSocket `useEffect` hooks fighting each other. I've consolidated them into a single, improved WebSocket handler.\n  - **Server Not Broadcasting to Sender:** The server was only sending messages to the receiver, not back to the sender for immediate display. I've updated the server to send messages to both parties.\n  - **Restrictive Message Display Condition:** The client's condition for displaying messages was too picky. I've updated it to include `data.senderId === currentUser` so your sent messages appear instantly, not after a secret squirrel dance.\n\n**✨ Improvements Made:**\n\n  - **Single WebSocket Connection:** One hook to rule them all.\n  - **Better Message Handling:** The message display conditions are now more welcoming.\n  - **Immediate Feedback:** You'll see your message appear instantly.\n  - **Enhanced Logging:** Added detailed console logs for debugging future issues (for when things inevitably go wrong again).\n\nNow, go ahead and send some messages. They'll pop up in real-time, just like magic\\! ✨\n\n-----\n\n### Future Improvements (The Roadmap to 100%)\n\nThis is just the beginning. I've got a whole list of upgrades planned for when I'm not drowning in academic texts.\n\n  - Enhanced UI/UX (because a good spy app should look cool).\n  - File sharing capabilities (for sharing top-secret memes).\n  - Group chat functionality (for spy teams and family reunions).\n  - Message editing (for when you make a typo in a classified message).\n  - Mobile responsiveness (for on-the-go espionage).\n\n-----\n\n### Project Structure\n\n```\nsrc/\n├── server/\n│   ├── index.ts         # Main server file\n│   └── models/\n│       └── User.js      # User model\n├── shared/\n│   ├── types.ts         # Shared type definitions\n│   └── encryption.ts    # Encryption service\n```\n\n-----\n\n### License\n\n**WTFPL** - Do What The F\\*ck You Want To Public License. Go wild.\n\n### Author\n\n**sh13y** - Full-Stack copy-cat, part-time student, full-time dreamer, occasional code whisperer\n\n*Note: This is a fun development project and not intended for production use in its current state. Also, definitely not approved by any secret intelligence agencies... or is it? 🕵️‍♂️*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh13y%2Fsecure-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsh13y%2Fsecure-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsh13y%2Fsecure-chat/lists"}