PAXminer has been serving F3 Nation for a while now. We are standing up a new database and Slackbot. Check out https://github.com/F3-Nation to see what we're working on and to contribute.
Welcome to QSignups! This is a Slack App hosted in AWS Lambda to manage the Q signups and calendar for F3 regions.
- Use this link to install (preferably from desktop)
- You will probably get an error message - just hit the "try again from here" link
@HelpDesk from F3 Alliance has put together a great guide to share with your PAX on how to find and use QSignups.
Further instructions coming for administrators.
Any feedback and ideas you have for the app are welcomed! Please leave feature requests as an Issue with the tag 'enhancement'
QSignups is in active development, and I welcome any and all help or contributions! Feel free to leave an Issue with bugs or feature requests, or even better leave us a Pull Request.
I've got Github actions that trigger on pushes to the master branch... the Github action will build a deployment package and deploy first to a test environment, then eventually to our prod environment (it will first prompt me for a manual approval).
If you'd like to contribute to QSignups, I highly recommend setting up a local development environment for testing. Below are the steps to get it running (I did this in unix, YMMV on OSX or Windows):
- Clone the repo:
git clone https://github.com/evanpetzoldt/qsignups-lambda.git- Install the AWS Serverless Application Model (SAM) CLI
- Set up a local database (code & instructions coming)
- Create the Slack bot:
- Navigate to api.slack.com
- Click "Create an app"
- Click "From a manifest", select your workspace
- Paste in the manifest below
- After creating the app, you will need a couple of items: first, copy and save the Signing Secret from Basic Information. Second, copy and save the Bot User OAuth Token from OAuth & Permissions
display_information:
name: QSignups-dev
description: Manage your F3 Region Schedule.
background_color: "#2200AA"
features:
app_home:
home_tab_enabled: true
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: QSignups-dev
always_online: true
slash_commands:
- command: /hello
url: https://YourNgrokURL/slack/events
description: Test saying hello
usage_hint: /hello open mailbox
should_escape: false
- command: /schedule
url: https://YourNgrokURL/slack/events
description: Query for upcoming schedule
usage_hint: /schedule tomorrow
should_escape: false
oauth_config:
redirect_urls:
- https://YourNgrokURL/slack/auth
scopes:
bot:
- app_mentions:read
- channels:history
- channels:join
- channels:read
- chat:write
- chat:write.customize
- chat:write.public
- commands
- files:read
- files:write
- im:history
- im:read
- im:write
- reactions:read
- reactions:write
- team:read
- users:read
- users:read.email
settings:
event_subscriptions:
request_url: https://YourNgrokURL/slack/events
bot_events:
- app_home_opened
- app_mention
interactivity:
is_enabled: true
request_url: https://YourNgrokURL/slack/events
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false- Back to your project, create a
env.jsonfile at the root of the directory. The file should take the format (you will need to replace most of the values):
{
"Parameters": {
"SLACK_SIGNING_SECRET": "SIGNING_SECRET_FROM_ABOVE",
"SLACK_BOT_TOKEN": "BOT_TOKEN_FROM_ABOVE",
"DATABASE_HOST": "localhost",
"ADMIN_DATABASE_USER": "local_user",
"ADMIN_DATABASE_PASSWORD": "local_password",
"ADMIN_DATABASE_SCHEMA": "f3stcharles"
}
}- Small note: I had to use my local ip address for
DATABASE_HOST, not "localhost"
- Install ngrok and run the following command from your terminal:
ngrok http 3000- Copy the Forwarding URL (has ngrok.app at the end)
- Back in your browser for the Slack app, replace all of the YourNgrokURLs with the ngrok Forwarding URL
- You are now ready to roll! This would be a good time to make sure you're on your own branch :)
- To run the app after you've made some changes, use the following command:
sam build --use-container --container-env-var-file env.json && sam local start-api --env-vars env.json --warm-containers EAGER- The
sam buildcommand will build a Docker container mimicking the functionality of the deployed Lambda. Thelocal start-apicommand starts a listener on that container. The Slack API will send requests to your ngrok URL, which will route to your local Docker. If you want to make changes to the code, stop the deployment by using [Ctrl-C] in the terminal where you ran thesam buildcommand, and re-run the command.- If you want to avoid rebuilding your Docker every time you make a change, you can simply edit the code created by the build command in the
.aws-samdirectory. However, this folder will not be version controlled, so I choose not to use it
- If you want to avoid rebuilding your Docker every time you make a change, you can simply edit the code created by the build command in the
