🔥 tokenbot

slack bot / social recognition platform

🚀 .env config

# engine/.env
SLACK_BOT_TOKEN="xoxb-example"
# bot/.env
SLACK_APP_TOKEN="xapp-example"
SLACK_BOT_TOKEN="xoxb-example"
# web/.env
NEXTAUTH_SECRET=changeme
NEXTAUTH_URL="https://example123.ngrok/api/auth"

SLACK_APP_TOKEN="xapp-example"
SLACK_BOT_TOKEN="xoxb-example"

📦 run inside docker

# build and run container
docker compose build
docker compose up

# serve app over https (required)
ngrok http 3000 --domain example123.ngrok.io

# access web app
open https://example123.ngrok.io/

🔥 local dev

# https://docs.docker.com/compose/
cd dev

# start redis
docker compose up
# https://ocaml.org/docs/up-and-running
cd engine

# setup opam environment
opam switch create 5.0.0  
eval $(opam env --switch=5.0.0)

# install dependencies
opam install -y --deps-only .

# build project
dune build

# run tests
dune test
# https://nodejs.dev/en/learn/how-to-install-nodejs/
cd bot

# install dependencies
npm install

# start slack bot
npm run dev
# https://nextjs.org/docs
cd web

# install dependencies
npm install

# start web app
npm run dev
# serve app over https (required)
ngrok http 3000 --domain example123.ngrok.io

# access web app
open https://example123.ngrok.io/