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.
The following RavenDB features power this application:
- 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. - GenAI Tasks:
daily-goals(per-user, scheduled via@refresh) andauto-coach(per-workout) producing structured output deduped via@ai-hashes. - Time Series + Rollups: heart-rate data with raw / hourly / daily / monthly tiers; queries pick the tier that matches the range.
- Subscriptions: auto-fulfill goals when activity crosses their threshold; fan fulfilled-goal events out to friends.
- Queue ETL: RabbitMQ-backed per-follower activity feed delivery.
- OLAP ETL: Parquet partitions to MinIO, read by embedded DuckDB for the trends tab.
- Changes API: the live-workouts ticker is push-driven, no polling.
- Document Refresh + Expiration: scheduled heartbeats trigger the daily-goals task; old goal docs self-prune.
- RavenDB 7.2
- .NET 10
- ASP.NET Core 10
- Node.js 22
- React 18 + TypeScript
- .NET Aspire 13
- DuckDB (embedded)
- MinIO (S3-compatible object store)
- RabbitMQ
Install frontend dependencies once:
cd src/FitAssistant.Frontend && npm installFrom the repo root:
aspire run| 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:
- Aspire dashboard, Parameters tab. Paste the value at runtime; Aspire persists it to user-secrets so subsequent runs reuse it.
- 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
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!
This project is licensed with the MIT license.


