No description
| .claude | ||
| css | ||
| icons | ||
| js | ||
| screenshots | ||
| BROWSER_TESTING.md | ||
| CHANGES.md | ||
| CLAUDE.md | ||
| IMPLEMENTATION_NOTES.md | ||
| index.html | ||
| manifest.webapp | ||
| QUICKSTART.md | ||
| README.md | ||
| SSL_CERTIFICATE_UPDATE.md | ||
| TESTING.md | ||
Tjoeke for KaiOS
Minimale NS treinen tracker voor KaiOS devices. Bekijk de volgende 3 treinen voor je route in beide richtingen.
Features
- 🚂 Volgende 3 treinen in beide richtingen
- 📍 Standaard route: Castricum ↔ Amsterdam Centraal
- ⌨️ D-pad navigatie met type-to-search
- 💾 Route opslag in localStorage
- 🌓 Light/dark theme
- 📱 Geoptimaliseerd voor 240x320px scherm
- 🔄 Automatische refresh elke 2 minuten
Installation
Option 1: WebIDE (Recommended)
- Enable developer mode on KaiOS device
- Connect via USB
- Open Firefox Developer Edition
- Go to Tools → WebIDE
- Select your device under Remote Runtime
- Open Packaged App → Select this directory
- Click Install and Run
Option 2: Local Testing
cd /Users/douwe/Desktop/Mesh/Tjoeke-KaiOS
python3 -m http.server 8000
Open in browser: http://localhost:8000
Note: D-pad navigation won't work in desktop browser - use arrow keys and Enter for testing.
Usage
Main Screen
- Left softkey: Open settings
- Center softkey (OK): Refresh departures
- Right softkey: Toggle theme
- Arrow keys: Navigate between cards (future)
Settings Screen
- Arrow Up: Select "Van station" field
- Arrow Down: Select "Naar station" field
- Type letters: Filter stations (auto-shows when ≤3 matches)
- Arrow Up/Down: Navigate filtered list
- Enter (OK): Confirm selection
- Left softkey (Backspace): Cancel/back
Station Selection
Type a few letters to search:
- Type "cas" → Shows ~3 stations including Castricum
- Use D-pad up/down to select
- Press OK to confirm
- Repeat for destination station
Technical Details
File Structure
Tjoeke-KaiOS/
├── manifest.webapp # KaiOS app manifest
├── index.html # Main HTML
├── css/
│ └── app.css # Optimized for 240x320
├── js/
│ ├── app.js # Main application logic
│ └── stations.js # 400+ NL train stations
└── icons/
├── icon-56.png
└── icon-112.png
Key Optimizations
- No frameworks: Vanilla JS (~15KB total)
- Minimal API calls: 2 requests every 2 minutes
- localStorage: Route persistence (< 1KB)
- D-pad first: No touch/mouse events
- Small assets: Total package ~50KB
API Integration
Uses existing Tjoeke NS API proxy:
- Base URL:
https://tjoeke.nl/ns-proxy.php - Endpoint:
trips(NS v3 API) - Caching: 60s server-side
- Max journeys: 5 (filtered to 3)
Differences from Web Version
Removed:
- Burger menu
- Detailed departure modals
- Touch/swipe gestures
- Complex animations
- IC-only filter
- Route warnings
Simplified:
- Only core info: departure time, platform, arrival time
- Type-to-search with D-pad selection
- Settings screen instead of modal
- Minimal CSS (no gradients, shadows)
Added:
- D-pad navigation throughout
- KaiOS softkey pattern
- Portrait-only layout
- Aggressive text truncation
Known Limitations
- No offline mode (requires internet)
- Max 3 departures per direction
- No live journey tracking
- No accessibility features beyond D-pad
- Landscape mode not supported
Development
Prerequisites
- Firefox Developer Edition
- KaiOS device with developer mode
- USB cable
- Python 3 (for local server)
Testing
- Desktop browser: Arrow keys + Enter (limited)
- KaiOS simulator: WebIDE → Simulator
- Real device: Best for D-pad testing
Debugging
- Connect device via WebIDE
- Launch app
- Click Debug button
- Firefox DevTools opens with live console
Troubleshooting
Stations not loading
Check: js/stations.js exists and is valid
Solution: Copy from main Tjoeke project
API errors
Check: Internet connection, tjoeke.nl proxy status Solution: Verify URL in browser: https://tjoeke.nl/ns-proxy.php
D-pad not working
Check: Testing in browser vs real device Solution: Use WebIDE + real KaiOS hardware
Theme not persisting
Check: localStorage quota (5MB limit) Solution: Clear other apps' data
Future Enhancements
- Navigate between departure cards with D-pad
- Visual delay indicators (colors)
- Cancelled train strikethrough
- Transfer count indicator
- Battery-conscious polling
- Offline cached departures
- Sound notifications for departures
- Popular routes quick-select
License
Part of the Tjoeke project: https://tjoeke.nl
Credits
- Original web app: Tjoeke (tjoeke.nl)
- NS API: Nederlandse Spoorwegen
- Station data: 400+ Dutch train stations
- KaiOS port: Optimized for feature phones