The TRESR community chatbot
This repository contains the source files for the Ron Jay chatbot backend.
This is an unofficial chatbot for the TRESR community and is not affiliated with the TRESR project.
It is made with ❤️ love ❤️ for the TRESR community.
# Get the dependencies
just -q init
# Update the dependencies
just -q update
# Login to Cloudflare
just -q login
# Build the local workers
just -q build
# Start the local workers
just -q start
# Stop the local workers
just -q stopThere are a few URLs that you can use to test the chatbot locally depending on the worker.
Caddy Server can be used to proxy the chatbot requests to the correct worker.
One you have started the script from the frontend repository, access Caddy at: https://localhost:9000 this will then direct to either;
- http://localhost:9100 for the frontend worker
- http://localhost:9200 for the backend worker
The frontend worker is managed in a separate repository and is responsible for rendering the chatbot UI using Astro.
The source code for the frontend worker can be found in the chatbot-frontend repository.
Access to the Frontend Worker is via Caddy at: https://localhost:9000 -> http://localhost:9100
The frontend worker embeds the UI Widget worker on the main page behind a button or offers a fullscreen page at /fullscreen.
The backend worker is managed in this repository.
Once you have the chatbot backend running, access to the Worker is via Caddy at: https://localhost:9000/ai -> http://localhost:9200
Once up-and-running, to test from the CLI run;
curl \
--insecure \
--request POST \
--header "Origin: https://localhost:9000" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${AI_SECRET}" \
--data '{"message": "Hello, world!"}' \
https://localhost:9000/ai/v1/chatbot