{"id":49885278,"url":"https://github.com/sugamghising/chatapp","last_synced_at":"2026-05-15T18:03:12.733Z","repository":{"id":322085036,"uuid":"1088149955","full_name":"sugamghising/ChatApp","owner":"sugamghising","description":"A full-stack real-time chat application built with React, TypeScript, Node.js, Express, MongoDB, and Socket.IO.","archived":false,"fork":false,"pushed_at":"2025-11-02T12:59:44.000Z","size":218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-02T14:30:09.337Z","etag":null,"topics":["chatapplication","real-time","socket-io"],"latest_commit_sha":null,"homepage":"https://chat-app-frontend-lac-zeta.vercel.app/","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/sugamghising.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-02T12:17:31.000Z","updated_at":"2025-11-02T13:04:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sugamghising/ChatApp","commit_stats":null,"previous_names":["sugamghising/chatapp"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/sugamghising/ChatApp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugamghising%2FChatApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugamghising%2FChatApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugamghising%2FChatApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugamghising%2FChatApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sugamghising","download_url":"https://codeload.github.com/sugamghising/ChatApp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugamghising%2FChatApp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33074399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["chatapplication","real-time","socket-io"],"created_at":"2026-05-15T18:03:07.503Z","updated_at":"2026-05-15T18:03:12.726Z","avatar_url":"https://github.com/sugamghising.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💬 ChatApp - Real-Time Chat Application\n\nA full-stack real-time chat application built with React, TypeScript, Node.js, Express, MongoDB, and Socket.IO.\n\n## ✨ Features\n\n- 🔐 **JWT Authentication** - Secure login and signup\n- 💬 **Real-Time Messaging** - Instant message delivery via Socket.IO\n- 📷 **Image Upload** - Send images in chat (Cloudinary)\n- 👥 **Online Status** - See who's online with green indicators\n- 🔔 **Unseen Message Counts** - Red badges show unread messages\n- ✅ **Message Status** - Seen/unseen indicators (✓/✓✓)\n- 👤 **Profile Management** - Edit name, bio, and profile picture\n- 📱 **Responsive Design** - Works seamlessly on mobile and desktop\n- 🎨 **Modern UI** - WhatsApp/Messenger-style interface\n\n## 🛠️ Tech Stack\n\n### Frontend\n\n- **React 19** - UI framework\n- **TypeScript** - Type safety\n- **Tailwind CSS** - Styling\n- **Socket.IO Client** - Real-time communication\n- **Zustand** - State management\n- **React Router** - Navigation\n- **Axios** - HTTP requests\n- **React Hot Toast** - Notifications\n- **Lucide React** - Icons\n\n### Backend\n\n- **Node.js** - Runtime environment\n- **Express** - Web framework\n- **TypeScript** - Type safety\n- **MongoDB** - Database\n- **Mongoose** - ODM\n- **Socket.IO** - Real-time communication\n- **JWT** - Authentication\n- **Cloudinary** - Image storage\n- **bcryptjs** - Password hashing\n\n## 📋 Prerequisites\n\n- Node.js (v16 or higher)\n- npm or yarn\n- MongoDB Atlas account (or local MongoDB)\n- Cloudinary account (for image uploads)\n\n## 🚀 Installation\n\n### 1. Clone the repository\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd ChatApp\n```\n\n### 2. Install Backend Dependencies\n\n```bash\ncd server\nnpm install\n```\n\n### 3. Install Frontend Dependencies\n\n```bash\ncd ../client\nnpm install\n```\n\n### 4. Configure Environment Variables\n\n#### Backend (.env in server folder)\n\nCreate a `server/.env` file:\n\n```env\nMONGODB_URI=your_mongodb_connection_string\nPORT=5000\nJWT_SECRET=your_jwt_secret_key\n\nCLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name\nCLOUDINARY_API_KEY=your_cloudinary_api_key\nCLOUDINARY_API_SECRET=your_cloudinary_api_secret\n```\n\n#### Frontend (.env in client folder)\n\nCreate a `client/.env` file:\n\n```env\nREACT_APP_API_URL=http://localhost:5000\n```\n\n### 5. Start the Application\n\n#### Start Backend (Terminal 1)\n\n```bash\ncd server\nnpm run dev\n```\n\nBackend will run on `http://localhost:5000`\n\n#### Start Frontend (Terminal 2)\n\n```bash\ncd client\nnpm start\n```\n\nFrontend will open on `http://localhost:3000`\n\n## 📁 Project Structure\n\n```\nChatApp/\n├── server/                  # Backend (Node.js + Express)\n│   ├── src/\n│   │   ├── config/         # Database configuration\n│   │   ├── controller/     # Route controllers\n│   │   ├── middleware/     # Auth middleware\n│   │   ├── models/         # Mongoose models\n│   │   ├── routes/         # API routes\n│   │   ├── types/          # TypeScript types\n│   │   ├── utils/          # Utilities (JWT, Cloudinary)\n│   │   └── index.ts        # Entry point\n│   ├── .env                # Environment variables\n│   ├── package.json\n│   └── tsconfig.json\n│\n└── client/                 # Frontend (React + TypeScript)\n    ├── src/\n    │   ├── components/     # React components\n    │   ├── pages/          # Page components\n    │   ├── store/          # Zustand stores\n    │   ├── config/         # API configuration\n    │   ├── lib/            # Socket.IO setup\n    │   ├── types/          # TypeScript interfaces\n    │   ├── utils/          # Utility functions\n    │   ├── App.tsx         # Main app component\n    │   └── index.tsx       # Entry point\n    ├── public/\n    ├── .env                # Environment variables\n    ├── package.json\n    ├── tailwind.config.js\n    └── tsconfig.json\n```\n\n## 🔌 API Endpoints\n\n### Authentication\n\n- `POST /api/auth/signup` - Register new user\n- `POST /api/auth/login` - Login user\n- `GET /api/auth/check` - Verify authentication\n- `PUT /api/auth/update-profile` - Update user profile\n\n### Messages\n\n- `GET /api/messages/users` - Get all users with unseen counts\n- `GET /api/messages/:id` - Get messages with specific user\n- `POST /api/messages/send/:id` - Send message to user\n- `PUT /api/messages/mark/:id` - Mark message as seen\n\n## 🔄 Socket.IO Events\n\n### Client → Server\n\n- `connect` - Connect with userId in query\n\n### Server → Client\n\n- `getOnlineUsers` - List of online user IDs\n- `newMessage` - New message received\n\n## 🎨 Color Theme\n\n- Sidebar Background: `#6A89A7`\n- Sent Messages: `#BDDDFC`\n- Received Messages: `#88BDF2`\n- Dark Background: `#384959`\n\n## 📝 Usage\n\n1. **Sign Up**: Create a new account with full name, email, password, and bio\n2. **Login**: Use your credentials to login\n3. **Select User**: Click on a user from the sidebar to start chatting\n4. **Send Messages**: Type text or upload images to send\n5. **Real-Time**: Messages appear instantly for both users\n6. **Edit Profile**: Click settings icon to update your profile\n\n## 🐛 Troubleshooting\n\n### Backend won't start\n\n- Check if MongoDB connection string is correct\n- Ensure port 5000 is not in use\n- Verify all environment variables are set\n\n### Frontend can't connect to backend\n\n- Make sure backend is running on port 5000\n- Check `client/src/config/api.ts` has correct API_URL\n- Verify CORS is enabled in backend\n\n### Images won't upload\n\n- Verify Cloudinary credentials in `.env`\n- Check image size is under 4MB\n- Ensure Cloudinary account is active\n\n### Socket.IO not connecting\n\n- Verify backend server is using `server.listen()` not `app.listen()`\n- Check browser console for connection errors\n- Ensure userId is passed in socket connection\n\n## 🚀 Deployment\n\n### Backend (Heroku/Railway/Render)\n\n1. Set environment variables on hosting platform\n2. Deploy backend code\n3. Update frontend API_URL to deployed backend URL\n\n### Frontend (Vercel/Netlify)\n\n1. Update `client/src/config/api.ts` with production backend URL\n2. Build: `npm run build`\n3. Deploy `build/` folder\n\n## 📄 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome!\n\n## 👨‍💻 Author\n\n**Your Name**\n\n- GitHub: [@sugamghising](https://github.com/sugamghising)\n\n## 🙏 Acknowledgments\n\n- React Team for React\n- Tailwind CSS for the styling framework\n- Socket.IO for real-time communication\n- Cloudinary for image hosting\n\n---\n\n**Happy Chatting! 💬✨**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugamghising%2Fchatapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsugamghising%2Fchatapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugamghising%2Fchatapp/lists"}