Commit graph

13 commits

Author SHA1 Message Date
c481ca92cb Stats per stream and period, public stats page, dashboard settings, Card alert style
Statistics
- Per day and per stream statistics (src/periodstats.js, one generic stat_day table), backfilled
  once from the older tables; Stream / Week / Month / Year / All time views, Community and Streams tabs.
- Viewer count every 5 minutes and title / category history per stream (EventSub channel.update):
  viewer graph, games played (donut), games in the streams list.
- Twitch sync (src/twitchsync.js): followers with follow dates, current subs, mods, VIPs, all-time
  bits, channel emotes, past streams from VODs. Twitch analytics CSV import (src/twitchcsv.js).
- Public stats page on its own host (Settings -> Stats and data): no message text, no bots,
  !hideme / !showme opt-out. Viewer page: roles, follow age, sub status, bits, a menu for rarely used actions.
- StreamElements watch-time importer removed (already imported minutes stay as a baseline).

Dashboard
- Settings and Actions with a left sidebar; each settings page saves only its own fields.
  Connections (Twitch, StreamElements token now set here, HUDFX), OBS links (hidden behind an eye
  toggle) with a link builder, Chat (sound picked from the media library), TTS, Stats and data,
  Backup (export / import the whole setup), Advanced. Time zone setting for the stats pages.
- Actions -> Alerts: alert style, pictures, sounds, bits tiers and card colours, stored in the
  database (src/theme.js); an old file-based theme is imported once. Alert preview page
  (/actions/alerts/preview, tools/preview/export.js for a static copy).
- Old /actions page removed; Actions = Redeems / Alerts / TTS voices / Media.

Alerts
- New plain Card style for everyone (public/alerts/card.js); Polaroid, Cassette and the TTS letter
  stay as optional looks. Redeem variations can be Card, Cassette, Sound only or Video.

Repo
- No channel data in git: the channel's art, stickers and sounds stay on disk (gitignored) and are
  picked in the dashboard; examples for the server config (apache.example.sh, .env.example).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:22:49 +02:00
3a312ab493 Levels: Viewer, Regular (50 h), Loyal (200 h), Veteran (1000 h)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:04:43 +02:00
207740c3e6 Levels: Regular from 20 h, Veteran from 200 h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:01:23 +02:00
a3e862e9c2 Levels by watch time: Viewer, Regular (10 h), Veteran (50 h)
Replaces the cassette-themed point levels. Watch time = our ticks + StreamElements
import; points only rank the leaderboard, bits/subs do not buy a level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:56:22 +02:00
1c36e80f66 Watch time: one 5-minute tick while live (lurkers included), per-stream check-ins
watchtime.js: stream.online/offline (+ Helix /streams check at start) give the live
state; every 5 min the chatter list (Helix /chat/chatters, new scope
moderator:read:chatters) gets +1 tick = 5 minutes = 5 points, overall and per day,
so watch time and points share one sync. First chat message per stream is stored as
a check-in. Without the scope the tick logs once and skips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:35:21 +02:00
f4ee205d4a docs: import StreamElements watch time when building watch-time tracking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:32:07 +02:00
c296e020b0 Chat stats: count bots too; hide them only when showing statistics
Hidden chatters are now counted like everyone else; statistics pages and
leaderboards filter them at display time (chatlog.isHidden / hiddenUsers), so
editing the list applies immediately without losing data.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:31:17 +02:00
2991c88d9e Chat stats: points-eligible messages (1 per 5 min) and first-ever-message flag
For the planned point system (docs/PLANS.md): chat_user.scored/last_scored and
chat_user_day.scored count messages at least 5 min after the viewer's previous
counted one; chat_user.intro keeps Twitch's first-time-chatter flag. Point values
agreed: chat 10, check-in 25, first message 50, raid flat 100, watch 10 per 10 min.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:30:32 +02:00
a7a701a678 docs: point values from her (raid flat 100, chat 10, check-in 25, first message 50)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:28:42 +02:00
87d82c1a02 docs: point system draft
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:25:50 +02:00
862edf6d5d Per-viewer action statistics: rewards, Power-ups, cheers, subs, gifts, follows, raids, tips
chat_action counts every logged viewer event (via dispatch.js) per viewer and item,
with total spent (points / bits / months / subs / viewers / tip money). Keyed by
Twitch user id, or name:<login> for events without one. Hidden chatters skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:24:21 +02:00
cd751e3a07 Chat statistics: per-viewer messages, emotes, commands; raw chat kept 30 days
Server reads chat via EventSub channel.chat.message (works without OBS) and counts
each message at once into chat_user, chat_user_day, chat_emote (Twitch + 7TV by
name) and chat_command. Raw messages are a 30-day buffer (hourly cleanup); deletes,
timeouts/bans and chat clears remove stored text at once; hidden chatters are not
counted. chatlog.forgetUser() for removal requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:21:34 +02:00
30f42a65e8 docs: plans for free Power-up uses, own chat bot, chat log for statistics
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 17:16:51 +02:00