{"id":13507368,"url":"https://github.com/edgurgel/poxa","last_synced_at":"2025-05-16T01:07:53.660Z","repository":{"id":8723926,"uuid":"10395784","full_name":"edgurgel/poxa","owner":"edgurgel","description":"Pusher server implementation compatible with Pusher client libraries.","archived":false,"fork":false,"pushed_at":"2024-06-30T09:57:26.000Z","size":745,"stargazers_count":1074,"open_issues_count":13,"forks_count":98,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-08T12:06:42.125Z","etag":null,"topics":["elixir","pubsub","pusher","websocket"],"latest_commit_sha":null,"homepage":"https://poxa.onrender.com/","language":"Elixir","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/edgurgel.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":"2013-05-31T01:44:30.000Z","updated_at":"2025-03-28T00:17:27.000Z","dependencies_parsed_at":"2024-01-05T21:53:31.435Z","dependency_job_id":"6834f94e-b198-455a-bd02-0e3769cf0ded","html_url":"https://github.com/edgurgel/poxa","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgurgel%2Fpoxa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgurgel%2Fpoxa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgurgel%2Fpoxa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgurgel%2Fpoxa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgurgel","download_url":"https://codeload.github.com/edgurgel/poxa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448578,"owners_count":22072764,"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":["elixir","pubsub","pusher","websocket"],"created_at":"2024-08-01T02:00:32.350Z","updated_at":"2025-05-16T01:07:48.650Z","avatar_url":"https://github.com/edgurgel.png","language":"Elixir","funding_links":[],"categories":["Applications","Elixir"],"sub_categories":[],"readme":"[![Inline docs](http://inch-ci.org/github/edgurgel/poxa.svg?branch=master)](http://inch-ci.org/github/edgurgel/poxa)\n[![Release](http://img.shields.io/github/release/edgurgel/poxa.svg)](https://github.com/edgurgel/poxa/releases/latest)\n[![Docker](https://img.shields.io/docker/pulls/edgurgel/poxa-automated.svg)](https://hub.docker.com/r/edgurgel/poxa-automated)\n# Poxa\n\nOpen Pusher implementation compatible with Pusher libraries. It's designed to be used as a single registered app with id, secret and key defined on start.\n\nHow do I speak 'poxa'?\n\n['poʃa] - Phonetic notation\n\n[posha] : po ( potion ), sha ( shall )\n\n## Features\n\n* Public channels;\n* Private channels;\n* Presence channels;\n* Client events;\n* SSL on websocket and REST API;\n* Simple console;\n* REST API\n  * /users on presence channels\n  * /channels/:channel_name\n  * /channels\n\n## Development\n\nPoxa is a standalone elixir server implementation of the Pusher protocol.\n\nYou need [Elixir](http://elixir-lang.org) 1.16 at least and Erlang 26.0\n\nClone this repository\n\nRun\n\n```console\nmix deps.get\nmix compile\n```\n\nThe default configuration is:\n\n* Port: 8080\n* App id: 'app_id'\n* App key: 'app_key'\n* App secret: 'secret'\n\n## Using Docker\n\nDocker images are automatically built by [Docker Hub](https://hub.docker.com/r/edgurgel/poxa-automated/builds/). They are available at Docker Hub: https://hub.docker.com/r/edgurgel/poxa-automated/tags/\n\nOne can generate it using: `docker build -t local/poxa .`.\n\nThe `docker run` command should look like this:\n\n```\ndocker run --rm --name poxa -p 8080:8080 edgurgel/poxa-automated:latest\n```\n\n## Configuration\n\nThe following environment variables are supported:\n\n* `PORT`\n* `POXA_APP_KEY`\n* `POXA_SECRET`\n* `POXA_APP_ID`\n* `POXA_REGISTRY_ADAPTER`\n* `WEB_HOOK`\n* `ACTIVITY_TIMEOUT`\n* `POXA_SSL`\n* `SSL_PORT`\n* `SSL_CACERTFILE`\n* `SSL_CERTFILE`\n* `SSL_KEYFILE`\n\n## Your application\n\nIf you are using the pusher-gem:\n\n```ruby\nPusher.host   = 'localhost'\nPusher.port   = 8080\n```\n\nAnd pusher-js:\n\n```javascript\n\n// will only use WebSockets\nvar pusher = new Pusher(APP_KEY, {\n  wsHost: 'localhost',\n  wsPort: 8080,\n  enabledTransports: [\"ws\", \"flash\"],\n  disabledTransports: [\"flash\"]\n});\n```\n\nA working poxa is on https://poxa.onrender.com/, with:\n\n* App key: \"app_key\"\n* App id: \"app_id\"\n* App secret: \"secret\"\n* Port: 80\n\nAlso a pusher example(https://github.com/pusher/pusher-presence-demo) is running using poxa at: http://poxa-presence-chat.herokuapp.com/\n\n## Console\n\nA simple console is available on index:\n\n![Console](http://i.imgur.com/zEbZZgN.png)\n\nYou can see it in action on [http://poxa.herokuapp.com](https://poxa.onrender.com/) using \"app_key\" and \"secret\" to connect. Now open the [poxa-presence-chat](http://poxa-presence-chat.herokuapp.com) and watch events happening!\n\n## Implementation\n\nPoxa uses [gproc](https://github.com/uwiger/gproc) extensively to register websocket connections as channels. So, when a client subscribes for channel 'example-channel', the websocket connection (which is a elixir process) is \"tagged\" as **{pusher, example-channel}**. When a pusher event is triggered on the 'example-channel', every websocket matching the tag receives the event.\n\n## Contributing\n\nIf you'd like to hack on Poxa, start by forking my repo on Github.\n\nDependencies can be fetched running:\n\n```console\nMIX_ENV=dev mix deps.get\n```\n\nCompile:\n\n```console\nmix compile\n```\n\nThe test suite used is the ExUnit and [Mimic](http://github.com/edgurgel/mimic) to mock stuff.\n\nTo run tests:\n\n```console\nmix test\n```\n\nPull requests are greatly appreciated.\n\n## TODO\n\n* [ ] SockJS support;\n* [x] Complete REST api;\n* [x] Mimic pusher error codes;\n* [x] Integration test using pusher-js or other client library;\n* [x] Web hooks;\n* [x] Add 'Vacated' and 'Occupied' events to Console;\n* [X] Use `gproc` to generate Console events so other handlers can be attached (Web hook for example);\n* [ ] Turn Poxa on a distributed server with multiple nodes;\n\n## Pusher\n\nPusher is an excellent service and you should use it in production.\n\n## Acknowledgements\n\nThanks to [@bastos](https://github.com/bastos) for the project name :heart:!\n\n## Who is using it?\n\n* [Waffle Takeout](https://takeout.waffle.io/)\n* [Tinfoil Security](https://tinfoilsecurity.com/)\n* Add your project/service here! Send a PR! :tada:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgurgel%2Fpoxa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgurgel%2Fpoxa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgurgel%2Fpoxa/lists"}