• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
yawnxyz

yawnxyz

calpics

Public
Like
calpics
Home
Code
5
backend
3
frontend
5
shared
2
README.md
H
index.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
index.ts
https://yawnxyz--76c1547e1f1111f0b2b0569c3dd06744.web.val.run
README.md

FoodVision - AI Food Tracking App

A weight loss and fitness app that uses AI vision to analyze food images, calculate calories, and track your eating habits over time.

Features

  • πŸ“Έ Take pictures of your food
  • πŸ” AI-powered food recognition and calorie estimation
  • 🏷️ Automatic food tagging and description
  • πŸ“Š Track your eating habits over time
  • πŸ“± Mobile-friendly interface

How It Works

  1. Upload a photo of your food
  2. The app uses Llama 4 Maverick vision AI to analyze the image
  3. Get instant feedback on calories, ingredients, and nutritional information
  4. View your eating history and trends over time

Technical Details

  • Backend: TypeScript with Hono framework
  • AI Vision: Llama 4 Maverick via Groq API
  • Database: SQLite for data storage
  • Frontend: HTML, CSS (Tailwind), and JavaScript with HTMX

Project Structure

β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ database/
β”‚   β”‚   β”œβ”€β”€ schema.ts       # Database schema
β”‚   β”‚   └── queries.ts      # Database queries
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   └── vision.ts       # Groq API integration
β”‚   └── README.md           # Backend documentation
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html          # Main HTML template
β”‚   β”œβ”€β”€ app.js              # Frontend logic
β”‚   β”œβ”€β”€ style.css           # Custom styles
β”‚   β”œβ”€β”€ favicon.svg         # Favicon
β”‚   └── README.md           # Frontend documentation
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ types.ts            # Shared type definitions
β”‚   └── README.md           # Shared code documentation
└── index.ts                # Main entry point

Getting Started

  1. Visit the app URL
  2. Upload a food image or take a photo
  3. View the AI analysis of your food
  4. Track your progress over time

Environment Variables

To use this app, you'll need to set up one environment variable:

  • GROQ_API_KEY: Your API key for Groq (required for vision analysis)

You can set this in the Val Town environment variables section.

Troubleshooting

If you encounter any issues:

  1. Make sure your GROQ_API_KEY is set correctly
  2. Check that your browser allows camera access if using the photo capture feature
  3. Ensure your image is clear and well-lit for best analysis results
HTTP
  • index.ts
    yawnxyz--76…44.web.val.run
Code
backendfrontendsharedREADME.md
H
index.ts
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.