A timer controlled by Twitch / Streamlabs donations. It is intended for use in subathons.
- Install Git and Docker
- Clone the repository
- Inside of the
docker
directory, create a copy of.env_template
, and rename it to.env
- Create a Twitch Application
- Edit the
.env
file to use your new Twitch Application's Client ID - Add an "OAuth Redirect URL" to your Twitch Application. Set it to the value that's in
VITE_REDIRECT_URL
- Add your username to the
ALLOWED_USERS
array inback/src/index.ts:17
Note
If you're using this in production, you might be changing the URLs in .env
to point to an internet accessible domain.
If this is indeed the case, change them to use the HTTPS / WSS protocols.
Note
If you're accessing this locally, but not on the same computer, skip steps 4-6, and leave CLIENT_ID and VITE_CLIENT_ID empty. This must be done because Twitch Applications only allow OAuth HTTP redirects to localhost.
- Windows:
docker/wscripts/update.bat
- Linux:
docker/lscripts/update.sh
- Windows:
docker/wscripts/pro-start.bat
- Linux:
docker/lscripts/pro-start.sh
- If internet accessible, reverse proxy on your domain to the
3080
(frontend) and3003
(backend) ports
The development environment uses Docker Volumes and Vite without building.
This will allow you to make edits to the source code without needing to rebuild the images.
However, this may result in much slower startup times.
- Windows:
docker/wscripts/dev-start.bat
- Linux:
docker/lscripts/dev-start.sh
- You can access the timer at: http://localhost:3080
- You can access the WebSocket backend on port
3003
- You can access the PostgreSQL database on port
5432
(Development Environment Only)