https://github.com/o-mago/spotify-status
Slack App for sharing what you are listening on Spotify with others through Slack Status
https://github.com/o-mago/spotify-status
go golang hacktoberfest slack spotify
Last synced: 5 months ago
JSON representation
Slack App for sharing what you are listening on Spotify with others through Slack Status
- Host: GitHub
- URL: https://github.com/o-mago/spotify-status
- Owner: o-mago
- Created: 2020-11-22T04:00:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-10-25T15:59:24.000Z (over 2 years ago)
- Last Synced: 2024-06-20T00:30:51.699Z (almost 2 years ago)
- Topics: go, golang, hacktoberfest, slack, spotify
- Language: Go
- Homepage:
- Size: 3.96 MB
- Stars: 32
- Watchers: 3
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Spotify Status for Slack
This slack app allows you to share your musical taste with your coworkers inside Slack, by allowing the app to connect to your spotify account
## Built and running with:
- Go
- Docker
- Fly.io
- New Relic
- Slack API
- Spotify API
## Go external libs
- [google/uuid](https://github.com/google/uuid)
- [new-relic/go-agent](https://github.com/newrelic/go-agent)
- [robfig/cron/v3](https://github.com/robfig/cron)
- [slack-go](https://github.com/slack-go/slack)
- [zmb3/spotify](https://github.com/zmb3/spotify)
- [gorm](https://gorm.io/index.html)
## Application layers
There are 3 main layers:
- handlers: only call exported services.
- services: call unexported services and repositories
- repositories: communicate with database (and eventually other repos)
## Folders structure
📦src
┣ 📂app_error
┣ 📂crypto
┣ 📂domain
┣ 📂handlers
┣ 📂repositories
┃ ┣ 📂db_entities
┣ 📂services
┣ 📂static
┃ ┣ 📂completed
┃ ┣ 📂home
┗ 📜server.go
`app_error`: custom application errors
`domain`: entities from application business rules
`handlers`: api handlers
`repositories`: database related, including queries
`db_entities`: database entities, a mirror from the schema
`services`: where all the logic is applied to make the magic happen
`static`: UI files
`completed`: UI for the completed page (after the user accepted everything)
`home`: UI for the homepage
## Medium (outdated)
https://medium.com/@alexandre.cabral/building-a-slack-app-for-spotify-with-go-64ff71959bd1
### Run locally
`docker compose up`
### Deploying
First, setup your fly.io account, database and new relic, then:
```
fly launch
fly auth login
fly secrets set
fly deploy
```
### Running app
[https://spotify-status-slack.fly.dev](https://spotify-status-slack.fly.dev)