Skip to content
Celestial-0Public

About

An AI-Powered Nutrition Intelligence Operating System built on Cognitive Planning, Multi-Agent Reasoning, Hybrid RAG, and Reflection Loops.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ForkFit

An AI-Powered Nutrition Intelligence Operating System built on Cognitive Planning, Multi-Agent Reasoning, Hybrid RAG, and Reflection Loops.

Explore Docs »

· Report Bug »

Rust Next.js LangGraph PostgreSQL Redis


📸 Product Preview

Interactive Walkthrough

Explore a complete walkthrough of the ForkFit platform, showing live integration, signups, and session management.

ForkFit Walkthrough Video

Click the image above to watch the walkthrough on YouTube.

Features in Action

Here is a quick look at ForkFit's responsive dashboard, real-time logging, and sub-second token verification.

ForkFit Real-time Session Revocation & OAuth Demo


🧠 Enterprise Cognitive Intelligence Architecture (ECIA)

ForkFit goes beyond static planners by orchestrating continuous reasoning, learning, and personalization across three interdependent intelligence loops:

1. Reasoning Loop

Responsible for decision making and plan creation. $$\text{Planner} \longrightarrow \text{Dynamic Agent Graph} \longrightarrow \text{Consensus} \longrightarrow \text{Judge}$$

  • Cognitive Planner: Decomposes user requests into execution sub-tasks.
  • Consensus Layer: Aligns multi-agent viewpoints and ranks suggestions.
  • Judge Layer: Assures quality, safety, and goal validation before outputting, triggering replanning if validation fails.

2. Knowledge Loop

Responsible for grounding the system with factual constraints. $$\text{Hybrid RAG} \longrightarrow \text{User Memory} \longrightarrow \text{Knowledge Graph} \longrightarrow \text{Context Package}$$

  • Hybrid RAG Engine: Fuses semantic retrieval, metadata-filtered matches, and meal histories.
  • pgvector Search: Matches vector embeddings for ingredients, memory recall, and recipes using vector(1536) and HNSW indexes.
  • Knowledge Graph (Memgraph): Traverses nutrient interactions, allergy maps, and ingredient substitutions.

3. Learning Loop

Responsible for adapting the platform based on real-world outcomes. $$\text{User Feedback} \longrightarrow \text{Reflection Engine} \longrightarrow \text{Memory Update}$$

  • Reflection Engine: Analyzes adherence, successes, and failures to distill preference updates.
  • Agent Memories: Saves extracted rules and personalization parameters back to database memory slots.

🛠️ Multi-Agent Graph Execution

ForkFit executes a specialized suite of agents in parallel to plan, verify, and present recommendations:

  • 🛡️ Safety Agent: Audits allergies, health issues, and medical restrictions.
  • 🥗 Nutrition Agent: Computes daily/weekly targets (macros, micro-nutrients, calories).
  • 💰 Budget Agent: Optimizes grocery purchases and weekly spending bounds.
  • 🌍 Culture Agent: Integrates regional cuisines and religious dietary alignments.
  • 🍳 Recipe Agent: Recommends recipes, cooking steps, and variations.
  • 📅 Calendar Agent: Schedules meal timelines, balancing workout schedules and sleep routines.
  • 🛒 Shopping Agent: Builds efficient shopping checklists and plans pantry utilization.
  • 📊 Analytics Agent: Tracks adherence, health logs, and weight trends.
  • 🎨 Visualization Agent: Directs Chart, Mermaid, Canvas, and Dashboard generators to render custom visuals for the user.

🗄️ Database Domains

ForkFit organizes data into 8 sequential domain systems serving as the system's database substrate:

  1. Identity, Access Control & RBAC: Session refreshes, user accounts, social signins, and granular permissions.
  2. Profiles, Preferences, & Health Safety: User goals, biometrics, workout journals, and allergy profiles.
  3. Recipes, Ingredients, & Cooking: Cost metrics, culinary tags, parental recipe branching, and consumption logs.
  4. Meal Planning & Shopping Lists: Plan items, pantry inventories, and grocery checklists.
  5. Chat & Feedbacks: Conversation sessions and feedback metrics to fuel reflection.
  6. AI Orchestration & Memory: Agent execution step metrics, tracing outputs, and memory items.
  7. pgvector RAG Search: Dense vector index attachments for recipes, ingredients, and long-term memory.
  8. Asynchronous Processing & Audit: Background workers, notification histories, and security logs.

💻 Tech Stack

  • Frontend: Next.js (Web App & Developer API Docs), Expo (Mobile App)
  • Backend & API Gateways: Rust (Axum, SQLx)
  • Orchestration: LangGraph
  • LLMs: OpenAI GPT-4, Gemma4, Qwen text embeddings
  • Primary Databases: PostgreSQL & Redis
  • Vector Engine: pgvector (with HNSW index support)
  • Observability: LangSmith & OpenTelemetry
  • Deployment: Docker & Kubernetes

📂 Repository Layout

ForkFit/
├── client/              # Monorepo client package (using Turbo & Bun)
│   ├── web/             # Frontend Next.js web application UI
│   └── docs/            # Developer documentation & API portal (Next.js + Fumadocs)
└── server/              # Backend core engine [(Api)(Rust + Actix/Axum + SQLx) + (Intelligence)(Python + gRPC + LangGraph)]

📖 Documentation

All detailed technical references, environment configurations, and API descriptions are hosted in the local docs server:

  1. Navigate to the docs workspace:
    cd client/docs
  2. Install dependencies and start the dev server:
    bun install
    bun run dev
  3. Open http://localhost:3001 to view the Docs portal.

📄 License

This project is licensed under the MIT License. See LICENSE for details.

About

An AI-Powered Nutrition Intelligence Operating System built on Cognitive Planning, Multi-Agent Reasoning, Hybrid RAG, and Reflection Loops.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages