Skip to content

ravendb/samples-fit

Repository files navigation

Fit Assistant

Build

Overview

A sample application showing how a fitness / health domain maps onto RavenDB: daily AI-generated goals, an AI chat coach with photo-based food logging, real-time activity feed across friends, heart-rate time series with rollups, and a Parquet/DuckDB trends pipeline.

Features used

The following RavenDB features power this application:

  1. AI Agents: the parent chat agent plus four sub-agents (motivate, explain-workout, food-photo-analyzer, calorie-estimator), with conversation persistence in @conversations, attachments, and streaming.
  2. GenAI Tasks: daily-goals (per-user, scheduled via @refresh) and auto-coach (per-workout) producing structured output deduped via @ai-hashes.
  3. Time Series + Rollups: heart-rate data with raw / hourly / daily / monthly tiers; queries pick the tier that matches the range.
  4. Subscriptions: auto-fulfill goals when activity crosses their threshold; fan fulfilled-goal events out to friends.
  5. Queue ETL: RabbitMQ-backed per-follower activity feed delivery.
  6. OLAP ETL: Parquet partitions to MinIO, read by embedded DuckDB for the trends tab.
  7. Changes API: the live-workouts ticker is push-driven, no polling.
  8. Document Refresh + Expiration: scheduled heartbeats trigger the daily-goals task; old goal docs self-prune.

Technologies

  1. RavenDB 7.2
  2. .NET 10
  3. ASP.NET Core 10
  4. Node.js 22
  5. React 18 + TypeScript
  6. .NET Aspire 13
  7. DuckDB (embedded)
  8. MinIO (S3-compatible object store)
  9. RabbitMQ

Run locally

Prerequisites

  1. .NET 10 SDK
  2. Aspire
  3. Node.js 22 or newer
  4. Docker Desktop

Run

Install frontend dependencies once:

cd src/FitAssistant.Frontend && npm install

From the repo root:

aspire run

Configure secrets

Parameter Description
openai-api-key Get one from the OpenAI API platform
ravendb-license Get free developer license from https://ravendb.net/dev

Provide via:

  1. Aspire dashboard, Parameters tab. Paste the value at runtime; Aspire persists it to user-secrets so subsequent runs reuse it.
  2. User-secrets. Set them once via the .NET CLI:
    cd samples.fit-assistant
    dotnet user-secrets set "Parameters:openai-api-key"  "<your-openai-key>"  --project src/FitAssistant.AppHost
    dotnet user-secrets set "Parameters:ravendb-license" '<your-license-json>' --project src/FitAssistant.AppHost

Community & Support

If you spot a bug, have an idea, or a question, please open an issue.

We also use a Discord server. If you have any doubts, don't hesitate to reach out!

License

This project is licensed with the MIT license.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors