Initial commit: Set up Garmin Health Lab project structure

- Initialize monorepo with root workspace configuration
- Set up Express.js backend with TypeScript
- Set up React 18 frontend with TypeScript
- Create database schema with SQLite
- Implement project architecture and documentation
- Add development and deployment guidelines

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
ericwyuan
2026-08-23 11:11:29 +08:00
commit d73405decb
34 changed files with 1699 additions and 0 deletions

59
server/src/types/index.ts Normal file
View File

@@ -0,0 +1,59 @@
export interface User {
id: string;
email: string;
garminEmail: string;
createdAt: Date;
updatedAt: Date;
}
export interface HealthData {
id: string;
userId: string;
date: Date;
steps: number;
heartRate?: number;
heartRateVariability?: number;
bloodPressure?: {
systolic: number;
diastolic: number;
};
sleep?: {
duration: number;
quality: number;
};
stress?: number;
caloriesBurned?: number;
createdAt: Date;
updatedAt: Date;
}
export interface Activity {
id: string;
userId: string;
activityType: string;
startTime: Date;
endTime: Date;
duration: number;
distance?: number;
calories?: number;
heartRateAverage?: number;
heartRateMax?: number;
createdAt: Date;
}
export interface HealthRecommendation {
id: string;
userId: string;
category: string;
recommendation: string;
priority: 'high' | 'medium' | 'low';
basedOn: string[];
createdAt: Date;
}
export interface SyncStatus {
lastSyncTime: Date;
status: 'idle' | 'syncing' | 'error';
lastError?: string;
recordsSynced: number;
}