update documentation
This commit is contained in:
+28
-40
@@ -1,59 +1,47 @@
|
||||
# 📚 TimeToLeave Documentation
|
||||
# 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.
|
||||
This directory documents the current TimeToLeave monorepo: the Next.js web app and backend proxy, the Expo mobile app, and the shared TypeScript packages.
|
||||
|
||||
## 🗺️ Table of Contents
|
||||
## Contents
|
||||
|
||||
### 1. [Architecture](./ARCHITECTURE.md)
|
||||
Understand the monorepo structure, tech stack, data flow, and component relationships between the Web Dashboard, Mobile Client, and shared packages.
|
||||
| Document | Use it for |
|
||||
| --- | --- |
|
||||
| [Architecture](./ARCHITECTURE.md) | System overview, package responsibilities, data flow, integrations, and operational constraints. |
|
||||
| [Development](./DEVELOPMENT.md) | Setup, environment variables, local commands, route map, quality checks, Docker, and mobile development notes. |
|
||||
| [Core & API Client Reference](./API_REFERENCE.md) | Shared package exports, HAFAS helpers, countdown/status logic, and `ApiClient` methods. |
|
||||
| [User Guide](./USER_GUIDE.md) | How to use the web and mobile apps, import calendars, read leave-by statuses, and manage settings. |
|
||||
| [Codebase Function Guide](./CODEBASE_FUNCTION_GUIDE.md) | File-by-file map of first-party source modules, functions, hooks, and components. |
|
||||
|
||||
### 2. [Core & API Reference](./API_REFERENCE.md)
|
||||
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](./DEVELOPMENT.md)
|
||||
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](./USER_GUIDE.md)
|
||||
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
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone <repository-url>
|
||||
cd TimeToLeave
|
||||
|
||||
# Install dependencies for the entire monorepo
|
||||
npm install
|
||||
|
||||
# Start the Web development server
|
||||
cp .env.example .env
|
||||
npm run dev
|
||||
```
|
||||
|
||||
# Start the Mobile development server
|
||||
For mobile development:
|
||||
|
||||
```bash
|
||||
npm run dev:mobile
|
||||
```
|
||||
|
||||
## 🛡️ Code Quality
|
||||
Set `EXPO_PUBLIC_API_BASE_URL` for device builds so the app can reach the web backend.
|
||||
|
||||
## Quality Checks
|
||||
|
||||
```bash
|
||||
# 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
|
||||
npm run test
|
||||
npm run build
|
||||
```
|
||||
|
||||
---
|
||||
## Current User-Facing Routes
|
||||
|
||||
*Built for developers who bike to the train and hate missing their connections.*
|
||||
| Route | Purpose |
|
||||
| --- | --- |
|
||||
| `/` | Departure desk showing the next upcoming event and live route/departure data. |
|
||||
| `/calendar` | Calendar import, Google Calendar sync, and batch destination review. |
|
||||
|
||||
Add/edit event actions are handled in modal and native-screen flows, not by standalone web page routes.
|
||||
|
||||
Reference in New Issue
Block a user