Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

hackclub/slack-stats

Repository files navigation

⚠️ This repo is deprecated

Looking for data? We moved to Projects Weekly Reporting instead.


Weekly Sync

A little web app to collect and visualize weekly stats for the Hack Club Slack. Statistics are fun and help us make the Slack better, but Slack's official stats page kinda sucks!

Feel free to suggest or add features by opening an issue or pull request.

Stack: Next.js 13 beta with app directory. Airtable for configuration and as a database.

screenshot of the sprig stats page

Maintenance

Configuration:

Open the Slack Stats base in the Hack Club airtable. You'll need org access.

If you don't have access to the Hack Club org on Airtable, you can access a read-only copy of the database: airtable.com/shrchjsMgctNzkEDt

Deployment and logs:

This is deployed on Vercel to slack-stats.hackclub.dev. The project is under Hack Club's Vercel org.

GitHub Actions should automatically run a sync job every Sunday.

Run locally:

Clone the repo, cd into it, and run yarn to install dependencies.

Run yarn dev to start the development server for the website.

Run yarn sync to sync new Slack stats to Airtable.

Environment variables:

Put these in a .env file in the project root using newline-separated KEY=VALUE format.

  • AIRTABLE_API_KEY: Personal access token that should have access to the Airtable base. Create one at the Airtable developer center.
  • SLACK_XOXC:
    • Load the official Slack stats page
    • Open the "Network" tab of Chrome developer tools
    • Click the request that starts with "team.stats.timeSeries"
    • Navigate to the "Payload" tab
    • Use contents of the token field
  • SLACK_XOXD:
    • Load the official Slack stats page
    • View cookies with EditThisCookie browser extension or "Application" tab of Chrome devtools
    • Use contents of the d cookie

About

[DEPRECATED] How many stats would a slack stat stat if a slack stat could stat slack?

Resources

Code of conduct

Contributing

Stars

Watchers

Forks