Requirements
- NodeJS 20
- Postgres
- Redis
- GitHub App
- Slack App
Prepare the environment
Create a GitHub Application
Firstly, you’ll need to create a GitHub application.Setup your GitHub app following the instructions below:
- General
- Permissions & events
- Generate a Client Secret
- Callback Url: https://your-web-app.com/github/callback
- Uncheck “Expire user authorization tokens”
- Check “Request user authorization (OAuth) during installation”
- Webhook
- Check “Active”
- Webhook Url: https://your-api.com/github/callback
- SSL verification
- Check “Enable SSL verification”
- Generate a Private Key
Create a Slack App
Create a Slack app on https://api.slack.com/apps/new, and add the settings below:
- OAuth & Permissions
- Event Subscriptions
- Create a Redirect URL: https://your-web-app.com/settings/integrations/slack
- Add the following Bot Token Scopes:
- app_mentions:read
- channels:join
- channels:read
- chat:write
- groups:read
- im:read
- im:write
- mpim:read
- reactions:read
- users.profile:read
- users:read
- users:read.email
Host API
Setup hosting for the API application. You may use our Docker image, or run it on your own infrastructure.Set your database credentials.Set your Redis credentials.Set your GitHub App credentials.Set your Slack App credentials.
Update the .env file
Make it production-ready.API
- Use
npmto install dependencies. - Run
npm run buildto build the application. - Run
npm run startto start the application.
Database migrations
Our API uses Prisma to communicate with the database. Runnpx prisma migrate deploy to run migrations.