No description
Find a file
2025-11-17 22:18:36 +01:00
.claude working alpha release 2025-11-17 22:18:36 +01:00
css working alpha release 2025-11-17 22:18:36 +01:00
icons working alpha release 2025-11-17 22:18:36 +01:00
js working alpha release 2025-11-17 22:18:36 +01:00
screenshots init and screen commit 2025-11-17 20:23:26 +01:00
BROWSER_TESTING.md first commit 2025-11-17 16:05:15 +01:00
CHANGES.md first commit 2025-11-17 16:05:15 +01:00
CLAUDE.md init and screen commit 2025-11-17 20:23:26 +01:00
IMPLEMENTATION_NOTES.md first commit 2025-11-17 16:05:15 +01:00
index.html working alpha release 2025-11-17 22:18:36 +01:00
manifest.webapp working alpha release 2025-11-17 22:18:36 +01:00
QUICKSTART.md first commit 2025-11-17 16:05:15 +01:00
README.md first commit 2025-11-17 16:05:15 +01:00
SSL_CERTIFICATE_UPDATE.md working alpha release 2025-11-17 22:18:36 +01:00
TESTING.md first commit 2025-11-17 16:05:15 +01:00

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

  1. Enable developer mode on KaiOS device
  2. Connect via USB
  3. Open Firefox Developer Edition
  4. Go to Tools → WebIDE
  5. Select your device under Remote Runtime
  6. Open Packaged App → Select this directory
  7. 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:

  1. Type "cas" → Shows ~3 stations including Castricum
  2. Use D-pad up/down to select
  3. Press OK to confirm
  4. 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

  1. Desktop browser: Arrow keys + Enter (limited)
  2. KaiOS simulator: WebIDE → Simulator
  3. Real device: Best for D-pad testing

Debugging

  1. Connect device via WebIDE
  2. Launch app
  3. Click Debug button
  4. 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