calpics
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.
index.ts
https://yawnxyz--76c1547e1f1111f0b2b0569c3dd06744.web.val.run
A weight loss and fitness app that uses AI vision to analyze food images, calculate calories, and track your eating habits over time.
- πΈ 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
- Upload a photo of your food
- The app uses Llama 4 Maverick vision AI to analyze the image
- Get instant feedback on calories, ingredients, and nutritional information
- View your eating history and trends over time
- 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
βββ 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
- Visit the app URL
- Upload a food image or take a photo
- View the AI analysis of your food
- Track your progress over time
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.
If you encounter any issues:
- Make sure your GROQ_API_KEY is set correctly
- Check that your browser allows camera access if using the photo capture feature
- Ensure your image is clear and well-lit for best analysis results
