{"id":26304606,"url":"https://github.com/gitcoder052023/streamnet","last_synced_at":"2026-04-11T02:07:36.564Z","repository":{"id":273561215,"uuid":"919317183","full_name":"GitCoder052023/StreamNet","owner":"GitCoder052023","description":"A real-time local network chat application built with Socket.IO and Express. Features modern UI with Tailwind CSS, instant messaging, and secure WebSocket communication for seamless home/office network conversations.","archived":false,"fork":false,"pushed_at":"2025-03-07T16:06:10.000Z","size":413,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T16:25:36.879Z","etag":null,"topics":["chat-application","css","express","group-chat","javascript","lightweight-app","local-network","nodejs","peer-to-peer","privacy-focused","real-time-communication","real-time-messaging","secure-messaging","socketio","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitCoder052023.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T07:06:37.000Z","updated_at":"2025-03-07T16:06:13.000Z","dependencies_parsed_at":"2025-01-21T17:22:54.036Z","dependency_job_id":"f00163ab-ff69-431d-8654-1b23824353f7","html_url":"https://github.com/GitCoder052023/StreamNet","commit_stats":null,"previous_names":["gitcoder052023/qchat","gitcoder052023/lchat","gitcoder052023/streamnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FStreamNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FStreamNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FStreamNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitCoder052023%2FStreamNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitCoder052023","download_url":"https://codeload.github.com/GitCoder052023/StreamNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701436,"owners_count":20333631,"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","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","css","express","group-chat","javascript","lightweight-app","local-network","nodejs","peer-to-peer","privacy-focused","real-time-communication","real-time-messaging","secure-messaging","socketio","tailwindcss"],"created_at":"2025-03-15T08:17:19.597Z","updated_at":"2026-04-11T02:07:36.498Z","avatar_url":"https://github.com/GitCoder052023.png","language":"JavaScript","readme":"# StreamNet – Secure, Real-Time Chat for Local Networks with AI Support\n\n![Real-Time Messaging](https://img.shields.io/badge/Real--Time%20Messaging-Instant-blue)\n![AI Chat](https://img.shields.io/badge/AI%20Chat-Ollama%20Powered-8A2BE2?logo=openai)\n![End-to-End Encryption](https://img.shields.io/badge/Security-E2E%20Encryption-00C853?logo=shield)\n![Local Network](https://img.shields.io/badge/Local%20Network-Offline%20Chat-FF9800?logo=wifi)\n![Dark Mode](https://img.shields.io/badge/UI-Dark%20Mode-212121?logo=visualstudiocode)\n![Mobile-Friendly](https://img.shields.io/badge/Responsive-Mobile%20Optimized-4CAF50?logo=android)\n![Community Driven](https://img.shields.io/badge/Community-Open%20for%20Feedback-1E88E5?logo=github)\n![MIT License](https://img.shields.io/badge/License-MIT-FDD835?logo=book)\n\n![StreamNet Interface](Media/preview.png)\n\nStreamNet is a secure, real-time chat application designed for local network communications with integrated AI capabilities. Built with modern web technologies and a focus on security, StreamNet delivers a seamless, encrypted messaging experience tailored for your local network. Enjoy features like instant messaging, AI-powered conversations through ChatLLama, robust security protocols, and an intuitive design.\n\n## Table of Contents\n\n### Overview\n- [About StreamNet](#streamnet--secure-real-time-chat-for-local-networks-with-ai-support)\n- [Preview](#streamnet-interface)\n\n### Features\n- [Key Features Overview](#-key-features)\n  - [Real-Time Messaging](#-messaging)\n  - [ChatLLama Integration](#-chatllama)\n  - [Security Features](#-security)\n  - [User Interface](#-user-interface)\n\n### Setup Guide\n- [Getting Started](#-getting-started)\n  - [System Requirements](#prerequisites)\n  - [Installation Guide](#installation-steps)\n  - [Configuration](#environment-configuration)\n  - [Development Server](#start-development-server)\n  - [First Launch](#accessing-the-application)\n\n### Development Resources\n- [Development Guide](#-development)\n  - [NPM Scripts](#available-scripts)\n  - [Database Setup](#database-setup)\n  - [SSL Configuration](#ssl-certificate-setup)\n  - [Gmail Integration](#gmail-app-password-setup)\n  - [Ollama Setup](#ollama-setup-for-chatllama)\n\n### Project Info\n- [License Information](#license)\n- [Contribution Guidelines](#contributing)\n  - [Getting Started](#getting-started-1)\n  - [Development Guidelines](#development-guidelines)\n  - [Pull Request Process](#pull-request-process)\n  - [Types of Contributions](#types-of-contributions)\n- [Security Policy](#security-1)\n  - [Vulnerability Reporting](#reporting-a-vulnerability)\n  - [Security Features](#security-measures)\n  - [Disclosure Policy](#responsible-disclosure)\n\n### Community\n- [Code of Conduct](CODE_OF_CONDUCT.md)\n- [Contributing Guide](CONTRIBUTING.md)\n\n## Key Features\n\n### 💬 Messaging\n- Real-time messaging powered by encrypted WebSockets.\n- Message threading and reply functionality.\n- Typing indicators and presence detection.\n- Rate limiting: 5 messages per 10 seconds.\n- Support for messages up to 5000 characters.\n\n### ChatLLama\n- **Local AI Integration:** Chat with Ollama models running on your local network.\n- **Real-Time Streaming:** Experience character-by-character AI responses powered by Socket.io.\n- **Model Selection:** Choose from various Ollama models for different conversation needs.\n- **Advanced Formatting:** Full markdown support with code syntax highlighting.\n- **Streaming Controls:** Pause or stop AI responses at any time.\n- **Conversation Management:** Auto-generated titles and searchable history.\n- **Theme Customization:** Light, Dark, and System theme options.\n\n### Security\n- End-to-end SSL/TLS encryption.\n- Message signing with HMAC-SHA256.\n- Comprehensive input sanitization against XSS attacks.\n- Configurable CORS protection.\n- Built-in rate limiting and spam prevention.\n- Secure user authentication.\n\n### User Interface\n- Modern, responsive design built with Tailwind CSS.\n- Dark mode support for comfortable viewing.\n- Animated transitions and interactive UI elements.\n- Customizable user avatars.\n- Real-time online/offline status indicators.\n- Mobile-friendly layout.\n\n## Getting Started\n\n### Prerequisites\n- Node.js v14 or higher\n- MongoDB\n- SSL certificate and key\n- npm or yarn\n- Gmail account for OTP email integration\n- Ollama installed locally (for ChatLLama functionality)\n\n#### Node.js and npm\n- Download Node.js v14+ from [nodejs.org](https://nodejs.org/)\n- Run the installer and follow the prompts\n\n#### MongoDB and Compass\n- Install MongoDB Community Server:\n   - Download from [mongodb.com](https://www.mongodb.com/try/download/community)\n   - Run installer with \"Complete\" setup\n   - Install MongoDB Compass when prompted\n\n#### SSL Certificate Setup\n1. Install OpenSSL for Windows:\n   - Download from [slproweb.com/products/Win32OpenSSL.html](https://slproweb.com/products/Win32OpenSSL.html)\n   - Choose Win64 OpenSSL v1.1.1 or later\n\n2. Generate SSL certificate (run in project root):\n   ```bash\n   openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./ssl/private.key -out ./ssl/certificate.crt\n   ```\n\n\u003e [!TIP]\n\u003e For Windows users: Run all commands in PowerShell or Command Prompt as Administrator\n\n\n### Installation Steps\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/GitCoder052023/StreamNet.git\n   cd StreamNet\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   npm install\n   ```\n\n3. **Configure the environment:**\n   ```bash\n   cp .env.example .env\n   ```\n\n4. **Database Setup:**\n   - Install and start MongoDB\n   - Open MongoDB Compass or your shell\n   - Create a new connection using: `mongodb://localhost:27017`\n   - Create the following databases and collections:\n\n     **StreamNet Database:**\n     ```bash\n     Database: StreamNet\n     Collections:\n     - Users\n     - Messages\n     - otps\n     - Conversations\n     ```\n\n     **ChatLLama Database:**\n     ```bash\n     Database: ChatLLama\n     Collections:\n     - users\n     - conversations\n     ```\n\n\u003e [!NOTE]\n\u003e Both databases must be created before starting the application. The collections will be automatically created if they don't exist.\n\n5. **Gmail App Password Setup:**\n   - Sign in to your [Google Account](https://myaccount.google.com/).\n   - Navigate to Security → 2-Step Verification.\n   - Under \"App passwords,\" select \"Other\" and enter a label (e.g., \"StreamNet\").\n   - Copy the generated 16-character password.\n\n6. **Ollama Setup (for ChatLLama):**\n   - Install Ollama from [ollama.ai](https://ollama.ai).\n   - Pull your preferred models:\n     ```bash\n     ollama pull llama2\n     ollama pull llama2-uncensored\n     ollama pull mistral\n     ```\n   - Ensure Ollama is running before starting StreamNet.\n\n### Environment Configuration\n\nUpdate your `.env` file with your settings:\n\n```env\nPORT=3000\nSPORT=4000\nHOST=\"System will configure it automatically\"\nNODE_ENV=development\nJWT_SECRET=\"your_secure_jwt_secret\"\nALLOWED_ORIGINS=\"System will configure it automatically\"\nSSL_KEY=\"path to your ssl key\"\nSSL_CERT=\"path to your ssl cert\"\nSECRET_KEY=\"your_secure_secret_key\"\nTOKEN_EXPIRY=\"24h\"\nSALT_ROUNDS=10\nEMAIL_USER=\"your_email_address\"\nEMAIL_PASSWORD=\"your_app_password\"\nMONGODB_URI=mongodb://localhost:27017/StreamNet\nFRONTEND_ORIGIN=\"System will configure it automatically\"\nOLLAMA_API_URL=\"http://localhost:11434\"\nChatLLama_MONGODB_URI=\"mongodb://localhost:27017/ChatLLama\"\n```\n\n### Start Development Server\n```bash\nnpm run dev\n```\n\nAfter running the development server, you'll see output similar to this:\n\n```bash\n[ChatLLama:start] ChatLLama app running on port http://192.168.1.5:3001\n[start] Connected to MongoDB\n[start] Engine is running on port 3000\n[server] Connected to MongoDB\n[server] Server is running on https://192.168.1.5:4000\n[server] [NETWORK INTERFACE] - StreamNet is running on https://192.168.1.5:3000\n[server] [LOCAL INTERFACE] - StreamNet is running on https://localhost:3000\n[ChatLLama:server] ChatLLama Server running on port http://192.168.1.5:5000\n[ChatLLama:server] MongoDB connected\n```\n\n### Accessing the Application\n\n1. Open your browser and navigate to the Network Interface URL shown in the console (e.g., `https://192.168.1.5:3000`).\n\n\u003e [!IMPORTANT]\n\u003e You may see a security warning like \"Your connection is not private\" or \"This connection is not secure\". This is normal when using self-signed SSL certificates in development.\n\n2. To proceed:\n   - On Chrome: Click \"Advanced\" and then \"Proceed to site\"\n   - On Firefox: Click \"Advanced...\" and then \"Accept the Risk and Continue\"\n   - On Edge: Click \"Continue to site\"\n\nThe warning appears because we're using a self-signed certificate for local development. The connection is still encrypted and safe for local network use.\n\n## Development\n\n### Available Scripts\n\n- `npm run dev` - Start all services concurrently (recommended for development)\n- `npm start` - Start the main Engine service\n- `npm run server` - Start the WebSocket server\n- `npm run ChatLLama:start` - Start the ChatLLama frontend\n- `npm run ChatLLama:server` - Start the ChatLLama backend server\n- `npm run build:css` - Build and watch Tailwind CSS changes\n- `npm run lint` - Run ESLint checks\n- `npm run lint:fix` - Fix ESLint issues automatically\n- `npm run format` - Format code with Prettier\n- `npm run format:check` - Check code formatting without making changes\n\n\u003e [!TIP]\n\u003e For development, using `npm run dev` is recommended as it starts all required services simultaneously.\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\nWe welcome contributions from the community! Here's how you can help make StreamNet better:\n\n### Getting Started\n\n1. **Fork the Repository**\n   - Click the 'Fork' button on GitHub\n   - Clone your fork locally:\n     ```bash\n     git clone https://github.com/GitCoder052023/StreamNet.git\n     ```\n\n2. **Create a Branch**\n   ```bash\n   git checkout -b feature/your-feature-name\n   ```\n\n### Development Guidelines\n\n- Follow our coding style and conventions\n- Write clear, documented code\n- Add unit tests for new features\n- Update documentation as needed\n- Ensure all tests pass before submitting\n\n### Pull Request Process\n\n1. Update your fork with the latest changes:\n   ```bash\n   git remote add upstream https://github.com/GitCoder052023/StreamNet.git\n   git fetch upstream\n   git merge upstream/main\n   ```\n\n2. Push your changes:\n   ```bash\n   git push origin feature/your-feature-name\n   ```\n\n3. Open a Pull Request with:\n   - Clear title and description\n   - Screenshots for UI changes\n   - List of changes made\n\n### Types of Contributions\n\n- Bug fixes\n- New features\n- Documentation improvements\n- UI/UX enhancements\n- Performance improvements\n- Test coverage\n\nFor detailed guidelines, please read our [Contributing Guide](https://github.com/GitCoder052023/StreamNet/blob/main/CONTRIBUTING.md).\n\n\u003e [!NOTE]\n\u003e By contributing, you agree to follow our [Code of Conduct](https://github.com/GitCoder052023/StreamNet/blob/main/CODE_OF_CONDUCT.md).\n\n## Security\n\n### Reporting a Vulnerability\n\nIf you discover a security vulnerability in StreamNet, please report it to us immediately. We take all security issues seriously and will address them as quickly as possible.\n\nTo report a vulnerability, please email us at `contact.khub.dev@gmail.com` with the subject line \"Security Vulnerability in StreamNet\". Please include the following details in your report:\n\n- A description of the vulnerability\n- Steps to reproduce the issue\n- Any potential impact of the vulnerability\n- Your contact information (optional)\n\nWe will acknowledge receipt of your report within 48 hours and provide a timeline for addressing the issue.\n\n### Security Measures\n\n- **Encryption**: All communications are encrypted using WebSockets (wss://).\n- **Input Validation**: User inputs are validated to prevent injection attacks.\n- **Dependency Monitoring**: We regularly update dependencies to ensure no known vulnerabilities are present.\n\n### Responsible Disclosure\n\nWe follow the principle of responsible disclosure. We ask that you do not publicly disclose the vulnerability until we have had a chance to address it and provide a fix.\n\nThank you for helping us keep StreamNet secure!\n\n---\n\nBuilt with ❤️ by Hamdan Khubaib for the community.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoder052023%2Fstreamnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitcoder052023%2Fstreamnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoder052023%2Fstreamnet/lists"}