How laurenweickert/whoop-postpartum-chat works
Project type and purpose
• This is a full‐stack front‐end mobile application (“Whoop Postpartum Chat”) built with React Native and Expo.
File structure
• Top‐level directories:
• app/ – Expo Router screens and layouts (tab navigation, insights, profile).
• src/ – Web entry (Vite) with core components, store, and utilities.
• components/, hooks/, data/ – Shared React components, custom hooks, and mock data.
• Config/build files:
• vite.config.ts, tsconfig*.json, postcss.config.js, tailwind.config.js – build tool and styling setup.
• expo/ – device/type definitions and Expo CLI config.
• Key patterns:
• Tab‐based navigation with Expo Router.
• Zustand for state management.
• Custom utility modules for OpenAI calls and date formatting.
README for additional insights
• Tech stack clarifies major frameworks (Expo/React Native), state (Zustand), storage (AsyncStorage/SecureStore), UI (Tailwind CSS), APIs (OpenAI, Whoop).
• Features map directly to two functional domains: the Health Insights Dashboard and the AI Chat Assistant.
a. Main components
• Product: Whoop Postpartum Chat (mobile UI + navigation)
• Platform components: Expo framework, React Native runtime, Vite bundler, Tailwind CSS, Expo Router
• Service components:
– State Management Service (Zustand store)
– Local Storage Service (AsyncStorage / SecureStore)
– Mock Data Service (for development)
– Health Insights Logic
– Chat Assistant Logic
• Integration components (external): Whoop API, OpenAI API
b. Relationships & interactions
• Mobile UI → State Management Service (dependency at runtime)
• State Management → Local Storage (integration via file sync)
• Health Insights Logic → Mock Data Service (development‐time dependency)
• Health Insights Logic → date-fns (runtime dependency)
• Chat Assistant Logic → OpenAI API (API integration)
• Health Insights Logic → Whoop API (planned API integration)
c. Architectural patterns/design principles
• Single‐page/tab navigation pattern
• Separation of concerns: UI layer, state layer, service layer, integration layer
• Mock data abstraction for testing/development
d. Relevant technologies
• UI/Navigation: React Native, Expo Router, Tailwind CSS, Lucide React
• State/Storage: Zustand, AsyncStorage / SecureStore
• Build/Tooling: Vite, TypeScript, ESLint, PostCSS
• Utilities: date-fns, OpenAI SDK
Detail
• Break the application into as many logical components as possible (UI screens, state slices, services, integrations).