{"id":15774931,"url":"https://github.com/thk2b/circlechat","last_synced_at":"2026-01-19T23:02:08.264Z","repository":{"id":53905046,"uuid":"115523404","full_name":"thk2b/circlechat","owner":"thk2b","description":"A web based chat platform","archived":false,"fork":false,"pushed_at":"2022-12-07T16:14:23.000Z","size":1606,"stargazers_count":1,"open_issues_count":25,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-10-05T16:41:35.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/thk2b.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":"2017-12-27T13:23:17.000Z","updated_at":"2021-08-02T22:21:10.000Z","dependencies_parsed_at":"2023-01-23T18:30:31.246Z","dependency_job_id":null,"html_url":"https://github.com/thk2b/circlechat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thk2b/circlechat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thk2b%2Fcirclechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thk2b%2Fcirclechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thk2b%2Fcirclechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thk2b%2Fcirclechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thk2b","download_url":"https://codeload.github.com/thk2b/circlechat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thk2b%2Fcirclechat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28588968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"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":[],"created_at":"2024-10-04T16:41:28.660Z","updated_at":"2026-01-19T23:02:08.245Z","avatar_url":"https://github.com/thk2b.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# circlechat\nA web based chat platform.\n\n![screenshot](https://raw.githubusercontent.com/thk2b/circlechat/master/media/screenshot.png)\n\n# About the project\n\nCirclechat is a web based chat application. The core service provided is the instant transmission of messages between users.\n\nIn Circhechat, users can\n- login, register, and edit their profile\n- create channels and update the channels they created\n- send messages to channels and edit their own messages\n- view whether other users are online\n\nWhenever a channel, message or profile's data is changed it is updated in real time on all clients. This means that when a user updates her profile description, or posts a message, all clients are notified and update the view accordingly.\n\n# Architecture\n\nCirclechat is orchestrated through docker. There are 4 containers: \n- client: a react-redux javascript client\n- web: a REST API and websocket server written in nodeJS\n- nginx: an nginx server and reverse proxy, which either serves the client application or routes requests to the API server\n- db: a postgresql database\n\nThe application can be deployed in two environments:\n\n- dev, meant for development. Features include automatically restarting the client and webserver on code changes for fast development.\n  \n- production, optimized for user-facing deployment. For instance, the client is built and minified.\n  \n## Client\n\nWhile the client served to all devices, mobile and desktop alike, the view is adapted to the screen size. The mobile layout makes use of touchscreen features, such as swiping between views. On larger screens, more information is displayed.\n\nThe client is a single page application, build with react (+react router) and redux. The layout is implemented with css grid.\n\n- available under two color themes (light and dark).\n- infinite scroll: more messages are fetched when the user has scrolled to the top of a chat.\n- loading bars indicate that a server response is pending.\n\nThe store is unit-tested with jest with `docker-compose run client npm test`\n\n## Web\n\nThe web container is a nodeJS applcation responsible for the rest API and websockets.\n\nThe codebase is separated into modules (auth, profiles, channels, messages). Each module is made up of:\n\n- a `service` file which handles database interactions\n- a `router` file where express API routes are defined\n- an `events` file which subscribes to websocket events\n\nIt is unit tested with mocha with `docker-compose run web npm test`\n\n### REST API\n\n|endpoint|method|request body|response body|description|\n|-|-|-|-|-|\n|`/api/v1/auth/login/`|`POST`|`{email, pw}`|`{token, userId, lastLogoutAt}`|login with userId or email. The response includes a JWT token to be sent back with every subsequent request|\n|`/api/v1/auth/`|`POST`|`{email, pw`|`none`|register a new user|\n|`/api/v1/auth/password`|`PUT`|`{currentPw, newPw}`|`{user}`|update a user's password|\n|`/api/v1/auth/email`|`PUT`|`{pw, newEmail}`|`{user}`|update a user's email|\n|`/api/v1/auth/:id`|`GET`|`none`|`{userId, email}`|get a user's information|\n|`/api/v1/auth/:id`|`DELETE`|`none`|`none`|delete a user|\n|`api/v1/channel/`|`POST`|`{profileId, name}`|`{profileId, name, createdAt, updatedAt}`|create a channel for profile with id|\n|`api/v1/channel?id`|`GET`|`none`|`{profileId, name, createdAt, updatedAt}`|get a channel's information|\n|`api/v1/channel/`|`PUT`|`{name}`|`{id, updatedAt}`|update a channel|\n|`api/v1/channel?`|`DELETE`|`none`|`none`|delete a channel|\n|`api/v1/channel/all`|`GET`|`none`|`{channels: [{profileId, name, createdAt, updatedAt}]`|update a channel|\n|`api/v1/message/`|`POST`|`{profileId, channelId, text}`|`{profileId, channelId, text, createdAt, updatedAt}`|create a new message for user in channel|\n|`api/v1/message?id`|`GET`|`none`|`{profileId, channelId, text, createdAt, updatedAt}`|get a message|\n|`api/v1/message?id`|`PUT`|`{text}`|`{profileId, channelId, text, createdAt, updatedAt}`|update a message|\n|`api/v1/message?id`|`DELETE`|`none`|`none`|delete a message|\n|`api/v1/message/all?id?n?after`|`GET`|`none`|`{messages: [{profileId, channelId, text, createdAt, updatedAt}], hasMore}`|get n or all messages maybe after a specific message, in a channel or in all channels|\n|`api/v1/profile/`|`POST`|`{userId, name?, description?, status?}`|`{userId, name, description, status}`|create a new profile|\n|`api/v1/profile?id`|`GET`|`none`|`{userId, name, description, status}`|get profile with id|\n|`api/v1/profile?userId`|`GET`|`none`|`{userId, name, description, status}`|get the profile of a user|\n|`api/v1/profile?id`|`PUT`|`{name, description, status}`|`{userId, name, description, status}`|update profile with id|\n|`api/v1/profile?id`|`DELETE`|`none`|`none`|delete profile with id|\n|`api/v1/profile/all`|`GET`|`none`|`{profiles: [{userId, name, description, status}]}`|get all profiles|\n\n\n# Commands\n\n- start in dev environment\n  - create a docker machine\n  - create a .env file (see docker-compose.yml for the required variables)\n  - `docker-compose -f docker-compose.dev.yml build`\n  - run `docker-compose -f docker-compose.dev.yml run web node app/manage/create` to create the database tables\n  - `docker-compose -f docker-compose.dev.yml up`\n\n- start in prod environment\n  - create a docker machine\n  - create a .env file (see docker-compose.yml for the required variables)\n  - `docker-compose build`\n  - run `docker-compose run web node app/manage/create` to create the database tables\n  - `docker-compose up -d`\n\n# State of development\n\nCurrently, circlechat is a MVP. All desired features have yet to be implemented. Namely, all chat and profile features are present, but there exists only one global circle: all users are automatically added to a global circle, which holds all channels and profiles. The next major development step is the implementation of user-created circles, each with their own channels and profiles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthk2b%2Fcirclechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthk2b%2Fcirclechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthk2b%2Fcirclechat/lists"}