{"id":17956394,"url":"https://github.com/o0101/websocket_chat_app_homework","last_synced_at":"2025-04-08T10:05:15.220Z","repository":{"id":42798298,"uuid":"271173891","full_name":"o0101/websocket_chat_app_homework","owner":"o0101","description":"A VERY simple chat app, with a single room, unlimited members, built using vanilla JS (no frameworks) to the spec of a homework assignment.","archived":false,"fork":false,"pushed_at":"2022-12-13T01:42:52.000Z","size":396,"stargazers_count":2,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T05:43:40.799Z","etag":null,"topics":["app","chat","full-stack","nodejs","websocket"],"latest_commit_sha":null,"homepage":"http://boogeh.com","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/o0101.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}},"created_at":"2020-06-10T03:53:56.000Z","updated_at":"2022-06-02T18:42:07.000Z","dependencies_parsed_at":"2023-01-28T04:31:14.501Z","dependency_job_id":null,"html_url":"https://github.com/o0101/websocket_chat_app_homework","commit_stats":null,"previous_names":["o0101/websocket_chat_app_homework"],"tags_count":0,"template":false,"template_full_name":"o0101/bulgogi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o0101%2Fwebsocket_chat_app_homework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o0101%2Fwebsocket_chat_app_homework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o0101%2Fwebsocket_chat_app_homework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/o0101%2Fwebsocket_chat_app_homework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/o0101","download_url":"https://codeload.github.com/o0101/websocket_chat_app_homework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247819948,"owners_count":21001394,"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":["app","chat","full-stack","nodejs","websocket"],"created_at":"2024-10-29T10:37:39.860Z","updated_at":"2025-04-08T10:05:15.195Z","avatar_url":"https://github.com/o0101.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chat App Homework\n\nA very simple chat app in Node.JS, JavaScript, HTML and CSS. Does not use any framework.\n\nServer is a very simple websocket broadcast server that also tracks usernames to prevent impersonation and conflicts.\n\nClient is a simple JS app that works cross-browser and provides a nice user interface.\n\n# Running\n\nClone this repo and\n\n```console\nnpm i \u0026\u0026 npm test\n```\n\nThen visit http://localhost:8080 in your browser on the same machine.\n\nAlternately, [see the demo](http://boogeh.com)\n\n# Running tests\n\nTo run tests visit [the test page](http://boogeh.com/runtests.html)\n\nOr, if you're running locally, it's http://localhost:8080/runtests.html\n\n**Note** to pass the tests connect to a server by yourself. Any other connection will cause the test counts to deviate from expectations.\n\n# Features\n\n- [X] Chat page\n- [X] Settings page\n- [X] Responsive layout across all devices\n- [X] Works on latest Chrome, Firefox and Safari\n- [X] Chat tab blinking title with unread count\n- [X] Working settings for username, color scheme, clock display, and send hotkey.\n- [X] Design based on mockups\n- [X] No automatic code generation tools used\n- [X] Clean, small, modular code\n- [X] Working code \n- [X] Tests main functionality of members joining and leaving, and sending messages\n\n# Things that are different\n\n- No optional features. My focus is keeping it simple.\n- No React, no framework at all. I requested this and it was okayed.\n- No CSS preprocessors. CSS here is very simple.\n- No TypeScript. I used `tsc --checkJs` to check for issues and fixed any. \n- No complex state management. Just deep merge new state with existing.\n- No socket.io. The server is a hugely simple websocket server. Client reconnects with exponential backoff.\n\n# Development Philosophy\n\nIn this project I tried to do the following things:\n\n- Keep it simple\n- Merge state updates into a single state object \n- render the whole view tree from that state object on every change.\n\nIn some cases I needed to break that simple model and where I've done that, I've tried to make it clear, such as with `drawLatestMessage()` which was a performance improvement and bug fix over redrawing the whole tree on every arriving message.\n\n# Development Notes\n\n- Most bugs that occured were not type related bugs but due to cross-browser differnces in CSS, layout.\n- Adding explicit types would only lengthen this homework assignment for no good reason. \n- Adding React would also be unnecessary. This is a simple app, with small components and only 2 routes. There's no need for added complexity. Also, it was related to me that 'no framework would be best IMO'.\n- Adding CSS preprocessors would also be unnecessary, the CSS is very simple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo0101%2Fwebsocket_chat_app_homework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fo0101%2Fwebsocket_chat_app_homework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fo0101%2Fwebsocket_chat_app_homework/lists"}