{"id":27127799,"url":"https://github.com/ananto30/pushy","last_synced_at":"2025-10-24T20:44:36.109Z","repository":{"id":108635766,"uuid":"584204251","full_name":"Ananto30/pushy","owner":"Ananto30","description":"Open-source Pusher alternative","archived":false,"fork":false,"pushed_at":"2025-05-06T10:17:24.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-06T11:31:10.839Z","etag":null,"topics":["elixir","pusher","server-sent-events","sse"],"latest_commit_sha":null,"homepage":"","language":"Elixir","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/Ananto30.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-01T20:22:59.000Z","updated_at":"2025-05-06T10:17:28.000Z","dependencies_parsed_at":"2025-05-06T12:15:26.217Z","dependency_job_id":null,"html_url":"https://github.com/Ananto30/pushy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ananto30/pushy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananto30%2Fpushy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananto30%2Fpushy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananto30%2Fpushy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananto30%2Fpushy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ananto30","download_url":"https://codeload.github.com/Ananto30/pushy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ananto30%2Fpushy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280864998,"owners_count":26404439,"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","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["elixir","pusher","server-sent-events","sse"],"created_at":"2025-04-07T17:57:58.724Z","updated_at":"2025-10-24T20:44:36.104Z","avatar_url":"https://github.com/Ananto30.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pushy\n\nPushy is a simple server to send SSE (Server-Sent Events) to HTTP clients. It allows you to listen to a list of channels and post events to them.\n\n## 📋 Requirements\n\n* Elixir ~\u003e 1.12\n* Erlang/OTP 23+\n\n## 🚀 Installation\n\n1. Clone the repository:\n\n   ```sh\n   git clone https://github.com/ananto30/pushy.git\n   cd pushy\n   ```\n\n2. Install dependencies:\n\n   ```sh\n   mix deps.get\n   ```\n\n3. Compile the project:\n\n   ```sh\n   mix compile\n   ```\n\n## 🏃‍♀️ Running the Server\n\nTo start the server, set environment variables for the `AUTH_SECRET_KEY`\n\n```sh\nexport AUTH_SECRET_KEY=secret\n```\n\nthen run:\n\n```sh\nmix run --no-halt\n```\n\nThe server will start on port 4000 by default.\n\n## 📖 Usage\n\n### Auth Token\n\nVery first thing you need to do is to generate a token to authenticate the client. You can generate a token by running:\n\n```sh\nmix run -e \"{:ok, token} = Pushy.Auth.make_token(%{user_id: 1}); IO.puts(\\\"Generated JWT Token: #{token}\\\")\"\n```\n\n### Listening to Channels\n\nTo listen to channels, make an HTTP POST request to `/sse` with the channel names in the body.\n\nExample using [script](/example/listen.exs):\n\n```sh\nelixir example/listen.exs\n```\n\n\\*\\* Update the token in the file before running the script.\n\n### Posting Events to Channels\n\nTo post an event to a channel, make an HTTP POST request to `/publish/:channel_name` with the event data in the request body.\n\nExample using [script](/example/publish.exs):\n\n```sh\nelixir example/publish.exs\n```\n\n\\*\\* Update the token in the file before running the script.\n\n## 🧪 Testing\n\nTo run the tests, execute:\n\n```sh\nmix test\n```\n\n## 🐳 Docker Instructions\n\n### Building the Docker Image\n\nTo build the Docker image for your Elixir application, run the following command in the root directory of your project:\n\n```sh\ndocker build -t pushy:latest . --build-arg AUTH_SECRET_KEY=secret\n```\n\n**Creating `AUTH_SECRET_KEY` as a build argument will reduce runtime signed token validation execution time.*\n\n### Running the Docker Container\n\nTo run the Docker container, execute:\n\n```sh\ndocker run -p 4000:4000 pushy:latest\n```\n\nThe server will start on port 4000 inside the container and will be exposed on port 4000 on your host machine.\n\n## 📦 Dependencies\n\nPushy uses the following dependencies:\n\n* `plug_cowboy` - A Plug adapter for Cowboy\n* `jason` - A JSON library for Elixir\n* `uuid` - A UUID library for Elixir\n* `phoenix_pubsub` - A distributed PubSub system for Phoenix\n* `joken` - A JSON Web Token (JWT) library for Elixir\n\n## 📄 License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananto30%2Fpushy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fananto30%2Fpushy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananto30%2Fpushy/lists"}