Workout Log with an AI Assistant
- Role
- Author · Personal project
- Period
- May — Jul 2026
- Stack
- React NativeExpoTypeScriptZustandOpenAI APIJest
Problem
Build a convenient workout log and add an AI assistant that knows the training history and answers fast, without waiting for the full model response.
Solution
- An app with React Native and Expo (expo-router, Zustand): sets, daily history, custom exercises, history export and import, membership tracking with reminders.
- An AI chat with streamed replies via the OpenAI API (Responses API): a workout summary and system instructions are assembled into the context, trimmed to the model window.
- Attachments — images and documents; handling of stream failures, retry and abort.
- The API key lives in the secure store; chat and assistant settings live in the app store; tests with Jest.
Impact
- The assistant answers based on real training history, not generic advice.
- Replies stream in as they are generated, and network failures do not break the chat.