Initial monorepo setup with architecture plan
- Monorepo structure: apps/ (planner, journal) + packages/ (ui, types, map, gpx, i18n) - Tooling: pnpm workspaces + Turborepo - Architecture plan documenting all resolved decisions from design review - Shared types package with Route, Activity, and Waypoint interfaces - MIT license Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
5b4d072741
18 changed files with 1009 additions and 0 deletions
57
packages/types/src/index.ts
Normal file
57
packages/types/src/index.ts
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
/**
|
||||
* Shared TypeScript types for trails.cool
|
||||
*
|
||||
* These types are used by both the Planner and Journal apps.
|
||||
*/
|
||||
|
||||
export interface Waypoint {
|
||||
lat: number;
|
||||
lon: number;
|
||||
name?: string;
|
||||
isDayBreak?: boolean;
|
||||
}
|
||||
|
||||
export interface RouteMetadata {
|
||||
created: Date;
|
||||
updated: Date;
|
||||
owner: string;
|
||||
contributors: string[];
|
||||
routingProfile: string;
|
||||
dayBreaks: number[];
|
||||
distance: number;
|
||||
elevation: {
|
||||
gain: number;
|
||||
loss: number;
|
||||
};
|
||||
tags: string[];
|
||||
}
|
||||
|
||||
export interface Route {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
gpx: string;
|
||||
metadata: RouteMetadata;
|
||||
plannerState?: Uint8Array;
|
||||
versions: RouteVersion[];
|
||||
}
|
||||
|
||||
export interface RouteVersion {
|
||||
version: number;
|
||||
gpx: string;
|
||||
createdAt: Date;
|
||||
createdBy: string;
|
||||
changeDescription?: string;
|
||||
}
|
||||
|
||||
export interface Activity {
|
||||
id: string;
|
||||
routeId?: string;
|
||||
name: string;
|
||||
description: string;
|
||||
gpx: string;
|
||||
startedAt: Date;
|
||||
duration: number;
|
||||
photos: string[];
|
||||
participants: string[];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue