This webapp is designed as a web interface for a separate bot that connects to the twitch API as a chatbot.
- Ensure postgres, node 20+, and yarn are installed
- Create a
.envfile with the following data
JWT_SECRET= <Random values for jwt encryption>
SENDGRID_API_KEY= <Sendgrid API Key (Only needed in production)>
SENDGRID_FROM_ADDRESS= <From email address>
DATABASE_URL= postgresql://<databasename>:password@0.0.0.0:PORT
ADMIN_EMAIL= <your-email>
ADMIN_PASSWORD= <your-password>
ADMIN_NAME= <your-name>- Run
yarn install - Run
yarn prisma migrate devto populate your database with empty tables from the migration - Run
node add-global-admin.jsto seed the data provided as admin env vars as a global admin in the db - Run
yarn dev
The makefile contains a number of helpful commands for running in docker. Builds to this repo build the docker image and run an audit on npm package security vulnerabilities before being able to merge. To test this will pass locally you can run npm run build to build the app baremetal, or make build to build the docker image locally. Once built locally you can run either yarn serve to run baremetal, or make run to run in docker.
To inspect the database locally you can run yarn prisma studio to open an in browser edit tool