{"id":21094776,"url":"https://github.com/rohitchourey0809/backend-alluvuim","last_synced_at":"2026-04-04T21:31:50.442Z","repository":{"id":245526674,"uuid":"818523007","full_name":"rohitchourey0809/Backend-Alluvuim","owner":"rohitchourey0809","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-22T21:43:15.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:26:58.018Z","etag":null,"topics":["expressjs","mongodb","mongoosejs","nodejs","socket-io"],"latest_commit_sha":null,"homepage":"https://backend-alluvuim.vercel.app","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/rohitchourey0809.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}},"created_at":"2024-06-22T04:28:23.000Z","updated_at":"2024-06-25T08:26:17.000Z","dependencies_parsed_at":"2024-06-22T16:06:16.230Z","dependency_job_id":"d6f84d35-1778-4dbe-8b55-007165caf319","html_url":"https://github.com/rohitchourey0809/Backend-Alluvuim","commit_stats":null,"previous_names":["rohitchourey0809/backend-alluvuim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rohitchourey0809/Backend-Alluvuim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitchourey0809%2FBackend-Alluvuim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitchourey0809%2FBackend-Alluvuim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitchourey0809%2FBackend-Alluvuim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitchourey0809%2FBackend-Alluvuim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohitchourey0809","download_url":"https://codeload.github.com/rohitchourey0809/Backend-Alluvuim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohitchourey0809%2FBackend-Alluvuim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31415110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"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","mongodb","mongoosejs","nodejs","socket-io"],"created_at":"2024-11-19T22:19:36.362Z","updated_at":"2026-04-04T21:31:50.395Z","avatar_url":"https://github.com/rohitchourey0809.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Chat Application Backend\n\nThis is the backend for a real-time chat application built using the MERN stack (MongoDB, Express, React, Node.js) with WebSocket for real-time communication.\n\n## Table of Contents\n\n- [Features](#features)\n- [Tech Stack](#tech-stack)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [API Endpoints](#api-endpoints)\n- [Testing](#testing)\n- [License](#license)\n\n## Features\n\n- User Registration and Authentication\n- Real-Time Messaging using WebSocket (Socket.io)\n- JWT Authentication\n- Secure and Rate Limited API\n\n## Tech Stack\n\n- Node.js\n- Express\n- MongoDB\n- Mongoose\n- Socket.io\n- JWT for authentication\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/rohitchourey0809/Backend-Alluvuim.git\n   \n\n   Install dependencies:\n\n\n2. \n\n```\nnpm install\n\n```\n\nSet up your environment variables. Create a .env file in the root directory and add:\n\n\nStart the server:\n\nnpm start\n\n\n\n`API Endpoints`\n\nUser Registration\n\n```\nURL: /api/auth/register\n```\n\nMethod: POST\n\n```\n{\n  \"username\": \"testuser\",\n  \"email\": \"testuser@example.com\",\n  \"password\": \"password123\"\n}\n```\n\nResponse:\n\n```\n{\n  \"_id\": \"user_id\",\n  \"username\": \"testuser\",\n  \"email\": \"testuser@example.com\",\n  \"token\": \"jwt_token\"\n}\n\n```\n\n`User Login`\n\n```\nURL: /api/auth/login\n\n```\n\n\nMethod: POST\n\n```\n{\n  \"email\": \"testuser@example.com\",\n  \"password\": \"password123\"\n}\n```\nResponse:\n\n```\n{\n  \"_id\": \"user_id\",\n  \"username\": \"testuser\",\n  \"email\": \"testuser@example.com\",\n  \"token\": \"jwt_token\"\n}\n\n```\n\n`Send Message`\n\n```\nURL: /api/chat/message\n\n```\n\n\nMethod: POST\n\n```\nHeaders:\nAuthorization: Bearer jwt_token\nBody:\n\n```\n\n```\n{\n  \"text\": \"Hello, World!\",\n  \"room\": \"general\"\n}\n\n```\n\nResponse:\n\n```\n{\n  \"user\": \"user_id\",\n  \"text\": \"Hello, World!\",\n  \"room\": \"general\",\n  \"_id\": \"message_id\",\n  \"createdAt\": \"timestamp\",\n  \"updatedAt\": \"timestamp\"\n}\n\n```\n\n`Get Messages`\n\n```\nURL: /api/chat/messages/:room\n\n```\n\nMethod: GET\n\n```\nHeaders:\nAuthorization: Bearer jwt_token\nResponse:\n\n```\n[\n  {\n    \"_id\": \"message_id\",\n    \"user\": {\n      \"_id\": \"user_id\",\n      \"username\": \"testuser\"\n    },\n    \"text\": \"Hello, World!\",\n    \"room\": \"general\",\n    \"createdAt\": \"timestamp\",\n    \"updatedAt\": \"timestamp\"\n  }\n]\n\n```\n\nTesting\nUse Postman or a similar tool to test the API endpoints. Here are example requests for each route.\n\nRegister User\n\n```\nMethod: POST\nURL: http://localhost:8080/api/auth/register\n\n```\nBody:\n\n```\n{\n  \"username\": \"testuser\",\n  \"email\": \"testuser@example.com\",\n  \"password\": \"password123\"\n}\n\n```\n`Login User`\n\n```\nMethod: POST\nURL: http://localhost:8080/api/auth/login\n\n```\n\n```\n{\n  \"email\": \"testuser@example.com\",\n  \"password\": \"password123\"\n}\n\n```\n\n```\nSend Message\nMethod: POST\nURL: http://localhost:8080/api/chat/message\nHeaders:\nAuthorization: Bearer jwt_token\n\n```\n```\n{\n  \"text\": \"Hello, World!\",\n  \"room\": \"general\"\n}\n\n```\n```\nGet Messages\nMethod: GET\nURL: http://localhost:8080/api/chat/messages/general\nHeaders:\nAuthorization: Bearer jwt_token\n```\n\n\nLicense\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitchourey0809%2Fbackend-alluvuim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohitchourey0809%2Fbackend-alluvuim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohitchourey0809%2Fbackend-alluvuim/lists"}