RaBe Radio App
[!CAUTION] This app is completely vibe-coded - use at your own risk.
I keep giving instructions and the arch clanker Claude Opus 4.6 keeps writing somewhat working code
so ¯\(ツ)/¯
A Flutter app for Radio Bern RaBe — live radio streaming with an editorial, accessible UI designed to feel like a mobile extension of rabe.ch.
Design Alignment with rabe.ch
The UI intentionally mirrors the visual language of the RaBe website:
| rabe.ch trait | App implementation |
|---|---|
| Editorial, bold layout | Large headline typography, generous whitespace |
| High contrast | Near-white / near-black backgrounds, WCAG AA compliant |
| Yellow accent (branding) | Used sparingly: Play button, LIVE badge, active states |
| Rounded content blocks | 12–16 px radii on cards and cover art |
| Minimal ornamentation | No dividers, no glossy effects, no default Material look |
| Content-centered vertical layout | Single-screen player, centered cover + metadata |
| Strong visual anchors | Prominent cover art with branded RaBe placeholder |
Design tokens
All colors, spacing, typography, and sizes are defined in
lib/core/design_system/tokens.dart. Widgets reference tokens — never
inline ad-hoc values.
Architecture
Feature-first, clean-layered:
lib/
app/ → Root widget, localization, theming
l10n/ → ARB translation files (DE, EN)
core/
design_system/ → Tokens, theme, reusable components
accessibility/ → Semantic helpers
utils/ → Shared utilities (l10n extension)
features/
player/
domain/ → PlayerState model
data/ → RabeAudioHandler (just_audio + audio_service)
presentation/→ Providers, PlayerScreen
now_playing/
domain/ → NowPlaying model, repository interface
data/ → Polling repository (stream.rabe.ch)
presentation/→ Riverpod providers
settings/
domain/ → StreamQuality enum
presentation/→ Providers, SettingsScreen
Dependencies
| Package | Purpose | Used by |
|---|---|---|
| flutter_riverpod | State management | All features |
| just_audio | Audio playback engine | Player feature |
| audio_service | Background playback + notifications | Player feature |
| audio_session | Audio focus / interruption handling | Player feature |
| cached_network_image | Cover art caching | Player screen |
| shared_preferences | Persisting user settings | Settings feature |
| http | HTTP client for metadata polling | Now Playing |
| flutter_localizations | i18n support | App shell |
| intl | Localization utilities | App shell |
Localization
- Languages: German (de), English (en)
- System: Flutter gen-l10n with ARB files in
lib/l10n/ - Access:
context.l10n.someKeyvia extension incore/utils/l10n_extension.dart - Default: Follows system language; overrideable in Settings
Accessibility
- All interactive elements have semantic labels
- LIVE badge uses text — never color alone
- Play/Pause announces state to screen readers (live region)
- Minimum 48×48 tap targets
- Scalable text (no fixed-height containers)
- WCAG AA contrast ratios
Audio
- Background playback via
audio_service - Lock screen and notification controls
- Audio focus handling (ducking, interruptions, noisy)
- Stream quality: 128k / 192k / 320k (switchable in Settings)
- Streams:
stream.rabe.ch/livestream/rabe-{low,mid,high}.mp3
Platform Configuration
Android
INTERNET,FOREGROUND_SERVICE,FOREGROUND_SERVICE_MEDIA_PLAYBACK,WAKE_LOCKpermissions inAndroidManifest.xml- Notification channel:
ch.rabe.app.audio
iOS
UIBackgroundModes: audioinInfo.plist- All streams use HTTPS — no ATS exceptions needed
Getting Started
flutter pub get
flutter run
Linux Flatpak (Flathub)
The Linux version can be published as a Flatpak via Flathub using flatpak-flutter.
Files
| File | Purpose |
|---|---|
flatpak/flatpak-flutter.yml |
Input manifest for flatpak-flutter |
flatpak/ch.rabe.app.desktop |
Desktop launcher entry |
flatpak/ch.rabe.app.metainfo.xml |
AppStream metadata for Flathub |
flatpak/icons/scalable/ch.rabe.app.svg |
App icon (SVG) |
Generate the offline manifest
# Install flatpak-flutter (Docker — recommended)
# alias flatpak-flutter='docker run --rm -v "$PWD":/usr/src/flatpak -u $(id -u):$(id -g) theappgineer/flatpak-flutter:latest'
# Or install natively (Python 3.8+):
# pip install packaging pyyaml tomlkit
# Then use ../flatpak-flutter/flatpak-flutter.py instead of the alias
cd flatpak
flatpak-flutter flatpak-flutter.yml
This pre-processes flatpak-flutter.yml and generates ch.rabe.app.yml with
all pinned dependency sources for an offline/sandboxed build.
Build locally with flatpak-builder
cd flatpak
flatpak-builder --repo=repo --force-clean --sandbox --user --install \
--install-deps-from=flathub build ch.rabe.app.yml
Submit to Flathub
Follow the Flathub submission guide.
The generated ch.rabe.app.yml is the manifest to submit.
Updating
Re-run flatpak-flutter flatpak-flutter.yml whenever dependencies change or
after updating the Flutter SDK tag in flatpak-flutter.yml.
Future Features (planned)
- Program schedule
- Shows archive
- Podcasts / contributions
- Membership / donation links