36092f0269da08064aeee7dbf62ded5bd6d8b8cf
tssbot.web-frontend
React/Vite frontend and production Node.js server for the TSS Bot web platform.
Structure
frontend/- React SPA (Vite + Tailwind v4)server.cjs- Production Node.js server (serves SPA, proxies API, analytics, uptime)webhook.cjs- GitHub deploy webhook listenersystemd/- systemd unit files for all servicesscripts/- Deployment and test scripts
Development
npm install
cp example.env .env # edit with your values
npm run dev # Vite dev server on :3001
Build
npm run build # Outputs to dist/
Production
npm run build
node server.cjs # Serves on PORT (default 3010)
Deploy Webhook
node webhook.cjs # Listens on WEBHOOK_PORT (default 3011)
Environment Variables
See example.env for all available variables. Key ones:
| Variable | Description |
|---|---|
PORT |
Server port (default: 3010) |
API_UPSTREAM |
Backend API URL (default: http://127.0.0.1:6000) |
PUBLIC_ORIGIN |
Public-facing URL |
VITE_TURNSTILE_SITE_KEY |
Cloudflare Turnstile public key |
TURNSTILE_SECRET_KEY |
Cloudflare Turnstile secret key |
Languages
JavaScript
88.8%
CSS
4.9%
TypeScript
2.8%
Shell
2.3%
HTML
1.2%