Automatically sync your currently playing Spotify music with your Slack status.
- Setup Guide - Complete setup instructions
- Commands Reference - All available slash commands
- Auto-sync: Updates your Slack status with currently playing Spotify tracks and podcasts
- Real-time: Status updates every 10 seconds when music changes
- Playback Controls: Control Spotify playback directly from Slack
- Secure: OAuth tokens encrypted using AES-256
- Customizable: Configure emoji, status format, and visibility preferences
- Content Filtering: Sync music only, podcasts only, or both
- Rotating Emojis: Set multiple emojis that rotate with each track change
- Backend: Java 25 + Spring Boot 4.0.2
- Database: MongoDB
- APIs: Slack API, Spotify Web API
- Security: OAuth2, Spring Security, AES-256 encryption
- Java 25 or higher
- MongoDB (local or cloud instance)
- Slack workspace with admin access
- Spotify Premium account (required for playback control)
git clone <repository-url>
cd statusbeatCreate a .env file:
# Slack Configuration
SLACK_CLIENT_ID=your_slack_client_id
SLACK_CLIENT_SECRET=your_slack_client_secret
SLACK_SIGNING_SECRET=your_slack_signing_secret
SLACK_REDIRECT_URI=http://localhost:8080/oauth/slack/callback
# Spotify Configuration
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_REDIRECT_URI=http://localhost:8080/oauth/spotify/callback
# MongoDB Configuration
SPRING_DATA_MONGODB_URI=mongodb://localhost:27017/statusbeat
# Encryption (generate with: openssl rand -base64 32)
ENCRYPTION_SECRET_KEY=your_32_character_secret_key_here./gradlew build
./gradlew bootRunThe application starts on http://localhost:8080.
- Visit
http://localhost:8080 - Click "Connect to Slack"
- Authorize Slack access
- Authorize Spotify access
- Your status syncs automatically
| Command | Description |
|---|---|
/statusbeat play |
Resume Spotify playback |
/statusbeat pause |
Pause Spotify playback |
/statusbeat status |
Show current sync status |
/statusbeat sync |
Manually trigger sync |
/statusbeat enable |
Enable automatic sync |
/statusbeat disable |
Disable automatic sync |
/statusbeat reconnect |
Reconnect Spotify account |
/statusbeat purge |
Delete your account and all data |
/statusbeat help |
Show help message |
Default format: {title} - {artist}
Available placeholders:
{title}- Song title{artist}- Artist name
The default status emoji is :musical_note:.
Configure multiple emojis that rotate randomly with each track change. When set, the system picks a random emoji from the list instead of using the default emoji.
Choose what content to sync:
MUSIC- Only sync music tracksPODCASTS- Only sync podcast episodesBOTH- Sync both (default)
Default polling interval is 10 seconds:
statusbeat.sync.polling-interval=10000src/main/java/com/statusbeat/statusbeat/
โโโ config/ # Configuration classes
โโโ controller/ # REST controllers
โโโ model/ # MongoDB entities
โโโ repository/ # Data access layer
โโโ service/ # Business logic
โโโ slack/ # Slack integrations
โโโ util/ # Utilities
- OAuth tokens encrypted using AES-256 with PBKDF2 key derivation
- HTTPS enforced in production
- CSRF protection enabled for web endpoints
- Never commit
.envor credentials
./gradlew test
./gradlew test jacocoTestReport # With coveragedocker build -t statusbeat .
docker-compose up -dUpdate redirect URIs in Slack and Spotify apps to use your deployed URL.
| Issue | Solution |
|---|---|
| MongoDB connection fails | Verify MongoDB is running and connection string is correct |
| Slack OAuth errors | Check redirect URI matches exactly in Slack app settings |
| Status not updating | Run /statusbeat status to verify sync is enabled |
| Home Tab not loading | Enable Event Subscriptions and subscribe to app_home_opened |
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | Home page |
/oauth/slack |
GET | Initiate Slack OAuth |
/oauth/slack/callback |
GET | Slack OAuth callback |
/oauth/spotify |
GET | Initiate Spotify OAuth |
/oauth/spotify/callback |
GET | Spotify OAuth callback |
/slack/events |
POST | Slack events endpoint |
/health |
GET | Health check |
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
MIT License
