{"id":31559097,"url":"https://github.com/sanlamamba/chat-app","last_synced_at":"2026-04-02T01:03:14.878Z","repository":{"id":314784432,"uuid":"1056743013","full_name":"sanlamamba/chat-app","owner":"sanlamamba","description":"Real-Time Chat Application: WebSocket server + terminal client with room-based chat, presence, message history, and user authentication","archived":false,"fork":false,"pushed_at":"2025-09-14T18:22:41.000Z","size":263,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-05T01:19:27.886Z","etag":null,"topics":["mongodb","nodejs","real-time","redis","terminal","websocket"],"latest_commit_sha":null,"homepage":"https://github.com/sanlamamba/chat-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/sanlamamba.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-09-14T18:01:35.000Z","updated_at":"2025-09-18T15:06:50.000Z","dependencies_parsed_at":"2025-09-14T20:30:03.323Z","dependency_job_id":null,"html_url":"https://github.com/sanlamamba/chat-app","commit_stats":null,"previous_names":["sanlamamba/chat-app"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanlamamba/chat-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanlamamba%2Fchat-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanlamamba%2Fchat-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanlamamba%2Fchat-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanlamamba%2Fchat-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanlamamba","download_url":"https://codeload.github.com/sanlamamba/chat-app/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanlamamba%2Fchat-app/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31293631,"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":["mongodb","nodejs","real-time","redis","terminal","websocket"],"created_at":"2025-10-05T01:13:54.183Z","updated_at":"2026-04-02T01:03:14.563Z","avatar_url":"https://github.com/sanlamamba.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Chat Application\n\nA production-ready real-time chat application with WebSocket server and CLI client.\n\n## Overview\n\nThis chat application consists of two main components:\n\n- **Server**: WebSocket-based messaging server with MongoDB and Redis\n- **Client**: Terminal-based chat interface with real-time features\n\n## Architecture\n\n```\n┌─────────────────┐    WebSocket     ┌─────────────────┐\n│   Chat Client   │◄────────────────►│   Chat Server   │\n│   (Terminal)    │                  │   (Node.js)     │\n└─────────────────┘                  └─────┬───────────┘\n                                             │\n                         ┌───────────────────┼───────────────────┐\n                         │                   │                   │\n                         ▼                   ▼                   ▼\n                ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n                │    MongoDB      │ │     Redis       │ │ HTTP Monitoring │\n                │   (Messages)    │ │  (Cache/PubSub) │ │   (Health)      │\n                └─────────────────┘ └─────────────────┘ └─────────────────┘\n```\n\n## Core Features\n\n- Real-time messaging with WebSocket connections\n- Room-based chat with creation and joining\n- User authentication and presence tracking\n- Message persistence and history\n- Typing indicators and user status\n- Rate limiting and performance monitoring\n\n## Technology Stack\n\n- **Node.js 18+** with WebSocket (ws) library\n- **MongoDB** with Mongoose for data persistence\n- **Redis** for caching and pub/sub messaging\n- **Terminal UI** with Chalk and Inquirer.js\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js 18.0.0+** - [Download here](https://nodejs.org/)\n- **Docker \u0026 Docker Compose** - [Install Docker](https://docs.docker.com/get-docker/)\n- **Git** - For cloning the repository\n\n### Complete Setup\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/sanlamamba/chat-app.git\n   cd chat-app\n   ```\n\n2. **Start database services**\n\n   ```bash\n   docker-compose up -d mongodb redis mongo-express\n   ```\n\n   Wait for services to start (about 30 seconds). Verify with:\n\n   ```bash\n   docker-compose ps\n   ```\n\n3. **Setup and start the server**\n\n   ```bash\n   cd server\n   npm install\n   npm start\n   ```\n\n   Server will start on `http://localhost:3000`\n\n4. **Setup and start the client** (open new terminal)\n\n   ```bash\n   cd client\n   npm install\n   npm start\n   ```\n\n5. **Start chatting!**\n   - Enter your username when prompted\n   - Use `/create room-name` to create a room\n   - Use `/join room-name` to join existing rooms\n   - Type messages to chat\n\n## Components\n\n### Server (`/server`)\n\nProduction WebSocket server with MongoDB and Redis integration.\n[View Server Documentation](./server/README.md)\n\n### Client (`/client`)\n\nTerminal-based chat client with real-time UI.\n[View Client Documentation](./client/README.md)\n\n## Configuration\n\n**Server Environment** (`.env`)\n\n```env\nPORT=3000\nMONGODB_URI=mongodb://localhost:27017/realtime-chat\nREDIS_URL=redis://localhost:6379\n```\n\n**Client Environment** (`.env`)\n\n```env\nSERVER_URL=ws://localhost:3000\n```\n\n## Development\n\n- **Server dev**: `cd server \u0026\u0026 npm run dev`\n- **Client dev**: `cd client \u0026\u0026 npm run dev`\n- **Tests**: `cd server \u0026\u0026 npm test`\n- **Load test**: `cd server \u0026\u0026 npm run test:load`\n\n## Monitoring\n\n- Health check: `GET http://localhost:3000/health`\n- Metrics: `GET http://localhost:3000/metrics`\n- Database admin: `http://localhost:8081` (Mongo Express)\n\n---\n\nFor detailed documentation, see component-specific README files.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanlamamba%2Fchat-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanlamamba%2Fchat-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanlamamba%2Fchat-app/lists"}