How alerts work
Alerts are displayed prominently on the site when active. Each alert consists of:- Title - A brief headline summarizing the alert
- Text - Detailed message content explaining the situation
- Active status - Controls whether the alert is currently shown to users
- Timestamp - When the alert was created
Alert display
When one or more alerts are active, they appear on the homepage in a visible location. Users see:- Clear visual styling to draw attention
- The complete alert message
- Automatic updates when new alerts are added
Alerts are fetched in real-time from the database, so new announcements appear immediately without requiring a page refresh.
Alert management
Alerts are managed through the database and can be:- Created - Add new alerts with custom titles and messages
- Activated - Make alerts visible to all users
- Deactivated - Hide alerts without deleting them
- Updated - Modify alert content as situations change
Use cases
Alerts are ideal for communicating:Schedule changes
Notify users when Kevin changes his streaming schedule unexpectedly.Example: “Stream delayed until 4pm due to technical issues”
Special events
Announce special streams, collaborations, or milestone celebrations.Example: “Special 24-hour charity stream this weekend!”
Site updates
Inform users about new features or maintenance windows.Example: “New AI prediction feature now live - check it out!”
Community messages
Share messages from Kevin or the community team.Example: “Kevin is taking a short break - back next Monday!”
Technical details
Alerts are stored in a PostgreSQL database with the following structure:id- Unique identifier for each alerttitle- Alert headline (max 256 characters)text- Full alert message (unlimited length)active- Boolean flag controlling visibilitycreatedAt- Timestamp of alert creation
/api/alerts/active endpoint, which returns only alerts where active = true. This ensures users only see relevant, current information.