Make sure to have the following tools installed:
nvm
(optional)node
(v18.x)pnpm
docker
aws
(v2)
You will never have to run the code locally, other than to run tests.
pnpm verify
See the .aws/README.md
to setup your computer for deployments. Afterwords, you can simply run the following from any folder in the project:
# Sign into AWS dev
dev
# Deploy to dev
pnpm deploy
You don't have to commit anything before doing a deploy. Just make a change and deploy!
This repo uses Conventional Commits. Here are the types of commits we use:
feat: ...
- Used when the commit introduces a new featurefix: ...
- Fixing a bug in user facing codechore: ...
- Refactor, fixing lint or test errors, formatting, etcci: ...
- When you update the CI (no example)docs: ...
- When you update theREADME.md
or other documentationBREAKING CHANGE: ...
- When there's a feature that leads to a completely different flow for users (no example)
On feature branches, don't worry about doing conventional commits. Instead, just name the PR According to the patterns above, and scope it to just that one thing. When you squash and merge (the only allowed way to merge), the commit message will default to a conventional commit. Fill out a description if you want, but leave the title of the commit untouched.
- Slack App Config: https://api.slack.com/apps/A01TFKZKPT7/general
- Spreadsheet Databases: https://drive.google.com/drive/folders/1bCO8LllRNpysu65WOjBsUAZUnrDqXDX0?usp=sharing
-
Create a
.env
file at the root of the project and add the following entriesINTERVIEWING_CHANNEL_ID= ERRORS_CHANNEL_ID= SPREADSHEET_ID=1ChOEjl5l_Uh5dTd_fRjGJt8z7bFNNOwPlzgRnhOLgTY REQUEST_EXPIRATION_MIN=15 PORT=3000 MODE=dev SLACK_BOT_TOKEN= SLACK_SIGNING_SECRET= GOOGLE_SERVICE_ACCOUNT_EMAIL= GOOGLE_PRIVATE_KEY=
INTERVIEWING_CHANNEL_ID
,ERRORS_CHANNEL_ID
, andSPREADSHEET_ID
can be found incdk.json
HACK_PARSER_BUCKET_NAME
can be found incdk.json
- If provided as an empty string, the HackParser integration will be disabled.
SLACK_BOT_TOKEN
,SLACK_SIGNING_SECRET
,GOOGLE_SERVICE_ACCOUNT_EMAIL
, andGOOGLE_PRIVATE_KEY
come from AWS Secrets Manager- The
GOOGLE_PRIVATE_KEY
multi-line variable needs to be turned into a single line wrapped in quotes.GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nMIIEvQ\n-----END PRIVATE KEY-----"
-
Create your own bot (optional)
- Within Slack create a new Bot with the following scopes
chat:write
chat:write.customize
workflow.steps:execute
commands
users:read
reactions:read
- The
SLACK_BOT_TOKEN
variable comes from the "OAuth Tokens for Your Workspace" section once the application has been installed into your test workspace.
- Within Slack create a new Bot with the following scopes
-
Install
ngrok
-brew install ngrok
, start the application usingngrok http 3000
and make note of the URL. -
Put the URL +
/slack/events
into the "Interactivity & Shortcuts" page within the slack website for your app.