FitBuddy:以 Gemma 3:1B 打造本機 AI 健身伴侶
FitBuddy: Building a Local AI Fitness Companion with Gemma 3:1B
作者以 Gemma 3:1B 和 Ollama 打造本機運行的 FitBuddy 健身習慣網頁應用程式,協助用戶建立健身及生活習慣。應用程式按用戶日常安排和目標生成個人化習慣計劃,並以 Outdoor Quest 推介戶外活動,透過瀏覽器 LocalStorage 記錄已完成的任務數量。本機推理可免除每次請求的 API 費用;如相關資料保留在本機,亦有助保障私隱。
What I Built
I built FitBuddy, a beginner-friendly fitness and habit-building web application that helps people take small steps toward a healthier lifestyle.
The idea behind FitBuddy is simple: building better habits shouldn't require expensive tools or a complete lifestyle change overnight.
FitBuddy uses AI to generate personalized habit plans based on a user's routine and goals. I also added an Outdoor Quest feature that suggests small outdoor activities to encourage users to spend less time scrolling and more time outside.
The project could be useful for people who struggle to maintain routines and for individuals looking for an affordable way to organize their fitness habits. In the future, I would like to explore adapting it for independent personal trainers.
Demo
FitBuddy currently runs locally on my computer.
For a look at the project and its development, check out my Week 1 submission:
FitBuddy Outdoor Quest: Local AI That Gets You Outside
Code
Tech stack:
HTML, CSS, and JavaScript
Node.js and Express
Ollama
Gemma 3:1B
The application runs locally. (Add your GitHub repository link here if you have a public repository.)
How I Built It
I built FitBuddy using HTML, CSS, JavaScript, Node.js, and Express. For the AI functionality, I used Gemma 3:1B through Ollama, allowing the application to generate responses using a model running on my own computer.
One of the features I implemented is Outdoor Quest. When a user requests a quest, the backend sends a prompt to the locally running model and returns a suggested outdoor activity to the website.
I also added a completion interaction that tracks the number of quests marked as completed using browser LocalStorage.
This project gave me hands-on experience connecting a local AI model to a web application rather than relying entirely on a hosted AI service.
Why Does Open Innovation Matter?
For me, the biggest advantage of open-weight AI is the freedom to experiment.
As a student building projects with limited resources, paying for an AI API for every experiment isn't always practical. Running Gemma locally through Ollama lets me develop and test AI-powered features without per-request API charges.
Local inference can also help protect privacy because user information doesn't have to be sent to an external AI provider, provided the application is configured to keep the relevant data local.
Another advantage is flexibility. I can explore different models, experiment with prompts, and change how the application behaves without being tied to one hosted provider.
Open innovation makes it easier for individual developers to learn, build, and experiment with ideas that might otherwise be too expensive to explore.
It doesn't automatically make every model better or every application free to operate, but it gives developers more control over the tools they build with.
I experimented with developer tools including Codex and DevRelay during my open-source AI journey.
I'm submitting FitBuddy for the Side Hustle challenge, exploring how a locally powered AI application could eventually become a useful, affordable tool for people who want help building healthier habits.
Building FitBuddy has taught me that you don't need an expensive cloud setup to start experimenting with AI. Sometimes, a local model, a simple web application, and a problem worth solving are enough to get started.
I'm looking forward to improving FitBuddy and discovering what I can build next with open-source AI.
來源:DEV Community · dev.to