{"id":27059920,"url":"https://github.com/richtersfinger/peerchat","last_synced_at":"2026-02-27T15:03:03.097Z","repository":{"id":280342101,"uuid":"894703350","full_name":"RichtersFinger/peerChat","owner":"RichtersFinger","description":"A basic self-hosted peer-to-peer chat application.","archived":false,"fork":false,"pushed_at":"2025-03-30T11:39:19.000Z","size":1180,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T11:46:49.916Z","etag":null,"topics":["chat-application","flask","peer-to-peer","python3","react","self-hosted","socket-io","typescript"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/peerChat/","language":"TypeScript","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/RichtersFinger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T20:44:27.000Z","updated_at":"2025-03-30T11:38:24.000Z","dependencies_parsed_at":"2025-03-02T21:31:33.334Z","dependency_job_id":"44b69586-0d3a-47b0-9792-4b84629655b9","html_url":"https://github.com/RichtersFinger/peerChat","commit_stats":null,"previous_names":["richtersfinger/peerchat"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichtersFinger%2FpeerChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichtersFinger%2FpeerChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichtersFinger%2FpeerChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RichtersFinger%2FpeerChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RichtersFinger","download_url":"https://codeload.github.com/RichtersFinger/peerChat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339155,"owners_count":20923014,"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","flask","peer-to-peer","python3","react","self-hosted","socket-io","typescript"],"created_at":"2025-04-05T13:16:57.420Z","updated_at":"2026-02-27T15:02:58.056Z","avatar_url":"https://github.com/RichtersFinger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# peerChat\n\nA basic self-hosted peer-to-peer chat application written in python (Flask+Socket.IO-backend) and TypeScript (React-frontend).\n\nIt is\n* platform-independent,\n* easy to setup and use,\n\nand offers for example\n* message queues (auto-resend if peers are offline),\n* support for markdown,\n* desktop notifications, and\n* installing application updates via UI.\n\nSee the [demo-gallery](./gallery/gallery.md) for some impressions.\n\n## Install\n`peerChat` can be installed using `pip` by entering\n```\npip install peerChat\n```\nIt is recommended to use a virtual environment\n```\npython3 -m venv venv\nsource venv/bin/activate\n```\n\n## Run\nStart the `peerChat`-application with\n```\npeerChat\n```\nBy default, the web-UI is available at `http://localhost:27182`.\nIf you are done, stop by hitting `Ctrl`+`C`.\n\nWhen the UI is first opened, some configuration has to be performed.\nFollow the dialog shown in the UI to set a key (or password) that will be used to authenticate with the server.\nNote that this key will be stored unencrypted in your file system (`peerChat` is intended to be run locally so usually that key will never leave the local machine).\n\nAfter this technical setup is complete, your profile can be customized by selecting `Settings` in the context menu at the top of the sidebar.\nHere, most importantly, you should set your public network address to ensure your peers can respond to your messages.\n\n## Update\nRun\n```\npip install peerChat --upgrade\n```\nto get the latest version.\n\n## Running as a systemd-service\nThe `peerChat`-app can be run as a systemd-service (linux) that automatically starts with the system.\nAfter cloning this repository, simply run\n```\nmake service\n```\nfor a default configuration (install/working directory is given by `~/.local/share/peerChat` and the service-file is written to `~/.config/systemd/user/peerChat.service`).\nCheck the service's status with\n```\nsystemctl --user status peerChat.service\n```\nDisable or stop the service by entering\n```\nsystemctl --user \u003cdisable|stop\u003e peerChat.service\n```\n\n## Docker\nRun with, for example,\n```\ndocker run -p 27182:27182 ghcr.io/richtersfinger/peerchat:latest\n```\nThe container's `peerChat`-working directory is located at `/app`.\n\n## Building from source\nThe provided `Makefile` provides targets for building from source.\nRun\n* `make build` to build the python package bundled with the static client (react)\n  * the distribution-files can be found in `backend/dist`\n  * the build version can be set with `make build VERSION=\"1.0.0.post5+a6cd1d01\"`\n  * the client build can be skipped with `make build SKIP_CLIENT=\"yes\"`\n* `make clean` to remove build artifacts\n\nA build requires `npm` as well as the `venv`-module of `python3` to be successful.\n\n## Authorization-concept\nSince the service is intended for self-hosting, it only supports a single user per running instance of `peerChat`.\nIn order to identify a user, a (automatically generated or user-defined) key is used.\nThe backend-API allows to configure this key only once.\n\nTo reset that key, the corresponding key-file `.peerChat.auth` can be deleted.\nAfter deleting, the service needs to be restarted for changes to take effect.\n\n## Environment configuration\nThe following environment variables can be set to configure peerChat:\n\n- `PORT` [DEFAULT 27182] peerChat port\n- `WORKING_DIRECTORY` [DEFAULT \".peerChat\"] working directory of the application; default is the subdirectory `.peerChat` in the current working directory\n- `SECRET_KEY` [DEFAULT null] override the otherwise automatically generated secret key\n- `USER_PEER_URL` [DEFAULT null] can be used to set the public peer-url; can also be set via the UI\n- `MODE` [DEFAULT prod] execution mode; one of \"prod\" or \"dev\"\n- `USE_NOTIFICATIONS` [DEFAULT yes] whether to enable desktop notifications (using the [`desktop-notifier`](https://pypi.org/project/desktop-notifier/)-package)\n- `CLIENT_URL` [DEFAULT null] override default client-url (used for example in notifications)\n\nExtended options for configuration can be accessed via the `AppConfig`-class used by the underlying `flask`-webserver which is passed in to the app-factory.\n\n### Public API\nThe public part of the `peerChat`-API can be used to\n* fetch information on a given peer,\n* post messages, and\n* notify of changes.\n\nPlease refer to the OpenAPI v3-document `openapi.yaml` for details.\n\n### Running in dev-mode\nThe development setup requires both `python3` and the node package manager `npm` to be installed.\nContrary to the pure python production server, back- and frontend are run separately in the development context.\n\nTo run the backend server, enter\n```\ncd backend\npython3 -m venv venv\nsource venv/bin/activate\npip install .\npip install -r dev-requirements.txt\nMODE=dev flask run\n```\n\nBased on pre-defined scripts, the frontend development server can be started with\n```\ncd frontend\nnpm install\nnpm start\n```\n\nThe client can then be accessed via the node-development server at `http://localhost:3000`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichtersfinger%2Fpeerchat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frichtersfinger%2Fpeerchat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frichtersfinger%2Fpeerchat/lists"}