Build an Open-Source AI Fitness Tracker with Flutter and SQLite
I built an open-source fitness tracking app in Flutter, but the core workflow is the AI-agent architecture that designed it, built it, and now coaches from its data. For years, I tracked workouts in OneNote. The records were messy, difficult to search, and inconsistent. Excel went out of date as soon as I skipped a week. When I tried chatting with LLMs about my training, the problem was similar every time: no context, no memory, and no awareness of the weights I was using. Each conversation started from zero. The solution has two layers. Gym Tracker is a Flutter app with a local SQLite database that structures workout data properly. It includes 33 pre-populated exercises across 10 muscle groups, separate strength and hypertrophy records, multiple runs with pace, body stats, and full session history. There are no subscriptions, accounts, or cloud dependencies. The database is a file I own. Deschamps is the AI agent that reads the database and knows my full training history. It is not a chat window that forgets between messages; it is a tactician with long-term recall of my personal bests, progression, and injuries. The app stores the data, and Deschamps turns it into decisions. Step-by-step: 1. I defined the data architecture. Fitness data is operational data, so I gave it a schema, a query layer, and an agent that respects its history. I designed a SQLite schema with five tables, proper constraints, and a 10-category muscle taxonomy enforced by a CHECK constraint. 2. I wrote architectural prompts for AI coding agents. I run a team of specialized AI agents using OpenClaw, an open-source agent framework. I act as the CTO agent: I design the systems and delegate implementation to coding agents, including Forge, Cline, and Claude Code. I provide the vision, and they provide the execution. 3. The coding agents built the Flutter app with clean architecture, the repository pattern, Provider state management, and real-time cross-screen refresh. For each iteration, I review the result, refine the prompt, and ship. 4. I designed the database for dual access. The app writes to it, and the AI agent reads from it. They use the same file and schema. In external database mode, the app opens a `.db` file directly, allowing both the app and Deschamps to read and write simultaneously. This creates the bridge between the data layer and the intelligence layer. 5. I shipped the app across Windows, macOS, Linux, Android, and iOS from one codebase. The Android APK is available as a direct download from GitHub. 6. Deschamps reads the database and programs the next session using the full training history. Every session, weight, and body statistic remains structured data without summarization loss. The data is the context. 7. I made everything open source: the app, the agent prompts, and the architecture documentation. My company, Executive Mind (executivemind.io), uses the same agent-first model with seven AI agents and $40/month in total compute, running real operations 24/7. The result is a fitness tracker that remembers everything, an AI coach that never forgets, and a data layer designed from the start for both humans and machines to read. Links: krisracette.me/gym-tracker · github.com/Roughn3ck/gym_tracker · executivemind.io
0 comments