diff --git a/.env.example b/.env.example
index f7104c4..459ffac 100644
--- a/.env.example
+++ b/.env.example
@@ -1,9 +1,13 @@
# TabataFit Environment Variables
-# Copy this file to .env and fill in your Supabase credentials
+# Copy this file to .env and fill in your credentials
# Supabase Configuration
EXPO_PUBLIC_SUPABASE_URL=your_supabase_project_url
EXPO_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
+# RevenueCat (Apple subscriptions)
+# Defaults to test_ sandbox key if not set
+EXPO_PUBLIC_REVENUECAT_API_KEY=your_revenuecat_api_key
+
# Admin Dashboard (optional - for admin authentication)
EXPO_PUBLIC_ADMIN_EMAIL=admin@tabatafit.app
diff --git a/app.json b/app.json
index b58866c..d073ee3 100644
--- a/app.json
+++ b/app.json
@@ -11,7 +11,17 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.millianlmx.tabatafit",
- "buildNumber": "1"
+ "buildNumber": "1",
+ "infoPlist": {
+ "NSHealthShareUsageDescription": "TabataFit uses HealthKit to read and write workout data including heart rate, calories burned, and exercise minutes.",
+ "NSHealthUpdateUsageDescription": "TabataFit saves your workout sessions to Apple Health so you can track your fitness progress.",
+ "NSCameraUsageDescription": "TabataFit uses the camera for profile photos and workout form checks.",
+ "NSUserTrackingUsageDescription": "TabataFit uses this to provide personalized workout recommendations.",
+ "ITSAppUsesNonExemptEncryption": false
+ },
+ "config": {
+ "usesNonExemptEncryption": false
+ }
},
"android": {
"adaptiveIcon": {
diff --git a/app/(tabs)/explore.tsx b/app/(tabs)/explore.tsx
index 921a211..d14ffcc 100644
--- a/app/(tabs)/explore.tsx
+++ b/app/(tabs)/explore.tsx
@@ -8,7 +8,9 @@ import Ionicons from '@expo/vector-icons/Ionicons'
import { useTranslation } from 'react-i18next'
import { useHaptics } from '@/src/shared/hooks'
+import { usePurchases } from '@/src/shared/hooks/usePurchases'
import { useWorkouts, useCollections, useFeaturedWorkouts, useTrainers } from '@/src/shared/hooks/useSupabaseData'
+import { isFreeWorkout } from '@/src/shared/services/access'
import { StyledText } from '@/src/shared/components/StyledText'
import { useThemeColors, BRAND } from '@/src/shared/theme'
@@ -108,9 +110,11 @@ function CollectionCard({
function WorkoutCard({
workout,
onPress,
+ isLocked,
}: {
workout: Workout
onPress: () => void
+ isLocked?: boolean
}) {
const colors = useThemeColors()
const categoryColor = CATEGORY_COLORS[workout.category]
@@ -133,9 +137,15 @@ function WorkoutCard({
+ {isLocked && (
+
+
+
+ )}
+
-
+
@@ -209,6 +219,7 @@ export default function ExploreScreen() {
const router = useRouter()
const haptics = useHaptics()
const colors = useThemeColors()
+ const { isPremium } = usePurchases()
const [filters, setFilters] = useState({
category: 'all',
@@ -319,6 +330,7 @@ export default function ExploreScreen() {
key={workout.id}
workout={workout}
onPress={() => handleWorkoutPress(workout.id)}
+ isLocked={!isPremium && !isFreeWorkout(workout.id)}
/>
))}
@@ -398,6 +410,7 @@ export default function ExploreScreen() {
key={workout.id}
workout={workout}
onPress={() => handleWorkoutPress(workout.id)}
+ isLocked={!isPremium && !isFreeWorkout(workout.id)}
/>
))}
@@ -516,6 +529,17 @@ const styles = StyleSheet.create({
paddingVertical: 3,
borderRadius: RADIUS.SM,
},
+ lockBadge: {
+ position: 'absolute',
+ top: SPACING[3],
+ left: SPACING[3],
+ width: 22,
+ height: 22,
+ borderRadius: 11,
+ backgroundColor: 'rgba(0,0,0,0.6)',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
playArea: {
position: 'absolute',
top: 0,
diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile.tsx
index af5111d..41dc323 100644
--- a/app/(tabs)/profile.tsx
+++ b/app/(tabs)/profile.tsx
@@ -18,7 +18,7 @@ import * as Linking from 'expo-linking'
import Constants from 'expo-constants'
import { useTranslation } from 'react-i18next'
import { useMemo, useState } from 'react'
-import { useUserStore } from '@/src/shared/stores'
+import { useUserStore, useActivityStore } from '@/src/shared/stores'
import { requestNotificationPermissions, usePurchases } from '@/src/shared/hooks'
import { useThemeColors, BRAND } from '@/src/shared/theme'
import type { ThemeColors } from '@/src/shared/theme/types'
@@ -78,12 +78,14 @@ export default function ProfileScreen() {
const planLabel = isPremium ? 'TabataFit+' : t('profile.freePlan')
const avatarInitial = profile.name?.[0]?.toUpperCase() || 'U'
- // Mock stats (replace with real data from activityStore when available)
- const stats = {
- workouts: 47,
- streak: 12,
- calories: 12500,
- }
+ // Real stats from activity store
+ const history = useActivityStore((s) => s.history)
+ const streak = useActivityStore((s) => s.streak)
+ const stats = useMemo(() => ({
+ workouts: history.length,
+ streak: streak.current,
+ calories: history.reduce((sum, r) => sum + (r.calories ?? 0), 0),
+ }), [history, streak])
const handleSignOut = () => {
updateProfile({
diff --git a/app/collection/[id].tsx b/app/collection/[id].tsx
new file mode 100644
index 0000000..45d1516
--- /dev/null
+++ b/app/collection/[id].tsx
@@ -0,0 +1,249 @@
+/**
+ * TabataFit Collection Detail Screen
+ * Shows collection info + list of workouts in that collection
+ */
+
+import { useMemo } from 'react'
+import { View, StyleSheet, ScrollView, Pressable } from 'react-native'
+import { useRouter, useLocalSearchParams } from 'expo-router'
+import { useSafeAreaInsets } from 'react-native-safe-area-context'
+import { LinearGradient } from 'expo-linear-gradient'
+import Ionicons from '@expo/vector-icons/Ionicons'
+import { useTranslation } from 'react-i18next'
+
+import { useHaptics } from '@/src/shared/hooks'
+import { useCollection } from '@/src/shared/hooks/useSupabaseData'
+import { getWorkoutById } from '@/src/shared/data'
+import { useTranslatedWorkouts } from '@/src/shared/data/useTranslatedData'
+import { StyledText } from '@/src/shared/components/StyledText'
+import { track } from '@/src/shared/services/analytics'
+
+import { useThemeColors, BRAND, GRADIENTS } from '@/src/shared/theme'
+import type { ThemeColors } from '@/src/shared/theme/types'
+import { SPACING, LAYOUT } from '@/src/shared/constants/spacing'
+import { RADIUS } from '@/src/shared/constants/borderRadius'
+
+export default function CollectionDetailScreen() {
+ const insets = useSafeAreaInsets()
+ const router = useRouter()
+ const haptics = useHaptics()
+ const { t } = useTranslation()
+ const { id } = useLocalSearchParams<{ id: string }>()
+
+ const colors = useThemeColors()
+ const styles = useMemo(() => createStyles(colors), [colors])
+
+ const { data: collection, isLoading } = useCollection(id)
+
+ // Resolve workouts from collection's workoutIds
+ const rawWorkouts = useMemo(() => {
+ if (!collection) return []
+ return collection.workoutIds
+ .map((wId) => getWorkoutById(wId))
+ .filter(Boolean) as NonNullable>[]
+ }, [collection])
+
+ const workouts = useTranslatedWorkouts(rawWorkouts)
+
+ const handleBack = () => {
+ haptics.selection()
+ router.back()
+ }
+
+ const handleWorkoutPress = (workoutId: string) => {
+ haptics.buttonTap()
+ track('collection_workout_tapped', {
+ collection_id: id,
+ workout_id: workoutId,
+ })
+ router.push(`/workout/${workoutId}`)
+ }
+
+ if (isLoading) {
+ return (
+
+ Loading...
+
+ )
+ }
+
+ if (!collection) {
+ return (
+
+
+
+ Collection not found
+
+
+ )
+ }
+
+ return (
+
+ {/* Header */}
+
+
+
+
+
+ {collection.title}
+
+
+
+
+
+ {/* Hero Card */}
+
+
+
+
+ {collection.icon}
+
+
+ {collection.title}
+
+
+ {collection.description}
+
+
+ {t('plurals.workout', { count: workouts.length })}
+
+
+
+
+ {/* Workout List */}
+
+ {t('screens:explore.workouts')}
+
+
+ {workouts.map((workout) => (
+ handleWorkoutPress(workout.id)}
+ >
+
+
+
+
+
+ {workout.title}
+
+
+ {t('durationLevel', {
+ duration: workout.duration,
+ level: t(`levels.${workout.level.toLowerCase()}`),
+ })}
+
+
+
+
+ {t('units.calUnit', { count: workout.calories })}
+
+
+
+
+ ))}
+
+ {workouts.length === 0 && (
+
+
+
+ No workouts in this collection
+
+
+ )}
+
+
+ )
+}
+
+function createStyles(colors: ThemeColors) {
+ return StyleSheet.create({
+ container: {
+ flex: 1,
+ backgroundColor: colors.bg.base,
+ },
+ centered: {
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ header: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ paddingHorizontal: LAYOUT.SCREEN_PADDING,
+ paddingVertical: SPACING[3],
+ },
+ backButton: {
+ width: 44,
+ height: 44,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ heroCard: {
+ height: 200,
+ borderRadius: RADIUS.XL,
+ overflow: 'hidden',
+ ...colors.shadow.lg,
+ },
+ heroContent: {
+ flex: 1,
+ padding: SPACING[5],
+ justifyContent: 'flex-end',
+ },
+ heroIcon: {
+ marginBottom: SPACING[2],
+ },
+ scrollView: {
+ flex: 1,
+ },
+ scrollContent: {
+ paddingHorizontal: LAYOUT.SCREEN_PADDING,
+ },
+ workoutCard: {
+ flexDirection: 'row',
+ alignItems: 'center',
+ paddingVertical: SPACING[3],
+ paddingHorizontal: SPACING[4],
+ backgroundColor: colors.bg.surface,
+ borderRadius: RADIUS.LG,
+ marginBottom: SPACING[2],
+ gap: SPACING[3],
+ },
+ workoutAvatar: {
+ width: 44,
+ height: 44,
+ borderRadius: 22,
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ workoutInfo: {
+ flex: 1,
+ gap: 2,
+ },
+ workoutMeta: {
+ alignItems: 'flex-end',
+ gap: 4,
+ },
+ emptyState: {
+ alignItems: 'center',
+ justifyContent: 'center',
+ paddingVertical: SPACING[12],
+ },
+ })
+}
diff --git a/app/player/[id].tsx b/app/player/[id].tsx
index 8f7538a..e9b3616 100644
--- a/app/player/[id].tsx
+++ b/app/player/[id].tsx
@@ -36,6 +36,7 @@ import { useTranslatedWorkout } from '@/src/shared/data/useTranslatedData'
import { useWatchSync } from '@/src/features/watch'
import { track } from '@/src/shared/services/analytics'
+import { VideoPlayer } from '@/src/shared/components/VideoPlayer'
import { BRAND, PHASE_COLORS, GRADIENTS, darkColors } from '@/src/shared/theme'
import type { ThemeColors } from '@/src/shared/theme/types'
import { TYPOGRAPHY } from '@/src/shared/constants/typography'
@@ -461,9 +462,12 @@ export default function PlayerScreen() {
- {/* Background gradient */}
-
diff --git a/app/workout/[id].tsx b/app/workout/[id].tsx
index 07cea6e..d50291f 100644
--- a/app/workout/[id].tsx
+++ b/app/workout/[id].tsx
@@ -14,9 +14,12 @@ import { Host, Button, HStack } from '@expo/ui/swift-ui'
import { glassEffect, padding } from '@expo/ui/swift-ui/modifiers'
import { useHaptics } from '@/src/shared/hooks'
+import { usePurchases } from '@/src/shared/hooks/usePurchases'
import { track } from '@/src/shared/services/analytics'
+import { canAccessWorkout } from '@/src/shared/services/access'
import { getWorkoutById } from '@/src/shared/data'
import { useTranslatedWorkout, useMusicVibeLabel } from '@/src/shared/data/useTranslatedData'
+import { VideoPlayer } from '@/src/shared/components/VideoPlayer'
import { useThemeColors, BRAND } from '@/src/shared/theme'
import type { ThemeColors } from '@/src/shared/theme/types'
@@ -35,6 +38,7 @@ export default function WorkoutDetailScreen() {
const { t } = useTranslation()
const { id } = useLocalSearchParams<{ id: string }>()
const [isSaved, setIsSaved] = useState(false)
+ const { isPremium } = usePurchases()
const colors = useThemeColors()
const styles = useMemo(() => createStyles(colors), [colors])
@@ -62,7 +66,18 @@ export default function WorkoutDetailScreen() {
)
}
+ const isLocked = !canAccessWorkout(workout.id, isPremium)
+
const handleStartWorkout = () => {
+ if (isLocked) {
+ haptics.buttonTap()
+ track('paywall_triggered', {
+ source: 'workout_detail',
+ workout_id: workout.id,
+ })
+ router.push('/paywall')
+ return
+ }
haptics.phaseChange()
router.push(`/player/${workout.id}`)
}
@@ -110,6 +125,13 @@ export default function WorkoutDetailScreen() {
contentContainerStyle={[styles.scrollContent, { paddingBottom: insets.bottom + 100 }]}
showsVerticalScrollIndicator={false}
>
+ {/* Video Preview Hero */}
+
{/* Quick stats */}
@@ -184,11 +206,17 @@ export default function WorkoutDetailScreen() {
[
styles.startButton,
+ isLocked && styles.lockedButton,
pressed && styles.startButtonPressed,
]}
onPress={handleStartWorkout}
>
- {t('screens:workout.startWorkout')}
+ {isLocked && (
+
+ )}
+
+ {isLocked ? t('screens:workout.unlockWithPremium') : t('screens:workout.startWorkout')}
+
@@ -235,6 +263,14 @@ function createStyles(colors: ThemeColors) {
height: 44,
},
+ // Video Preview
+ videoPreview: {
+ height: 220,
+ borderRadius: RADIUS.XL,
+ overflow: 'hidden' as const,
+ marginBottom: SPACING[4],
+ },
+
// Quick Stats
quickStats: {
flexDirection: 'row',
@@ -380,6 +416,12 @@ function createStyles(colors: ThemeColors) {
backgroundColor: BRAND.PRIMARY,
alignItems: 'center',
justifyContent: 'center',
+ flexDirection: 'row',
+ },
+ lockedButton: {
+ backgroundColor: colors.bg.surface,
+ borderWidth: 1,
+ borderColor: BRAND.PRIMARY,
},
startButtonPressed: {
backgroundColor: BRAND.PRIMARY_DARK,
diff --git a/eas.json b/eas.json
new file mode 100644
index 0000000..78e3fa0
--- /dev/null
+++ b/eas.json
@@ -0,0 +1,36 @@
+{
+ "cli": {
+ "version": ">= 16.0.1",
+ "appVersionSource": "remote"
+ },
+ "build": {
+ "development": {
+ "developmentClient": true,
+ "distribution": "internal",
+ "ios": {
+ "simulator": true
+ }
+ },
+ "preview": {
+ "distribution": "internal",
+ "ios": {
+ "resourceClass": "m-medium"
+ }
+ },
+ "production": {
+ "autoIncrement": true,
+ "ios": {
+ "resourceClass": "m-medium"
+ }
+ }
+ },
+ "submit": {
+ "production": {
+ "ios": {
+ "appleId": "millianlmx@icloud.com",
+ "ascAppId": "REPLACE_WITH_APP_STORE_CONNECT_APP_ID",
+ "appleTeamId": "REPLACE_WITH_APPLE_TEAM_ID"
+ }
+ }
+ }
+}
diff --git a/src/shared/data/workouts.ts b/src/shared/data/workouts.ts
index 8381bae..86f71fc 100644
--- a/src/shared/data/workouts.ts
+++ b/src/shared/data/workouts.ts
@@ -23,6 +23,7 @@ export const WORKOUTS: Workout[] = [
restTime: 10,
equipment: ['No equipment required', 'Yoga mat optional'],
musicVibe: 'electronic',
+ videoUrl: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8',
exercises: [
{ name: 'Jumping Jacks', duration: 20 },
{ name: 'Squats', duration: 20 },
@@ -45,6 +46,7 @@ export const WORKOUTS: Workout[] = [
restTime: 10,
equipment: ['Dumbbells optional'],
musicVibe: 'hip-hop',
+ videoUrl: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8',
exercises: [
{ name: 'Burpees', duration: 20 },
{ name: 'Lunges', duration: 20 },
@@ -238,6 +240,7 @@ export const WORKOUTS: Workout[] = [
restTime: 10,
equipment: ['Yoga mat'],
musicVibe: 'electronic',
+ videoUrl: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/adv_dv_atmos/main.m3u8',
exercises: [
{ name: 'Crunches', duration: 20 },
{ name: 'Russian Twists', duration: 20 },
@@ -880,6 +883,7 @@ export const WORKOUTS: Workout[] = [
restTime: 10,
equipment: ['No equipment required'],
musicVibe: 'electronic',
+ videoUrl: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8',
exercises: [
{ name: 'Burpees', duration: 20 },
{ name: 'Mountain Climbers', duration: 20 },
@@ -922,6 +926,7 @@ export const WORKOUTS: Workout[] = [
restTime: 10,
equipment: ['No equipment required'],
musicVibe: 'pop',
+ videoUrl: 'https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8',
exercises: [
{ name: 'Grapevine', duration: 20 },
{ name: 'Step Touch', duration: 20 },
diff --git a/src/shared/i18n/locales/de/screens.json b/src/shared/i18n/locales/de/screens.json
index 8e7582c..0445d25 100644
--- a/src/shared/i18n/locales/de/screens.json
+++ b/src/shared/i18n/locales/de/screens.json
@@ -189,7 +189,8 @@
"music": "Musik",
"musicMix": "{{vibe}} Mix",
"curatedForWorkout": "Zusammengestellt für dein Workout",
- "startWorkout": "WORKOUT STARTEN"
+ "startWorkout": "WORKOUT STARTEN",
+ "unlockWithPremium": "MIT TABATAFIT+ FREISCHALTEN"
},
"onboarding": {
diff --git a/src/shared/i18n/locales/en/screens.json b/src/shared/i18n/locales/en/screens.json
index 1412141..67961a7 100644
--- a/src/shared/i18n/locales/en/screens.json
+++ b/src/shared/i18n/locales/en/screens.json
@@ -189,7 +189,8 @@
"music": "Music",
"musicMix": "{{vibe}} Mix",
"curatedForWorkout": "Curated for your workout",
- "startWorkout": "START WORKOUT"
+ "startWorkout": "START WORKOUT",
+ "unlockWithPremium": "UNLOCK WITH TABATAFIT+"
},
"paywall": {
diff --git a/src/shared/i18n/locales/es/screens.json b/src/shared/i18n/locales/es/screens.json
index c3a4764..f56c1ce 100644
--- a/src/shared/i18n/locales/es/screens.json
+++ b/src/shared/i18n/locales/es/screens.json
@@ -189,7 +189,8 @@
"music": "M\u00fasica",
"musicMix": "Mix {{vibe}}",
"curatedForWorkout": "Seleccionado para tu entreno",
- "startWorkout": "EMPEZAR ENTRENO"
+ "startWorkout": "EMPEZAR ENTRENO",
+ "unlockWithPremium": "DESBLOQUEAR CON TABATAFIT+"
},
"onboarding": {
diff --git a/src/shared/i18n/locales/fr/screens.json b/src/shared/i18n/locales/fr/screens.json
index 1474a30..9f34485 100644
--- a/src/shared/i18n/locales/fr/screens.json
+++ b/src/shared/i18n/locales/fr/screens.json
@@ -189,7 +189,8 @@
"music": "Musique",
"musicMix": "Mix {{vibe}}",
"curatedForWorkout": "Sélectionné pour votre entraînement",
- "startWorkout": "COMMENCER L'ENTRAÎNEMENT"
+ "startWorkout": "COMMENCER L'ENTRAÎNEMENT",
+ "unlockWithPremium": "DÉBLOQUER AVEC TABATAFIT+"
},
"paywall": {
diff --git a/src/shared/services/access.ts b/src/shared/services/access.ts
new file mode 100644
index 0000000..5967378
--- /dev/null
+++ b/src/shared/services/access.ts
@@ -0,0 +1,32 @@
+/**
+ * TabataFit Access Control Service
+ * Manages free tier vs premium workout access
+ *
+ * Freemium model: 3 free workouts, rest behind paywall
+ */
+
+/** Workout IDs available without a subscription */
+export const FREE_WORKOUT_IDS: readonly string[] = [
+ '1', // Full Body Ignite — Beginner, 4 min (full-body)
+ '11', // Core Crusher — Intermediate, 4 min (core)
+ '43', // Dance Cardio — Beginner, 4 min (cardio)
+] as const
+
+/** Number of free workouts (for display in paywall copy) */
+export const FREE_WORKOUT_COUNT = FREE_WORKOUT_IDS.length
+
+/**
+ * Check if a specific workout is part of the free tier
+ */
+export function isFreeWorkout(workoutId: string): boolean {
+ return FREE_WORKOUT_IDS.includes(workoutId)
+}
+
+/**
+ * Check if user can access a workout
+ * Premium users can access everything; free users only get FREE_WORKOUT_IDS
+ */
+export function canAccessWorkout(workoutId: string, isPremium: boolean): boolean {
+ if (isPremium) return true
+ return isFreeWorkout(workoutId)
+}
diff --git a/src/shared/services/music.ts b/src/shared/services/music.ts
index 74cc9e6..3d428d4 100644
--- a/src/shared/services/music.ts
+++ b/src/shared/services/music.ts
@@ -10,31 +10,35 @@ export interface MusicTrack {
vibe: MusicVibe
}
+// Public-domain / royalty-free test audio from Apple HLS examples & samples
+// Replace with Supabase-hosted tracks in production
+const TEST_AUDIO_BASE = 'https://www2.cs.uic.edu/~i101/SoundFiles'
+
const MOCK_TRACKS: Record = {
electronic: [
- { id: '1', title: 'Energy Pulse', artist: 'Neon Dreams', duration: 240, url: '', vibe: 'electronic' },
- { id: '2', title: 'Cyber Sprint', artist: 'Digital Flux', duration: 180, url: '', vibe: 'electronic' },
- { id: '3', title: 'High Voltage', artist: 'Circuit Breakers', duration: 200, url: '', vibe: 'electronic' },
+ { id: '1', title: 'Energy Pulse', artist: 'Neon Dreams', duration: 240, url: `${TEST_AUDIO_BASE}/StarWars60.wav`, vibe: 'electronic' },
+ { id: '2', title: 'Cyber Sprint', artist: 'Digital Flux', duration: 180, url: `${TEST_AUDIO_BASE}/tapioca.wav`, vibe: 'electronic' },
+ { id: '3', title: 'High Voltage', artist: 'Circuit Breakers', duration: 200, url: `${TEST_AUDIO_BASE}/preamble10.wav`, vibe: 'electronic' },
],
'hip-hop': [
- { id: '4', title: 'Street Heat', artist: 'Urban Flow', duration: 210, url: '', vibe: 'hip-hop' },
- { id: '5', title: 'Rhythm Power', artist: 'Beat Masters', duration: 195, url: '', vibe: 'hip-hop' },
- { id: '6', title: 'Flow State', artist: 'MC Dynamic', duration: 220, url: '', vibe: 'hip-hop' },
+ { id: '4', title: 'Street Heat', artist: 'Urban Flow', duration: 210, url: `${TEST_AUDIO_BASE}/StarWars60.wav`, vibe: 'hip-hop' },
+ { id: '5', title: 'Rhythm Power', artist: 'Beat Masters', duration: 195, url: `${TEST_AUDIO_BASE}/tapioca.wav`, vibe: 'hip-hop' },
+ { id: '6', title: 'Flow State', artist: 'MC Dynamic', duration: 220, url: `${TEST_AUDIO_BASE}/preamble10.wav`, vibe: 'hip-hop' },
],
pop: [
- { id: '7', title: 'Summer Energy', artist: 'The Popstars', duration: 185, url: '', vibe: 'pop' },
- { id: '8', title: 'Upbeat Vibes', artist: 'Chart Toppers', duration: 200, url: '', vibe: 'pop' },
- { id: '9', title: 'Feel Good', artist: 'Radio Hits', duration: 175, url: '', vibe: 'pop' },
+ { id: '7', title: 'Summer Energy', artist: 'The Popstars', duration: 185, url: `${TEST_AUDIO_BASE}/StarWars60.wav`, vibe: 'pop' },
+ { id: '8', title: 'Upbeat Vibes', artist: 'Chart Toppers', duration: 200, url: `${TEST_AUDIO_BASE}/tapioca.wav`, vibe: 'pop' },
+ { id: '9', title: 'Feel Good', artist: 'Radio Hits', duration: 175, url: `${TEST_AUDIO_BASE}/preamble10.wav`, vibe: 'pop' },
],
rock: [
- { id: '10', title: 'Power Chord', artist: 'The Amplifiers', duration: 230, url: '', vibe: 'rock' },
- { id: '11', title: 'High Gain', artist: ' distortion', duration: 205, url: '', vibe: 'rock' },
- { id: '12', title: ' adrenaline', artist: 'Thunderstruck', duration: 215, url: '', vibe: 'rock' },
+ { id: '10', title: 'Power Chord', artist: 'The Amplifiers', duration: 230, url: `${TEST_AUDIO_BASE}/StarWars60.wav`, vibe: 'rock' },
+ { id: '11', title: 'High Gain', artist: 'Distortion', duration: 205, url: `${TEST_AUDIO_BASE}/tapioca.wav`, vibe: 'rock' },
+ { id: '12', title: 'Adrenaline', artist: 'Thunderstruck', duration: 215, url: `${TEST_AUDIO_BASE}/preamble10.wav`, vibe: 'rock' },
],
chill: [
- { id: '13', title: 'Smooth Flow', artist: 'Lo-Fi Beats', duration: 250, url: '', vibe: 'chill' },
- { id: '14', title: 'Zen Mode', artist: 'Calm Collective', duration: 240, url: '', vibe: 'chill' },
- { id: '15', title: 'Deep Breath', artist: 'Mindful Tones', duration: 260, url: '', vibe: 'chill' },
+ { id: '13', title: 'Smooth Flow', artist: 'Lo-Fi Beats', duration: 250, url: `${TEST_AUDIO_BASE}/StarWars60.wav`, vibe: 'chill' },
+ { id: '14', title: 'Zen Mode', artist: 'Calm Collective', duration: 240, url: `${TEST_AUDIO_BASE}/tapioca.wav`, vibe: 'chill' },
+ { id: '15', title: 'Deep Breath', artist: 'Mindful Tones', duration: 260, url: `${TEST_AUDIO_BASE}/preamble10.wav`, vibe: 'chill' },
],
}
diff --git a/src/shared/services/purchases.ts b/src/shared/services/purchases.ts
index 816b292..1d99eb2 100644
--- a/src/shared/services/purchases.ts
+++ b/src/shared/services/purchases.ts
@@ -12,7 +12,9 @@ import Purchases, { LOG_LEVEL } from 'react-native-purchases'
// RevenueCat configuration
// test_ prefix = sandbox mode (free transactions on simulator + device sandbox accounts)
-export const REVENUECAT_API_KEY = 'test_oIJbIHWISJaUZdgxRMHlwizBHvM'
+// Set EXPO_PUBLIC_REVENUECAT_API_KEY in .env for production
+export const REVENUECAT_API_KEY =
+ process.env.EXPO_PUBLIC_REVENUECAT_API_KEY || 'test_oIJbIHWISJaUZdgxRMHlwizBHvM'
// Entitlement ID configured in RevenueCat dashboard
export const ENTITLEMENT_ID = '1000 Corp Pro'