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 miliseconds.
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