-
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Flags and Settings Tabs
Chris Nighswonger edited this page Apr 2, 2026
·
6 revisions
This page explains how feature visibility and settings behavior are controlled in Kanfei.
Frontend feature visibility is controlled via config-backed flags loaded from /api/config.
Primary flags:
nowcast_enabledspray_enabledmap_enabled
Frontend mapping is implemented in frontend/src/context/FeatureFlagsContext.tsx.
Behavior:
- sidebar/routes for Nowcast, Spray, and Map are conditionally shown
- routes redirect when disabled
- Settings changes can refresh flags without full app restart
Before normal app routes are shown, frontend checks GET /api/setup/status.
- if
setup_complete=false, Setup Wizard is shown - if true, full app shell is rendered
The Settings page is a broad operational surface including:
- station connection settings (serial or network, depending on hardware type)
- unit display preferences
- hardware operations (capability-dependent — varies by station type)
- alert threshold configuration
- theme/background customization
- nowcast configuration
- spray-related toggles
- upload integrations (WU/CWOP)
- messaging bots (Telegram, Discord) — in dedicated Bots tab
- usage/cost monitoring
- DB admin operations
- account management (password change, API key generation/revocation)
-
station_driver_type— hardware driver type -
serial_port,baud_rate— serial connection (serial drivers only) poll_interval-
latitude,longitude,elevation -
setup_complete,station_timezone
-
temp_unit,pressure_unit,wind_unit,rain_unit
nws_enabled-
metar_enabled,metar_station
-
alert_thresholds(JSON structure)
- WU:
wu_enabled,wu_station_id,wu_station_key,wu_upload_interval - CWOP:
cwop_enabled,cwop_callsign,cwop_upload_interval
-
bot_telegram_enabled,bot_telegram_token,bot_telegram_chat_id -
bot_telegram_commands,bot_telegram_notifications - See Telegram Bot for setup details
-
bot_discord_enabled,bot_discord_token,bot_discord_guild_id,bot_discord_channel_id -
bot_discord_commands,bot_discord_notifications - See Discord Bot for setup details
-
nowcast_mode(local/remote) — determines which nowcast engine is used -
nowcast_remote_url— URL of remote nowcast service (remote mode) - other nowcast keys (
nowcast_*family) -
spray_enabled,spray_ai_enabled
anthropic_admin_api_keyusage_budget_monthly_usdusage_budget_auto_pauseusage_budget_paused
Operational actions exposed via API/UI:
- stats
- JSON export/backup
- compaction
- purge operations
Many services re-read config periodically or per operation.
Practical effect:
- many toggles/settings apply quickly
- connection parameter changes may require reconnect
- some long-lived operations may require service restart depending on state