LachlanCourt / qwik-webapp

A web interface written in Qwik JS used to manage a python chatbot for twitch. Investigates authenticated APIs, webhooks, and SSR in JS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qwik Webapp

This webapp is designed as a web interface for a separate bot that connects to the twitch API as a chatbot.

Installation

  1. Ensure postgres, node 20+, and yarn are installed
  2. Create a .env file 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>
  1. Run yarn install
  2. Run yarn prisma migrate dev to populate your database with empty tables from the migration
  3. Run node add-global-admin.js to seed the data provided as admin env vars as a global admin in the db
  4. Run yarn dev

Helpful commands

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

About

A web interface written in Qwik JS used to manage a python chatbot for twitch. Investigates authenticated APIs, webhooks, and SSR in JS

License:MIT License


Languages

Language:TypeScript 94.6%Language:CSS 1.9%Language:JavaScript 1.9%Language:Dockerfile 0.9%Language:Makefile 0.5%Language:Shell 0.1%