A Slack bot that uses Yelp to suggest and save places to go for lunch.
- Node
- Slack Bots
- Botkit (Slack Bot API)
- Yelp API
- AWS
- MongoDB
- Monk (MongoDB API)
- Node 6.x & NPM 3.x (or
brew install node
if using macOS)
Name | Purpose | Example | Required |
---|---|---|---|
SLACK_API_TOKEN |
The Slack API auth token. | Abc123 |
Yes |
MONGODB_URI |
The MongoDB connection string. | localhost:27017/my_database |
Yes |
YELP_CONSUMER_KEY |
The Yelp API consumer key | Abc123 |
Yes |
YELP_CONSUMER_SECRET |
The Yelp API consumer secret | Abc123 |
Yes |
YELP_TOKEN |
The Yelp API token | Abc123 |
Yes |
YELP_TOKEN_SECRET |
The Yelp API token secret | Abc123 |
Yes |
DEFAULT_LOCATION |
The default location that Yelp will use for searches | '18022 Cowan, Irvine, 92614' |
Yes |
- Create a Slack bot (this will yield an API token)
- Create a Yelp account (or login to an existing one)
- Obtain a Yelp API key
- Duplicate
.env.sample
, rename it to.env
and provide values for each key (see above) npm i
- Ensure that MongoDB is running and the database has been created at the location specified in the environment variable
npm start
(or./node_modules/.bin/pm2 start index.js
)- Invite your bot to a channel and start chatting!
- Tests
- Database seeding (
npm run seed
) - User voting