Skip to content

schaurian/schautrack

Repository files navigation

Schautrack

Build Status GitHub Release License Docker Pulls

Schautrack is a self-hostable, open-source, AI-powered nutrition tracker for you and your friends.

Try it: schautrack.com

Dashboard

Goals

Tracking nutrition is tedious. But it helps you reach your goals.

Schautrack is built to stay out of your way. Log calories and macros, set goals, and let AI estimate from photos. Simple as that.

Features

  • Log calories and macros (protein, carbs, fat, fiber, sugar)
  • Daily goals with color-coded progress tracking
  • AI-powered nutrition estimation from food photos (OpenAI, Claude, or Ollama)
  • Weight tracking
  • Account linking to share data with friends
  • Real-time updates via SSE
  • Docker and Kubernetes ready
  • Android app on Google Play

Android App

Coming soon to Google Play

Want to test? The app is currently in closed testing. Write "hi" with your Google Play email to getschautrackapp@schauer.to and I'll add you and send you the link. I really appreciate early testers - this will change to open access once we have enough users!

Source code available at schautrack-android.

Quickstart (Docker)

mkdir schautrack && cd schautrack
curl -O https://raw.githubusercontent.com/schaurian/schautrack/main/compose.yml
curl -O https://raw.githubusercontent.com/schaurian/schautrack/main/.env.example
mv .env.example .env
sed -i "s/please-change-me/$(openssl rand -hex 32)/" .env
docker compose up -d

App is available at http://localhost:3000.

Kubernetes (Helm)

A Helm chart is available for Kubernetes deployments with bundled PostgreSQL.

helm repo add schautrack https://helm.schautrack.com
helm repo update
helm install schautrack schautrack/schautrack \
  --set config.sessionSecret="$(openssl rand -base64 32)" \
  --set postgresql.auth.password="$(openssl rand -base64 16)"

See Helm Chart Documentation for Ingress, TLS, external databases, AI configuration, and all parameters.

Development Setup

To build from source instead of using pre-built images:

git clone https://github.com/schaurian/schautrack.git
cd schautrack
cp .env.example .env
docker compose -f compose.dev.yml up --build

Environment Variables

Settings can be configured via environment variables (in .env or passed to the container). Some settings can also be changed by an admin in /admin. Environment variables always take precedence.

Required

Variable Default Description
DATABASE_URL (empty) PostgreSQL connection string (e.g. postgresql://user:pass@host:5432/db)
SESSION_SECRET (empty) Random secret for session encryption

General

Variable Default Description
PORT 3000 Port to listen on
ADMIN_EMAIL (empty) Email that gets access to /admin page
SUPPORT_EMAIL (empty) Contact email shown on support/error pages
BASE_URL (auto-detect) Base URL for SEO meta tags (e.g., https://schautrack.com). Auto-detects from request if not set.

AI Features

Photo-based nutrition estimation with support for OpenAI, Claude, and Ollama.

Variable Default Description
AI_PROVIDER (empty) AI provider to use: openai, claude, or ollama. Required to enable AI features.
AI_KEY (empty) Global API key (fallback when users don't have their own)
AI_KEY_ENCRYPTION_SECRET (empty) Random 32-byte hex string for encrypting user API keys
AI_ENDPOINT (empty) Custom endpoint override (e.g., http://your-ollama-host:11434/v1). Leave blank to use provider defaults.
AI_MODEL (empty) Specify AI model to use (e.g., gpt-4o, claude-sonnet-4-5-20250929, gemma3:12b). Required for OpenAI and Claude.
AI_DAILY_LIMIT 10 Daily limit for AI requests per user when using global key (0 = unlimited)

Note: Ollama models must be downloaded before use. The docker-compose setup automatically pulls the model specified in AI_MODEL. Models specified only in API requests will fail if not pre-downloaded.

SMTP (Password Reset)

Variable Default Description
SMTP_HOST (empty) SMTP server hostname
SMTP_PORT 587 SMTP port
SMTP_USER (empty) SMTP username
SMTP_PASS (empty) SMTP password
SMTP_FROM SUPPORT_EMAIL From address for emails
SMTP_SECURE false Set to true for SSL/TLS

Legal Pages

Variable Default Description
ENABLE_LEGAL false Set to true to enable /imprint, /privacy, /terms
IMPRINT_URL /imprint URL for imprint link
IMPRINT_ADDRESS (empty) Full name and address (use \n for line breaks)
IMPRINT_EMAIL (empty) Contact email (rendered as SVG for spam protection)

SEO / Deployment

Variable Default Description
ROBOTS_INDEX false Set to true to allow search engine indexing (default: noindex for self-hosters)

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

This project is licensed under the GNU Affero General Public License v3.0.

About

Schautrack is a self-hostable, open-source, AI-powered calorie tracker for you and your friends.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors