Skip to content

Commit 72d1cd8

Browse files
authored
Merge pull request #4 from a-rmz/release1.0
Release1.0
2 parents e7418b7 + a311982 commit 72d1cd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2292
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["flow"]
3+
}

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
NODE_ENV=""
2+
LOGFILE=""
3+
4+
SPOTIFY_CLIENT_ID=""
5+
SPOTIFY_CLIENT_SECRET=""
6+
7+
SLACK_CLIENT_ID=""
8+
SLACK_CLIENT_SECRET=""
9+
SLACK_REDIRECT_URI=""

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.gitignore
2+
node_modules/
3+
migrations/
4+
build/

.eslintrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "fbjs",
3+
"rules": {
4+
"comma-dangle": 0,
5+
"no-console": 2
6+
}
7+
}

.flowconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[ignore]
2+
.*/__tests__/.*
3+
./build
4+
5+
[include]
6+
7+
[libs]
8+
9+
[options]
10+
module.ignore_non_literal_requires=true

.gitignore

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# Yarn Lock
58+
yarn.lock
59+
60+
# dotenv environment variables file
61+
.env
62+
63+
# Vim stuff
64+
# swap
65+
[._]*.s[a-v][a-z]
66+
[._]*.sw[a-p]
67+
[._]s[a-v][a-z]
68+
[._]sw[a-p]
69+
# session
70+
Session.vim
71+
# temporary
72+
.netrwhist
73+
*~
74+
# auto-generated tag files
75+
tags
76+
77+
# Build
78+
build
79+
80+
# Database
81+
*.sqlite3

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Sbotify
2+
3+
A Slack app that allows you to easily share the new artists you discover, or that cool song you want your teammates to listen to!
4+
5+
## How to use it?
6+
For usage-only, please go to the [main website](https://a-rmz.github.io/sbotify/). There you'll find all the information you need use the app.
7+
8+
Now, if you want to run your own instance, this is the place to be.
9+
10+
## Setup
11+
### Spotify
12+
- Go to [Spotify developer's site](https://developer.spotify.com/) and create a new app.
13+
- Keep the tab open, you'll need the Client ID and Secret soon
14+
15+
### Slack
16+
- Go to [Slack apps](https://api.slack.com/apps) and create a new one.
17+
- Create a [Slash command](https://api.slack.com/slash-commands) `/sbotify` (or however you wanna call it) that redirects you to
18+
- `https://youraddress.com/slack/incoming`
19+
- Create an [Interactive Message](https://api.slack.com/interactive-messages) integration that points to
20+
- `https://youraddress.com/slack/postback`
21+
- That is used for the buttons that will share the content
22+
- Activate the [bot user](https://api.slack.com/bot-users)
23+
- *Pro tip:* Use a cool bot name 😎
24+
- The bot will be in charge of sending the music across the team
25+
- Go to OAuth & Permissions and add the `chat:write:bot` permission
26+
27+
[Optional]
28+
- In case you want to use OAuth
29+
- Go to OAuth & Permissions and add a new Redirect URL redirects to
30+
- `https://youraddress.com/slack/auth`
31+
32+
**NOTE:** All the URLs you provide for your app must be secure (`https`).
33+
34+
### Sticking all together
35+
Now, going back to your environment:
36+
- Copy and rename the `.env.example` to `.env` and fill the required variables
37+
- *Client Secret*, *Client Id*, and *Redirect URI* from Spotify
38+
- *OAuth Access Token* from the Slack app
39+
40+
The REDIRECT_URI will be used only in case you want to use OAuth, otherwise, you can leave it empty.
41+
42+
Almost there. Now you have to install all the dependencies. Depending on your package manager you can either `npm install` or `yarn`.
43+
44+
Run the database migrations in order to create the adequate schemas.
45+
46+
```[ yarn | npm ] run migrate up```
47+
48+
## Build and run the app
49+
```[ yarn | npm ] run build```
50+
```[ yarn | npm ] start```
51+
52+
--------
53+
Developed with <3

0 commit comments

Comments
 (0)