{"id":25705768,"url":"https://github.com/namek/webchat","last_synced_at":"2026-04-20T14:06:09.694Z","repository":{"id":38637079,"uuid":"217282920","full_name":"Namek/webchat","owner":"Namek","description":"Web Chat app made with NodeJS + Elm ","archived":false,"fork":false,"pushed_at":"2022-06-03T00:56:42.000Z","size":404,"stargazers_count":2,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T06:48:19.459Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Elm","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/Namek.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":"2019-10-24T11:29:34.000Z","updated_at":"2022-02-09T13:25:16.000Z","dependencies_parsed_at":"2022-09-15T11:52:25.732Z","dependency_job_id":null,"html_url":"https://github.com/Namek/webchat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Namek/webchat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fwebchat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fwebchat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fwebchat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fwebchat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Namek","download_url":"https://codeload.github.com/Namek/webchat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fwebchat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32050454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2025-02-25T06:48:22.040Z","updated_at":"2026-04-20T14:06:09.676Z","avatar_url":"https://github.com/Namek.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Web Chat\n\n*Tech*: [NodeJS](https://nodejs.org) and [Elm](https://elm-lang.org)\n\n#### Play right away\n\n1. Boot it up with [docker-compose](https://docs.docker.com/compose/install/)\n\n       docker-compose build\n       docker-compose up\n\n2. Open [http://localhost:8085](http://localhost:8085) in your browser.\n\n## Features\n\n- read chat as anonymous user\n- log in / register using name+password, then chat with others\n- communication: GraphQL\n   - Query: getting chat state, check session based on cookie\n   - Mutation: logIn, logOut, addMessage\n   - and Subscription: chat updates\n- frontend/UX: multiple messages of the same author in a row are grouped within 5 minutes\n- frontend: posted links are clickable\n- frontend: every person gets a randomized avatar!\n- backend/database: limit message count with removal batching\n\n## Possible improvements\n\n- Secure HTTP\n- database migrations\n- frontend: bundle JS code into one file\n- backend: [detecting and closing broken connections](https://github.com/websockets/ws#how-to-detect-and-close-broken-connections)\n- backend: store session not in-memory but in database so server restart wouldn't log out users\n- frontend UX: better indications about connection status\n- timezones need some care\n- build: reduce size of Docker downloads\n- backend/GraphQL: get from DB only the query-specified fields\n\n\n# Development\n\nAll env vars are defined in `/backend/src/environment.ts`. [dotenv](https://www.npmjs.com/package/dotenv) is imported so you can create `/backend/.env` file changing the defaults.\n\n## Backend\n\n    cd /backend\n    set NODE_ENV=development\n    npm run start\n\n\nTo generate Elm code for GraphQL API based on backend definitions you can launch backend in development environment and let the elm-graphql introspect for a schema:\n\n    cd /backend\n    npm run start\n    npm run gen_graphql_api  # on another command line\n\n\n## Frontend\n\n\nPrerequisites: [dotnet script](https://github.com/filipw/dotnet-script), [Elm 0.19.1](https://guide.elm-lang.org/install/elm.html)\n\n\n1. Build\n\nFor Windows it is:\n\n    cd /frontend\n    build_watch.bat\n\nor\n\n    cd /frontend\n    dotnet script build.csx -- build watch debug\n\n\n2. Host `/frontend/public` directory. The easiest way is to use backend in development mode.\n\n\n\n# Production\n\nPrerequisites: [PostgreSQL](https://www.postgresql.org/download/)\n\n## Backend\n\n    cd /backend\n    set NODE_ENV=production\n    npm run build\n\n## Frontend\n\n    cd /frontend\n    dotnet script build.csx -- build\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamek%2Fwebchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamek%2Fwebchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamek%2Fwebchat/lists"}