feat: Apple Watch app + Paywall + Privacy Policy + rebranding

## Major Features
- Apple Watch companion app (6 phases complete)
  - WatchConnectivity iPhone ↔ Watch
  - HealthKit integration (HR, calories)
  - SwiftUI premium UI
  - 9 complication types
  - Always-On Display support

- Paywall screen with RevenueCat integration
- Privacy Policy screen
- App rebranding: tabatago → TabataFit
- Bundle ID: com.millianlmx.tabatafit

## Changes
- New: ios/TabataFit Watch App/ (complete Watch app)
- New: app/paywall.tsx (subscription UI)
- New: app/privacy.tsx (privacy policy)
- New: src/features/watch/ (Watch sync hooks)
- New: admin-web/ (admin dashboard)
- Updated: app.json, package.json (branding)
- Updated: profile.tsx (paywall + privacy links)
- Updated: i18n translations (EN/FR/DE/ES)
- New: app icon 1024x1024

## Watch App Files
- TabataFitWatchApp.swift (entry point)
- ContentView.swift (premium UI)
- HealthKitManager.swift (HR + calories)
- WatchSessionManager.swift (communication)
- Complications/ (WidgetKit)
- UserDefaults+Shared.swift (data sharing)
This commit is contained in:
Millian Lamiaux
2026-03-11 09:43:53 +01:00
parent f80798069b
commit 2ad7ae3a34
86 changed files with 19648 additions and 365 deletions

View File

@@ -0,0 +1,94 @@
"use client";
import { useEffect, useState } from "react";
import { supabase } from "@/lib/supabase";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Plus, Trash2, Edit, Loader2, FolderOpen } from "lucide-react";
import type { Database } from "@/lib/supabase";
type Collection = Database["public"]["Tables"]["collections"]["Row"];
export default function CollectionsPage() {
const [collections, setCollections] = useState<Collection[]>([]);
const [loading, setLoading] = useState(true);
useEffect(() => {
fetchCollections();
}, []);
const fetchCollections = async () => {
try {
const { data, error } = await supabase.from("collections").select("*");
if (error) throw error;
setCollections(data || []);
} catch (error) {
console.error("Failed to fetch collections:", error);
} finally {
setLoading(false);
}
};
return (
<div className="p-8">
<div className="flex justify-between items-center mb-8">
<div>
<h1 className="text-3xl font-bold text-white mb-2">Collections</h1>
<p className="text-neutral-400">Organize workouts into collections</p>
</div>
<Button className="bg-orange-500 hover:bg-orange-600">
<Plus className="w-4 h-4 mr-2" />
Add Collection
</Button>
</div>
{loading ? (
<div className="flex justify-center p-8">
<Loader2 className="w-8 h-8 animate-spin text-orange-500" />
</div>
) : (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
{collections.map((collection) => (
<Card key={collection.id} className="bg-neutral-900 border-neutral-800">
<CardContent className="p-6">
<div className="flex items-start gap-4">
<div className="w-12 h-12 bg-neutral-800 rounded-xl flex items-center justify-center text-2xl">
{collection.icon}
</div>
<div className="flex-1 min-w-0">
<div className="flex items-start justify-between">
<div>
<h3 className="text-lg font-semibold text-white">{collection.title}</h3>
<p className="text-neutral-400 text-sm mt-1">{collection.description}</p>
</div>
<div className="flex gap-2">
<Button variant="ghost" size="icon" className="text-neutral-400 hover:text-white">
<Edit className="w-4 h-4" />
</Button>
<Button variant="ghost" size="icon" className="text-neutral-400 hover:text-red-500">
<Trash2 className="w-4 h-4" />
</Button>
</div>
</div>
{collection.gradient && (
<div
className="mt-3 h-2 rounded-full"
style={{
background: `linear-gradient(to right, ${collection.gradient[0]}, ${collection.gradient[1]})`,
}}
/>
)}
</div>
</div>
</CardContent>
</Card>
))}
</div>
)}
</div>
);
}