{"id":26234540,"url":"https://github.com/abhishek-k-git/soulmegle","last_synced_at":"2026-04-01T23:01:54.866Z","repository":{"id":280593668,"uuid":"942500942","full_name":"Abhishek-k-git/soulmegle","owner":"Abhishek-k-git","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T14:05:07.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-28T00:42:42.532Z","etag":null,"topics":["expressjs","flask","html","nodejs","numpy","python3","reactjs","scikit-learn","socket","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Abhishek-k-git.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-03-04T07:48:38.000Z","updated_at":"2026-03-20T06:02:26.000Z","dependencies_parsed_at":"2025-03-04T09:24:45.471Z","dependency_job_id":"eb315373-14cf-4596-b538-fd3814f9eb67","html_url":"https://github.com/Abhishek-k-git/soulmegle","commit_stats":null,"previous_names":["abhishek-k-git/soulmegle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Abhishek-k-git/soulmegle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhishek-k-git%2Fsoulmegle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhishek-k-git%2Fsoulmegle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhishek-k-git%2Fsoulmegle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhishek-k-git%2Fsoulmegle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Abhishek-k-git","download_url":"https://codeload.github.com/Abhishek-k-git/soulmegle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Abhishek-k-git%2Fsoulmegle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: 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":["expressjs","flask","html","nodejs","numpy","python3","reactjs","scikit-learn","socket","tailwindcss"],"created_at":"2025-03-13T02:19:07.315Z","updated_at":"2026-04-01T23:01:54.844Z","avatar_url":"https://github.com/Abhishek-k-git.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# soulmegle - Real-time Chat Application\n\nsoulmegle is a modern web application that enables real-time chat communication between users based on their interests. The application uses an intelligent matching algorithm to pair users with similar interests for meaningful conversations.\n\n## Project Architecture\n\nThe project is divided into four main services:\n\n-  **Frontend**: React-based web interface (Port 3000)\n-  **Backend**: Express.js REST API server (Port 5000)\n-  **Socket**: Socket.io server for real-time communication (Port 5002)\n-  **Matching**: Python Flask service for user matching algorithm (Port 5001)\n\n## Technology Stack\n\n### Frontend\n\n-  React 19.0.0\n-  Vite 6.1.0\n-  Socket.io-client 4.8.1\n-  TailwindCSS 4.0.8\n-  Redux Toolkit for state management\n\n### Backend\n\n-  Express.js 4.18.2\n-  MongoDB with Mongoose 8.0.3\n-  JWT for authentication\n-  Socket.io 4.7.2\n\n### Socket Service\n\n-  Node.js with Express\n-  Socket.io 4.7.2\n-  Axios for HTTP requests\n\n### Matching Service\n\n-  Flask 3.1.0\n-  NumPy 2.2.3\n-  Scikit-learn 1.6.1\n-  Flask-CORS 5.0.0\n\n## Setup Instructions\n\n### Prerequisites\n\n-  Node.js (v16 or higher)\n-  Python 3.8 or higher\n-  MongoDB installed and running\n\n### Environment Setup\n\n1. Clone the repository:\n\n```bash\ngit clone \u003crepository-url\u003e\ncd soulmegle\n```\n\n2. Set up environment variables:\n   Create .env files in each service directory with the following variables:\n\n**Frontend (.env)**\n\n```\nVITE_SOCKET_SERVICE_URL=http://localhost:5002\nVITE_BACKEND_SERVICE_URL=http://localhost:5000\n```\n\n**Backend (.env)**\n\n```\nPORT=5000\nMONGODB_URI=mongodb://localhost:27017/soulmegle\nJWT_SECRET=your_jwt_secret\nCORS_ORIGIN=http://localhost:3000\n```\n\n**Socket (.env)**\n\n```\nPORT=5002\nFRONTEND_SERVICE_URL=http://localhost:3000\nMATCHING_SERVICE_URL=http://localhost:5001\n```\n\n**Matching (.env)**\n\n```\nPORT=5001\nHOST=0.0.0.0\nSOCKET_SERVICE_URL=http://localhost:5002\n```\n\n### Installation\n\n1. **Frontend Setup**\n\n```bash\ncd frontend\nnpm install\nnpm run dev\n```\n\n2. **Backend Setup**\n\n```bash\ncd backend\nnpm install\nnpm run dev\n```\n\n3. **Socket Service Setup**\n\n```bash\ncd socket\nnpm install\nnpm run dev\n```\n\n4. **Matching Service Setup**\n\n```bash\ncd matching\npython -m venv venv\nsource venv/bin/activate  # On Windows: .\\venv\\Scripts\\activate\npip install -r requirements.txt\npython app.py\n```\n\n## API Routes\n\n### Authentication Routes\n\n```\nPOST /api/auth/register - Register new user\nPOST /api/auth/login - User login\nPOST /api/auth/logout - User logout\nGET /api/auth/me - Get current user\n```\n\n### User Routes\n\n```\nGET /api/users/profile - Get user profile\nPUT /api/users/profile - Update user profile\nPUT /api/users/interests - Update user interests\n```\n\n## Socket Events\n\n### Client Events\n\n```javascript\nsocket.emit(\"join_waiting_room\", userData); // Join waiting room for matching\nsocket.emit(\"join_room\", roomId); // Join a chat room\nsocket.emit(\"send_message\", messageData); // Send a message\nsocket.emit(\"leave_room\", roomId); // Leave current room\n```\n\n### Server Events\n\n```javascript\nsocket.on(\"match_found\", callback); // When a match is found\nsocket.on(\"receive_message\", callback); // When receiving a message\nsocket.on(\"partner_left\", callback); // When chat partner leaves\nsocket.on(\"room_status\", callback); // Room status updates\n```\n\n## Key Features\n\n### Interest-Based Matching\n\nThe matching service uses cosine similarity to match users based on their interest vectors:\n\n```python\ndef find_match():\n    # Calculate similarity between current user and other users\n    similarity_score = cosine_similarity(current_vector, user_vector)[0][0]\n    matched_interests = list(set(current_user[\"interests\"]) \u0026 set(user.get(\"interests\", [])))\n```\n\n### Real-time Chat Management\n\nThe socket service manages real-time communication and room management:\n\n```javascript\nclass RoomManager {\n   constructor() {\n      this.waitingUsers = new Map();\n      this.activeRooms = new Map();\n   }\n   // ... room management methods\n}\n```\n\n## Development Guidelines\n\n1. Follow the existing code structure and naming conventions\n2. Write clear commit messages\n3. Update documentation when making significant changes\n4. Add appropriate error handling and logging\n5. Test features thoroughly before submitting PRs\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a new Pull Request\n\n## License\n\nThis project is licensed under the ISC License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishek-k-git%2Fsoulmegle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhishek-k-git%2Fsoulmegle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhishek-k-git%2Fsoulmegle/lists"}