Project Info
Inspiration
We’re fitness-focused people who care about what we eat and how we perform. Tracking nutrition was a daily habit, but manual entry was slow and inaccurate. We wanted a smarter way—one that could estimate nutritional data directly from food images while also helping people stay accountable through social features.
What it does
CalTracker lets users authenticate, upload images of their meals, and get detailed food information automatically using Google Gemini’s image analysis. The app stores nutrition stats tied to each user and allows friends to form social groups to track progress together. It’s a mix of AI-powered food recognition, fitness tracking, and community motivation.
How we built it
Backend: FastAPI (Python) for APIs and data management. Frontend: React for the web interface. Mobile: Swift for iOS. Dashboard: Svelte + Tauri for a lightweight, cross-platform analytics dashboard. The AI pipeline integrates directly with Google Gemini for image-based nutrition estimation. User authentication and data storage tie all the components together into a cohesive system.
Challenges we ran into
CORS issues caused major headaches—cross-site requests between our various frontends and backend needed constant debugging. Coordinating multiple frameworks (React, Svelte, Swift, FastAPI) was tough, especially with limited frontend experience. Managing so many moving parts introduced technical debt and integration pain points.
Accomplishments we're proud of
We aimed high and delivered something real. We tackled multiple unfamiliar technologies, built a complex multi-platform system, and made something that could actually improve people’s health. The ambition itself was a success: connecting AI, nutrition, and social accountability into one product.
What we learned
How CORS works and how fragile it can be. The cost of technical debt when using AI-assisted coding. Time management and the importance of realistic scope. The value of teamwork and learning outside your comfort zone. We learned that growth happens at the edge of frustration.
What's next
We’re done with this iteration—it served its purpose as a learning project. The next step is to build something better: cleaner architecture, tighter design, stronger purpose. CalTracker was a stepping stone toward future systems that are better built, better designed, and help more people. [ \text{Growth} = \frac{\text{Experience}}{\text{Comfort Zone}} ]
CalTracker
Built for Cal Hacks. AI-powered meal logging from a single photo.
Watch the ▶️ Demo Video Below:
What it does
- You snap a photo of your meal in the iOS app (SwiftUI).
- The photo is sent to the FastAPI backend.
- Backend calls the Gemini API to estimate calories, protein, fat, and other macros.
- The result is stored in Supabase (PostgreSQL).
- The web dashboard (Svelte + Tauri desktop shell) shows:
- today’s intake
- meal gallery
- progress vs goals
- friend/leaderboard view
- planned charts for historical stats
- A small physical screen device mirrors the key daily stats for at-a-glance tracking.
Features
- 📸 Photo-based meal capture (iOS, SwiftUI)
- 🤖 Image → nutrition via Gemini API
- 🗄️ Persistent storage with Supabase/PostgreSQL
- 📊 Daily calorie & macro dashboard
- 🖼️ Meal gallery for everything you’ve eaten
- 🧑🤝🧑 Share progress + leaderboards
- 📈 Planned charts for intake over time
- 🖥️ Companion physical display tied to the user’s account
Tech Stack
Frontend (web/dashboard)
- Svelte
- Tauri (desktop-style container)
Mobile
- SwiftUI (iOS)
Backend
- FastAPI (Python)
- Gemini API (image analysis)
Database
- Redis
- Supabase
- PostgreSQL
Analysis
View
Metric
- 20
- 17
- 16
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- SupabaseIn code
- SvelteIn code
- SwiftIn code
- Tailwind CSSIn code
- TypeScriptIn code
- Google GeminiClaimed
- Node.jsClaimed
- PostgreSQLClaimed
11 of 14 appear in the indexed code. 3 claimed on Devpost could not be matched to code, which may simply mean the tool leaves no trace in the repository.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
101 KB
Source files
44
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
AlexthePear/CalorieTracker
67 files · 203 KB · @ 6455277
Structure
Interface
16 files · 24%Screens, components and styles rendered to the user.
API & routing
2 files · 3%Request entry points: routes, handlers and controllers.
Application logic
24 files · 36%Domain rules, services and shared utilities.
+2 more
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript57%
- Python19%
- Swift9%
- CSS5%
- Svelte5%
- Markdown3%
- Other (2)3%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
backend/requirements.txt
pypi · 76- annotated-doc
- annotated-types
- anyio
- cachetools
- certifi
- cffi
- charset-normalizer
- click
- cryptography
- deprecation
- dnspython
- dotenv
- email-validator
- fastapi
- fastapi-cli
- fastapi-cloud-cli
- google-auth
- google-auth-httplib2
- +58 more
requirements.txt
pypi · 70- annotated-doc
- annotated-types
- anyio
- cachetools
- certifi
- cffi
- charset-normalizer
- click
- cryptography
- deprecation
- dnspython
- dotenv
- email-validator
- fastapi
- fastapi-cli
- fastapi-cloud-cli
- google-auth
- google-genai
- +52 more
pi-dashboard/package.json
npm · 2222 development-only dependencies.
web/package.json
npm · 15- @radix-ui/react-label
- @radix-ui/react-select
- @radix-ui/react-slot
- bun-plugin-tailwind
- class-variance-authority
- clsx
- lucide-react
- react
- react-dom
- tailwind-merge
- +5 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.
