YuHeng (玉衡)

A local nutrition tracking app powered by AI

View the Project on GitHub formaxcn/yuheng

yuheng

YuHeng(玉衡 Jade Balance) - A local nutrition tracking app named after the fifth and brightest star in the Big Dipper constellation in traditional Chinese astronomy. Just as this star serves as a guiding and balancing force, YuHeng aims to help users in tracking their nutrition effectively.

Features

Supported LLM Providers

YuHeng supports a wide range of LLM providers for food recognition:

Detailed model lists can be configured in the settings page.

Getting Started

  1. Clone the repo
  2. Run bun install
  3. Run bun run dev
  4. Open http://localhost:3000
  5. Configure your LLM Provider and API Key in the settings page.

Docker Usage

Build the image:

docker build -t yuheng .

Run the container:

# Create a data directory
mkdir data

# Run container with PostgreSQL
docker run -d \
  --name yuheng \
  -p 3000:3000 \
  -e DATABASE_URL=postgresql://user:password@your-db-host:5432/yuheng \
  -v "$(pwd)/data:/app/data" \
  ghcr.io/formaxcn/yuheng

The container will automatically run database migrations on startup.

Environment Variables

Variable Description Required Default
DATABASE_URL PostgreSQL connection string Yes -

Example:

DATABASE_URL=postgresql://user:password@localhost:5432/yuheng

Docker Compose (PostgreSQL)

You can easily start YuHeng with a PostgreSQL database using Docker Compose:

  1. Run:
    docker-compose up -d
    

    This will start both the YuHeng app and a PostgreSQL database. The app will automatically wait for the database to be ready and run migrations before starting.

API Documentation

API documentation is available at /api/docs (JSON) or /api/openapi.json. You can import this into Postman or explore via Swagger UI.

Project Documentation

Detailed technical and user-facing documentation for YuHeng:

🗺️ Roadmap

✨ Features

User-centric guides on what YuHeng can do and how it works.

🛠️ System Design

Technical details for developers and contributors.

Configuration

Settings like meal times, daily targets, and API keys can be configured directly in the app’s settings page.

Roadmap

See Release History for completed versions and Future Plans for upcoming features.

Completed

Upcoming

## Screenshots

Main Page Add Meal Settings