Files
time_to_leave/docs
fegger bf252a9e9b Refactor mobile UI and centralize HAFAS parsing
Introduce useColors hook to replace direct theme usage in mobile
screens. Extract EventHeader, JourneyList, BikeSection, and
NearbyStops components to reduce complexity in EventDetailScreen.

Move parseHafasJourneys to packages/core for shared usage between
web and mobile clients. Update web API route with stricter HAFAS
validation and consistent client instantiation.

Add comprehensive codebase function guide documenting data flow,
shared packages, and service integrations.
2026-05-13 19:13:27 +02:00
..

📚 TimeToLeave Documentation

Welcome to the official documentation for TimeToLeave, the smart departure planner that syncs with your calendar and monitors real-time public transport to tell you exactly when to leave home.

🗺️ Table of Contents

1. Architecture

Understand the monorepo structure, tech stack, data flow, and component relationships between the Web Dashboard, Mobile Client, and shared packages.

2. Core & API Reference

Detailed reference for the internal packages:

  • @timetoleave/core: Domain types, HAFAS time parsing, countdown/status logic, and formatting utilities.
  • @timetoleave/api-client: The unified HTTP client that wraps the backend proxy routes.

3. Development Guide

Everything a developer needs to get started:

  • Prerequisites and installation instructions.
  • Running the Web and Mobile apps in development mode.
  • Testing (Vitest/Jest), Linting (ESLint), and Type Checking (TypeScript).
  • Backend API endpoints and Next.js 16 routing conventions.

4. User Guide

A guide for end-users explaining how to sync calendars, view event details, interpret the "Leave Status" color codes, and configure mobile notifications.


Quick Start

# Clone the repository
git clone <repository-url>
cd TimeToLeave

# Install dependencies for the entire monorepo
npm install

# Start the Web development server
npm run dev

# Start the Mobile development server
npm run dev:mobile

🛡️ Code Quality

# Run all tests (Web Vitest + Mobile Jest)
npm run test

# Run ESLint across the monorepo
npm run lint

# Run TypeScript type checking
npm run typecheck

Built for developers who bike to the train and hate missing their connections.