Useful for companies that has limited parking slots
- Notify others where you parked
- See available slots with parking schema
- Blame someone for not using chatbot
- SLACK_SIGNING_SECRET -- get it from slack
- SLACK_BOT_TOKEN -- get it from slack
- DATABASE_URL -- format: postgres://{user}:{password}@{hostname}:{port}/{database-name}
- AVAILABLE_SLOTS -- List of available parking slots in your company
- IMAGE_URL -- Link to the parking scheme (can be link to image that is in slack - https://slack-files.com/XXXX)
Bot is developed using Node.js and can be hosted on any server. You would need the following services:
- Server to host Node.js
- SQL database (PostgreSQL)
- Public API url that can be accessed by slack
Probably the simplest way is to deploy on Heroku:
- Create Heroku account - Heroku account
- Install Heroku CLI - CLI
- Run
heroku create {insert-app-name}
(created app on heroku) - Rune
heroku addons:create heroku-postgresql:hobby-dev
(adds Heroku PostgreSQL) - Run
heroku git:remote -a {insert-app-name}
(connects git to heroku) - Set the following environment variables: SLACK_SIGNING_SECRET, SLACK_BOT_TOKEN, DATABASE_URL, AVAILABLE_SLOTS, IMAGE_URL. As an example:
heroku config:set AVAILABLE_SLOTS=5,43,53,75
- Run
git push heroku master
(deploys application to heroku)
Useful info regarding slackbot setup and heroku deployment here