{"id":28407702,"url":"https://github.com/pixie-io/slackin","last_synced_at":"2025-08-03T23:35:03.279Z","repository":{"id":46644441,"uuid":"249338325","full_name":"pixie-io/slackin","owner":"pixie-io","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-27T06:56:56.000Z","size":752,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-09T00:31:12.235Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/pixie-io.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-23T04:49:42.000Z","updated_at":"2025-04-25T05:07:12.000Z","dependencies_parsed_at":"2022-09-04T13:23:07.004Z","dependency_job_id":null,"html_url":"https://github.com/pixie-io/slackin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pixie-io/slackin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixie-io%2Fslackin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixie-io%2Fslackin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixie-io%2Fslackin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixie-io%2Fslackin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixie-io","download_url":"https://codeload.github.com/pixie-io/slackin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixie-io%2Fslackin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268628927,"owners_count":24281058,"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-08-03T02:00:12.545Z","response_time":2577,"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":[],"created_at":"2025-06-02T01:36:33.680Z","updated_at":"2025-08-03T23:35:03.257Z","avatar_url":"https://github.com/pixie-io.png","language":"JavaScript","readme":"## PIXIE Updates\n\nThe docker image is built using github actions and pushed to `ghcr.io/pixie-io/slackin`\n\n## Features\n\nSlackin-extended is a more customizable and extendable fork of the original [slackin](https://github.com/rauchg/slackin).\n\n- A landing page you can point users to fill in their emails and receive an invite (`https://slack.yourdomain.com`)\n- An `\u003ciframe\u003e` badge to embed on any website that shows connected users in *realtime* with socket.io.\n- A SVG badge that works well from static mediums (like GitHub README pages)\n- Abuse prevention via [Google reCAPTCHA](https://www.google.com/recaptcha/intro/), including Invisible reCAPTCHA.\n- Color scheme customization on both the landing page and the badge.\n\nCheck out the [Demo](https://slackin-extended.now.sh/), which is deployed live from the `master` branch. For the list of changes in `slackin-extended` see [HISTORY.md](HISTORY.md).\n\n**Disclaimer:** this project is not affiliated with Slack. The Slack logo and Slack API are copyright Slack Technologies, Inc.\n\n## Usage\n\n### Badges\n\n#### Realtime ([demo](https://cldup.com/IaiPnDEAA6.gif))\n\n```html\n\u003cscript async defer src=\"https://slack.yourdomain.com/slackin.js\"\u003e\u003c/script\u003e\n\u003c!-- append \"?large\" to the URL for the large version --\u003e\n```\n\n#### SVG ([demo](https://cldup.com/jWUT4QFLnq.png))\n\n```html\n\u003cimg src=\"https://slack.yourdomain.com/badge.svg\"\u003e\n```\n\nBy default, the badge background color will be set to your accent color, but you can customize both background and text colors through the query string:\n\n```html\n\u003cimg src=\"https://slack.yourdomain.com/badge.svg?bg=e01563\u0026fg=ffffff\"\u003e\n```\n\n### Parameters\n\nEvery CLI parameter, including mandatory arguments (workspace ID and token), can alternatively be configured through environment variables.\n\n| Flag | Short | Environment variable | Default | Description |\n| --- | --- | --- | --- | --- |\n| Positional 1 | — | `SLACK_SUBDOMAIN` | **Required** | Slack workspace ID (`https://**{this}**.slack.com`) |\n| Positional 2 | — | `SLACK_API_TOKEN` | **Required** | [API token](https://get.slack.help/hc/en-us/articles/215770388-Creating-and-regenerating-API-tokens) |\n| --port | -p | `SLACKIN_PORT` | `3000` | Port to listen on |\n| --hostname | -h | `SLACKIN_HOSTNAME` | `'0.0.0.0'` | Hostname to listen on |\n| --channels | -c | `SLACKIN_CHANNELS` | `''` | One or more comma-separated channel names to allow single-channel guests |\n| --emails | -e | `SLACKIN_EMAILS` | `''` | Restrict sign-up to a list of emails (comma-separated; wildcards are supported) |\n| --interval | -i | `SLACKIN_INTERVAL` | `60000` | How frequently (ms) to poll Slack |\n| --path | -P | `SLACKIN_PATH` | `/` | Path to serve slackin under |\n| --silent | -s | `SLACKIN_SILENT` | `false` | Do not print out warnings or errors |\n| --cors | -x | `SLACKIN_CORS` | `false` | Enable CORS for all routes |\n| --analytics | -a | `SLACKIN_ANALYTICS` | `''` | Google Analytics ID |\n| --recaptcha-secret | -R | `RECAPTCHA_SECRET` | `''` | reCAPTCHA secret |\n| --recaptcha-sitekey | -K | `RECAPTCHA_SITEKEY` | `''` | reCAPTCHA sitekey |\n| --recaptcha-invisible | -I | `RECAPTCHA_INVISIBLE` | `''` | Use [invisible reCAPTCHA](https://developers.google.com/recaptcha/docs/invisible) |\n| --theme | -T | `SLACKIN_THEME` | `light` | Color scheme to use, `light` or `dark` |\n| --accent | -A | `SLACKIN_ACCENT` | `#e01563` for `light`, `#9a0e44` for `dark` | Accent color to use instead of a theme default |\n| --coc | -C | `SLACKIN_COC` | `''` | Full URL to a CoC that needs to be agreed to |\n| --css | -S | `SLACKIN_CSS` | `''` | Full URL to a custom CSS file to use on the main page |\n| | | `SLACKIN_PAGE_DELAY` | `0` | Delay (ms) between Slack API requests (may be required for large workspaces that hit the rate limit) |\n| | | `SLACKIN_PROXY` | `false` | Trust proxy headers (only use if Slackin is served behind a reverse proxy) |\n| | | `SLACKIN_HTTPS_REDIRECT` | `''` | If a domain name is specified in this parameter and `SLACKIN_PROXY` is set to `true`, Slackin will redirect requests with `x-forwarded-proto === 'http'` to `https://\u003cSLACKIN_HTTPS_REDIRECT\u003e/\u003coriginal URL\u003e` |\n| | | `SLACKIN_LETSENCRYPT` | `''` | [Let's Encrypt](https://letsencrypt.org/) challenge response |\n\nAlternatively, you can specify the configuration parameters in a [dotenv file](https://github.com/motdotla/dotenv): create a `.env` file in the root directory of your project and add environment-specific variables on new lines in the form of NAME=VALUE. For example:\n\n```\nSLACK_SUBDOMAIN=mysubdomain\nSLACK_API_TOKEN=SLACK-API-TOKEN\nSLACKIN_THEME=dark\n```\n\n## Extras\n\n### Tips and tricks\n\n- Please use reCAPTCHA for your Slack to avoid request flooding by spambots. Here is where to [get your secret and\nsitekey](https://www.google.com/recaptcha/admin). Make sure you choose a **v3 API key**.\n\n- [Invisible reCAPTCHA](https://developers.google.com/recaptcha/docs/invisible) is recommended for the realtime badge users, as the regular CAPTCHA challenge is broken inside the iframe that opens on badge click.\n\n- You can find or generate your API test token at [api.slack.com/web](https://api.slack.com/web). **Important notes**:\n  - you need a legacy token\n  - the user you use to generate the token must be an admin. You need to create a dedicated `@slackin-inviter` user (or similar), mark that user an admin, and use a test token from that dedicated admin user.  Note that test tokens have actual permissions so you **do not** need to create an OAuth 2 app. Also check out the Slack docs on [generating a test token](https://get.slack.help/hc/en-us/articles/215770388-Creating-and-regenerating-API-tokens).\n\n- **Important:** If you use Slackin in single-channel mode, you'll only be\nable to invite as many external accounts as paying members you have\ntimes 5. If you are not getting invite emails, this might be the reason.\nWorkaround: sign up for a free org, and set up Slackin to point to it\n(all channels will be visible).\n\n### Development\n\n1. [Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) this repository to your own GitHub account and then [clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) it to your local device\n2. Uninstall slackin if it's already installed: `npm uninstall -g slackin-extended`\n3. Link it to the global module directory: `npm link`\n4. Run it locally with `npm run dev`, after setting up the **needed** [environment variables](#parameters)\n\nYay! Now can use the `slackin` command everywhere.\n\n### Extending templates and themes\n\nIf changing accent colors and switching between light/dark themes isn't enough for you, all templates are stored inside `views/` and can be easily modified. Stylesheets are stored in `scss/`, and both themes have a documented example of colors, variables and additional styles necessary to create your own.\n\nIf you end up creating another theme, you're more than welcome to submit a PR!\n\n### API\n\nLoading `slackin` will return a `Function` that creates a `HTTP.Server` instance:\n\n```js\nconst slackin = require('slackin-extended');\n\nslackin({\n  token: 'SLACK-API-TOKEN', // reqired\n  org: 'your-slack-subdomain', // required\n  interval: 60000, // polling interval for Slack servers\n  path: '/some/path/you/host/slackin/under/', // defaults to '/'\n  cors: false, // set to \"true\" to enable CORS\n  recaptcha: {\n    secret: 'RECAPTCHA-SECRET', // reCAPTCHA secret\n    sitekey: 'RECAPTCHA-SITEKEY', // reCAPTCHA sitekey\n    invisible: true, // enable Invisible reCAPTCHA\n  },\n  analytics: 'GOOGLE-ANALYTICS-ID', // Google Analytics ID\n  theme: 'light', // color scheme: \"light\" or \"dark\"\n  accent: 'teal', // accent color (for buttons, text accents, etc.)\n  css: 'https://example.org/slackin-extra.css', // external CSS file to include\n  channels: 'community-public,testing', // for single-channel mode\n  emails: 'john@gmail.com,jane@gmail.com,*@johnandjane.com', // email whitelist\n  coc: 'https://example.org/code-of-conduct', // code of conduct link\n  proxy: false, // set to \"true\" if Slackin is set up behind a reverse proxy\n  redirectFQDN: 'slack.myorg.com', // redirect requests with x-forwarded-proto === 'http' to this domain\n  letsencrypt: 'LETSENCRYPT-CHALLENGE', // Let's Encrypt challenge\n  silent: false, // suppress warnings\n  server: http.Server(), // optional, allows passing in an existing http server object\n}).listen(3000)\n```\n\nThis will show response times from Slack and how many online users you have on the console. The returned `http.Server` has an `app` property that is the `express` application that you can define or override routes on.\n\nAll the metadata for your organization can be fetched via a JSON HTTP request to `/data`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixie-io%2Fslackin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixie-io%2Fslackin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixie-io%2Fslackin/lists"}