Files
time_to_leave/docs
fegger 09b5e7725d Refactor departure time calculation to account for walk duration
Introduce `trainWalkDurationSeconds` in `useDepartureTime` hooks for both
mobile and web apps to filter train journeys based on total arrival time
including walking.

Add default origin station constants in core package and use them in mobile
store instead of returning null when no origin is saved.

Normalize HAFAS coordinates in destination station hooks to handle
large integer values.

Update `cleanLocation` to preserve full addresses with commas and remove
the 10KB request body limit on ICS parsing to support larger calendar
files.

Make rate limiting configurable via environment variables to handle
higher API fan-out from calendar event pages.
2026-05-14 12:17:09 +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.