Add CI pipeline, pre-commit hooks, and offline caching
CI / lint-typecheck-test (push) Has been cancelled

Configure GitHub Actions for linting, typechecking, and testing.
Add Husky and lint-staged for pre-commit checks. Implement API
response caching in AsyncStorage for offline support. Move core
tests to packages/core and add vitest configuration.
This commit is contained in:
2026-05-19 14:00:38 +02:00
parent 0493fcc939
commit 72f9400756
18 changed files with 809 additions and 2552 deletions
+68 -60
View File
@@ -1,79 +1,87 @@
# TimeToLeave - Post-MVP Improvements Plan
> **Last updated:** 2026-05-19
> This plan reflects the current state of the codebase after the initial MVP and mobile rewrite.
## Already Implemented (No Longer TODO)
The following items from earlier versions of this plan have been completed and are in production:
- **Native Calendar Import** — `expo-calendar` integration with device calendar sync, permission requests, and multiple calendar source selection.
- **Push / Local Notifications** — `expo-notifications` with local notification scheduling. Server-side push (FCM/APNs) for live journey updates remains deferred.
- **Dark / Light Theming** — System theme following and manual dark/light toggle on both web and mobile.
- **Auto-Refresh** — `useFocusEffect`-based refresh on mobile when returning to foreground.
---
## High Priority
### 1. Native Calendar Import
- Integrate with expo-calendar or react-native-calendar-events
- Request calendar permissions
- Auto-sync events from Google/Apple calendars
- Support multiple calendar sources
### 1. Offline-First Architecture
- Cache journey and route data in `AsyncStorage` / `localStorage` for offline viewing.
- Background sync when connection is restored.
- Add explicit "offline mode" UI indicators.
- Conflict resolution for concurrent event edits.
### 2. Push Notifications
- Implement FCM for Android and APNs for iOS
- Server-side notification triggers for journey changes
- Real-time updates when train status changes
- Fallback to local notifications when offline
### 2. Real Map Integration
- Integrate `expo-maps` / `@vis.gl/react-google-maps` for visual route display.
- Show origin, destination, and train stations on a map.
- Display bike route with turn-by-turn directions.
- Alternative route suggestions (e.g., faster vs. fewer changes).
### 3. Offline-First Architecture
- Use expo-sqlite for local caching
- Cache journey data for offline access
- Background sync when connection restored
- Conflict resolution for concurrent edits
### 3. Multiple Origins Support
- Allow different origins per event (Home, Work, Custom presets).
- Quick origin switching in event detail and settings.
- Store origin presets in persistent settings.
---
## Medium Priority
### 4. Real Map Integration
- Integrate expo-maps for visual route display
- Show train stations on map
- Display bike route with turn-by-turn directions
- Alternative route suggestions
### 4. Server-Side Push Notifications
- Implement FCM for Android and APNs for iOS for real-time journey disruption alerts.
- Real-time delay/cancellation push notifications.
- Fallback to local notifications when the server is unreachable.
### 5. Multiple Origins Support
- Allow different origins per event
- Home/Work/Custom origin presets
- Quick origin switching in event detail
### 5. Accessibility
- TalkBack / VoiceOver screen reader support on mobile.
- Dynamic type scaling.
- High contrast mode.
- WCAG 2.1 AA compliance audit on web.
### 6. Auto-Refresh
- Refresh journey data when returning to app
- Background refresh for active events
- Configurable refresh intervals
### 6. Analytics & Crash Reporting
- Integrate Sentry for error tracking on web and mobile.
- Opt-in usage analytics.
- Performance monitoring (Web Vitals, React Native startup time).
- In-app user feedback collection.
---
## Lower Priority
### 7. Accessibility
- TalkBack/VoiceOver support
- Dynamic type scaling
- High contrast mode
- Screen reader optimizations
### 7. Advanced Features
- Shared events with friends / family (collaborative departure planning).
- Recurring event templates.
- Journey history and statistics dashboard.
- Export / import event data (ICS, JSON).
### 8. Theming
- Dark mode support
- System theme following
- Custom color schemes
- Accessibility-compliant color contrasts
---
### 9. Analytics & Crash Reporting
- Sentry or similar for error tracking
- Usage analytics (opt-in)
- Performance monitoring
- User feedback collection
## Technical Debt & Quality
### 10. Advanced Features
- Shared events with friends/family
- Recurring event templates
- Journey history and statistics
- Export/import event data
### 8. Code Quality
- Extract shared hooks to `packages/hooks` (deduplicate web and mobile hook implementations).
- Increase unit test coverage across all packages.
- Add Playwright E2E tests for web critical flows.
- Add Detox E2E tests for mobile critical flows.
- Bundle size analysis and reduction.
## Technical Debt
### 9. Developer Experience
- Consolidate ESLint to Flat Config everywhere.
- Add pre-commit hooks (`husky` + `lint-staged`).
- Add GitHub Actions CI pipeline.
- Architecture Decision Records (ADRs) in `docs/adr/`.
### 11. Code Quality
- More comprehensive test coverage
- E2E tests for critical flows
- Performance optimization
- Bundle size reduction
### 12. Documentation
- User documentation
- API documentation
- Contributing guidelines
- Architecture decisions (ADRs)
### 10. Documentation
- Keep `POST_MVP_PLAN.md` and `CHECKLIST.md` in sync with reality.
- Contributing guidelines (`CONTRIBUTING.md`).
- API versioning policy once the backend grows.