{"id":13989976,"url":"https://github.com/avoidwork/rozu","last_synced_at":"2025-07-22T11:32:31.724Z","repository":{"id":33192774,"uuid":"36834781","full_name":"avoidwork/rozu","owner":"avoidwork","description":"Webhook server","archived":true,"fork":false,"pushed_at":"2017-05-13T13:51:11.000Z","size":538,"stargazers_count":96,"open_issues_count":1,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-16T07:48:44.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://avoidwork.github.io/rozu","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avoidwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-03T22:43:35.000Z","updated_at":"2023-01-27T20:28:19.000Z","dependencies_parsed_at":"2022-08-17T20:11:10.569Z","dependency_job_id":null,"html_url":"https://github.com/avoidwork/rozu","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avoidwork%2Frozu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avoidwork%2Frozu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avoidwork%2Frozu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avoidwork%2Frozu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avoidwork","download_url":"https://codeload.github.com/avoidwork/rozu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227089489,"owners_count":17729474,"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":[],"created_at":"2024-08-09T13:02:13.326Z","updated_at":"2024-11-29T09:30:39.079Z","avatar_url":"https://github.com/avoidwork.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Rozu\n\nRozu is a webhook API server, using MongoDB for persistent storage \u0026 Redis for pub/sub of inbound events\n\n![demo graphic](https://cldup.com/yCd_d6AL58.png \"rozu demo\")\n\n[![build status](https://secure.travis-ci.org/avoidwork/rozu.svg)](http://travis-ci.org/avoidwork/rozu)\n\nEach response will include a `Link` header, and an `Array` of `Objects` with `IANA` defined `rel` properties \u0026 URIs.\n\n## Receiving webhook events\nRozu has a publically accessible route `/receive` which will accept a JSON or form encoded payload \u0026 put it into **Redis**\nfor pub/sub behavior in your local stack. Inbound requests must include a user supplied token (`token` in `config.json`)\nwhich maps to a registered webhook; tokens are v1 UUIDs.\n\nInbound events will be published with a channel name of `config.id_webhook.name`, e.g. \"rozu_github\".\n\n## Sending webhook events\nSending a webhook is as easy as publishing into Redis with a channel name of `config.id_webhook.name_send`,\ne.g. \"rozu_github_send\", or POST to `/send` after authenticating at `/login`. Outbound webhook properties to configure\nthe request are `uri`, \u0026 `encoding`. If not specified `encoding` will default to `json`. The value of `encoding` can be\n`json`, `querystring`, or `form`. The request body will contain the webhook id as the value of `config.token`, for\nvalidation.\n\nCustom headers for outbound webhooks are supported by specifying a `headers` value (an Object is expected).\n\nSending an outbound webhook from Redis may look like this:\n\n```javascript\nclientPublish.publish(\"rozu_github_send\", serialize({\"token\": \"bb8bf370-0a54-11e5-9c1d-9389475d0a28\", \"message\": \"Hello World!\"}));\n```\n\n## Requirements\n- node.js\n- MongoDB (persistent storage of accounts, \u0026 webhook configurations)\n- Redis (pub/sub for local stack of inbound events)\n- (Optional) nginx for SSL termination, \u0026 reverse proxy\n\n## How do I run Rozu?\n`Rozu` can be up and running in 3 steps! When run in a production environment, it's recommended that you use `nginx`\nto terminate SSL, and reverse proxy to `Rozu`. Using a daemon like `upstart` (on Linux) to run `rozu` is ideal.\n\n1.  Clone [this](https://github.com/avoidwork/rozu) repository, or install from `npm`:\n    1.  `$ npm install rozu`\n    2.  `$ ln -s node_modules/rozu/config.json config.json`\n    3.  `$ ln -s node_modules/rozu/index.js index.js`\n2.  Edit `config.json` to configure your email server, etc.\n3.  Run via `node index.js`\n\n#### Upstart\nUse the provided upstart recipe: `sudo cp node_modules/rozu/rozu.conf /etc/init; service start rozu`\n\n#### Systemd\nUse the provided systemd service: `sudo cp node_modules/rozu/rozu.service /etc/systemd/system; systemctl enable rozu \u0026 systemctl start rozu`\n\n#### What about Windows?\nYou need to have Visual Studio Community Edition (or higher) installed, because some dependencies must compile.\n\n## Getting Started\nThe following steps outline how the system is intended to be utilized.\n\n- Register an account\n- Verify account\n- Login with account\n- Create a webhook by registering the remote host\n\n\n## Registration\nTo register, make a `GET` request to `/register` to retrieve instructions.\n\nRegistration is a two step process, requiring email verification. Please fill out `email` in `config.json`.\n\n## Authentication\nTo authenticate, make a `GET` request to `/login` to retrieve instructions.\n\nTo logout, make a `GET` request to `/logout`.\n\n## Your Profile\nMake a `GET` request to `/profile`. You will have CRUD operations, defined by the `allow` header.\n\nAn `SSE` (Server Sent Event) stream is available at `/profile/stream`.\n\n## Getting Administrator Access\nOnce authenticated, make `GET` request to `/admin`; this requires your account email address in the `admin` Array in `config.json`.\n\nAn `SSE` (Server Sent Event) stream for administrators is available at `/stream`.\n\n## Routes\nA `GET` request to `/` will return different results, depending upon the state of your session.\n\n### Unauthenticated\n\n```json\n{\n\t\"data\": [\n\t\t\"login\",\n\t\t\"receive\",\n\t\t\"register\"\n\t],\n\t\"error\": null,\n\t\"links\": [\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/login\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/receive\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/register\"\n\t\t}\n\t],\n\t\"status\": 200\n}\n```\n\n### Authenticated\n\n```json\n{\n\t\"data\": [\n\t\t\"admin\",\n\t\t\"logout\",\n\t\t\"profile\",\n\t\t\"receive\",\n\t\t\"send\",\n\t\t\"stream\",\n\t\t\"users\",\n\t\t\"webhooks\"\n\t],\n\t\"error\": null,\n\t\"links\": [\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/admin\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/logout\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/profile\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/receive\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/send\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/stream\"\n\t\t}\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/users\"\n\t\t},\n\t\t{\n\t\t\t\"rel\": \"item\",\n\t\t\t\"uri\": \"/webhooks\"\n\t\t}\n\t],\n\t\"status\": 200\n}\n```\n\n## License\nCopyright (c) 2017 Jason Mulligan\nAll Rights Reserved\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favoidwork%2Frozu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favoidwork%2Frozu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favoidwork%2Frozu/lists"}