{"id":31833344,"url":"https://github.com/localhost-four/anon","last_synced_at":"2025-10-11T23:53:04.343Z","repository":{"id":300587772,"uuid":"1006558232","full_name":"localhost-four/anon","owner":"localhost-four","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-20T21:15:32.000Z","size":235,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-20T22:11:53.757Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://localhost-four.github.io/anon/","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/localhost-four.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-22T14:34:57.000Z","updated_at":"2025-07-20T21:15:36.000Z","dependencies_parsed_at":"2025-07-20T22:08:11.322Z","dependency_job_id":"97cb1cf9-f778-4c84-8451-292f6fa3690b","html_url":"https://github.com/localhost-four/anon","commit_stats":null,"previous_names":["localhost-four/anon"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/localhost-four/anon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhost-four%2Fanon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhost-four%2Fanon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhost-four%2Fanon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhost-four%2Fanon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/localhost-four","download_url":"https://codeload.github.com/localhost-four/anon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/localhost-four%2Fanon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009392,"owners_count":26084582,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-10-11T23:53:03.158Z","updated_at":"2025-10-11T23:53:04.336Z","avatar_url":"https://github.com/localhost-four.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![image](https://github.com/user-attachments/assets/af680ee0-a5d7-451e-b67a-f4f9dbf6c561) \u003cbr\u003e\nWelcome to Anon Chat! \u003cbr\u003e\nThe new place for communication is open to everyone without registration, only on our CHAT page! (Web-Demo)\u003cbr\u003e \nWhile it's a demo version, you can try to chat in it.\u003cbr\u003e\n\n# 🌐 Realtime Chat Web App\n\nA lightweight, secure, and fully-featured real-time chat application built with Firebase Realtime Database and vanilla JavaScript. Designed for simplicity, privacy-first interaction, and cross-device synchronization.\n\n---\n\n## 📦 Project Overview\n\nThis is a client-side web-based chat system that allows users to:\n\n- Send, edit, and delete messages\n- Reply to messages\n- Pin important messages\n- React to messages with check/cross buttons\n- Search through messages\n- Change nickname, color theme, and chat title\n- View online users\n- Auto-clean old messages\n- Use dark/light themes\n- Store user identity via cookies\n- Synchronize data across devices\n\nAll interactions are handled in real-time using Firebase, with security rules and input validation included.\n\n---\n\n## 📁 File Structure\n/anon/ \u003cbr\u003e\n│ \u003cbr\u003e\n├── index.html # Main HTML file containing the chat UI layout \u003cbr\u003e\n├── style.css # CSS styles for chat interface (mobile \u0026 desktop) \u003cbr\u003e\n├── script.js # Core JavaScript logic and Firebase integration \u003cbr\u003e\n├── firebase-rules.json # Firebase Realtime Database security rules \u003cbr\u003e\n└── README.md # This file — project documentation \u003cbr\u003e\n\n\n\n---\n\n## 🛠️ Technologies Used\n\n- **Firebase Realtime Database** – For real-time message and presence sync\n- **Vanilla JavaScript** – No frameworks, pure JS for performance and simplicity\n- **HTML5 / CSS3** – Responsive UI design\n- **Cookies + localStorage** – User persistence without login\n- **Security Filters** – Input sanitization, XSS protection, and regex validation\n\n---\n\n## 🔒 Security Features\n\n- All messages are sanitized before display\n- Input validation (length, allowed characters)\n- Cookie-based user identity (`agentId`) with expiry\n- Firebase rules to restrict unauthorized access\n- Prevention of injection attacks (XSS)\n- Presence system with automatic timeout (60s)\n- Message editing/deletion limited to original author\n\nExample Firebase Rule:\n```json\n{\n  \"rules\": {\n    \".read\": true,\n    \".write\": true,\n    \"messages\": {\n      \"$messageId\": {\n        \".write\": \"$messageId === auth.uid || auth != null\",\n        \".read\": true\n      }\n    },\n    \"users\": {\n      \"$userId\": {\n        \".write\": \"$userId === auth.uid || auth != null\",\n        \".read\": true\n      }\n    }\n  }\n}\n```\n\u003cbr\u003e\n# 1. 🚀 Deployment Instructions \n\u003cbr\u003e\n\u003ccode\u003egit clone https://github.com/localhost-four/anon.git\u003c/code\u003e\n\u003cbr\u003e\n# 2. Replace Firebase config in script.js with your own credentials. \n\u003cbr\u003e\n# 3. Deploy to Firebase Hosting or any static hosting provider. \n\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalhost-four%2Fanon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocalhost-four%2Fanon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocalhost-four%2Fanon/lists"}