About the Project: SAPOR
Self-Analyzing AI-Powered Orchestrator for Recipes
🌱 Inspiration
The inspiration for SAPOR came from an unusual but powerful observation:
Food systems are treated as static data, while software systems are treated as living, evolving entities.
As a computer science student deeply involved in software engineering, AI, and system design, I noticed how developers rely on tools like linters, refactoring, technical debt analysis, and self-review to continuously improve code quality. In contrast, most food and nutrition applications stop at calorie counting or basic recommendations, offering little explainability and almost no long-term learning.
I wondered:
What if recipes were treated like code?
What if unhealthy patterns were detected the same way bugs or code smells are detected?
What if a food recommendation system could also analyze and improve itself?
That question led to the creation of SAPOR, a project that merges software engineering principles, agentic AI, nutrition science, and sustainability into one intelligent system.
🧠 What I Learned
Building SAPOR was not just about coding—it was about thinking in systems. Key learnings include:
Agentic AI Design
I learned how to design AI as a collaboration of agents rather than a single monolithic model. Each agent in SAPOR has a clear responsibility, which improves reasoning, scalability, and explainability.Explainable AI (XAI)
Recommendations without reasoning reduce trust. SAPOR forced me to design outputs that explain why something is good or bad, not just what to choose.Cross-domain abstraction
Mapping software engineering concepts to nutrition (e.g., recipes as programs, ingredients as dependencies) taught me how powerful abstractions can unlock innovation across domains.System introspection
Implementing self-analysis made me understand how modern systems can monitor, critique, and improve their own architecture—an advanced but critical concept in AI engineering.
🏗️ How I Built the Project
SAPOR is built as a full-stack, agentic AI system with three major layers:
1. Frontend (User Interaction Layer)
The frontend focuses on clarity and transparency:
- Personalized dashboards
- Recipe health indicators
- Nutritional breakdowns
- Visual “recipe smell” warnings
- Refactoring previews
The goal was to make AI decisions visible and understandable, not hidden.
2. Backend (Orchestration Layer)
The backend acts as the system’s orchestrator:
- Manages user profiles and preferences
- Coordinates between AI agents
- Tracks feedback and behavior
- Maintains decision logs for explainability
APIs are designed to be modular so agents can evolve independently.
3. Agentic AI & ML Layer
This is the core intelligence of SAPOR. It consists of multiple cooperating agents:
- Recipe Analysis Agent – Detects nutritional anti-patterns (“recipe smells”)
- Nutrition Reasoning Agent – Evaluates health impact
- Preference Learning Agent – Learns from user behavior
- Sustainability Agent – Estimates carbon footprint
- Refactoring Agent – Suggests healthier alternatives
- Meta-Analysis Agent – Analyzes SAPOR’s own codebase
Instead of a single decision function, SAPOR follows an agent collaboration model, closer to how human teams work.
🔢 Mathematical Insight (Example)
Health scoring in SAPOR is computed as a weighted aggregation:
[ H = \sum_{i=1}^{n} w_i \cdot s_i ]
Where:
- ( s_i ) = severity score of the ( i^{th} ) recipe smell
- ( w_i ) = health impact weight
This allows the system to reason quantitatively while still remaining explainable.
🚧 Challenges I Faced
1. Designing the “Recipe Smell” Abstraction
The biggest challenge was defining nutritional issues in a way that:
- Is scientifically meaningful
- Can be detected algorithmically
- Is understandable to non-experts
Balancing accuracy with simplicity required multiple iterations.
2. Avoiding Over-Complexity
Agentic systems can easily become over-engineered. I had to carefully decide:
- Which agents were essential
- Which responsibilities could be merged
- How agents should communicate without tight coupling
3. Explainability vs Performance
Adding explanations, refactoring previews, and self-analysis increases computation. Optimizing the system without losing transparency was a constant trade-off.
4. Building Self-Analysis
Making a system analyze itself is conceptually difficult. Designing a meta-agent that evaluates code quality, technical debt, and improvement plans pushed me to think beyond traditional application logic.
🚀 Outcome & Reflection
SAPOR evolved from a simple idea into a conceptual framework that combines:
- AI reasoning
- Software engineering discipline
- Health and nutrition awareness
- Sustainability thinking
More than the final product, the biggest achievement was learning how to design AI systems that are reflective, explainable, and continuously improving.
SAPOR doesn’t just recommend food.
It reasons, critiques, refactors, and learns—just like a good engineer.
This project changed how I think about AI: not as a tool that gives answers, but as a system that asks better questions over time.
Built With
- agentic-ai
- cpp-score-request
- docker
- express.js
- fastapi
- javascript/typescript
- jwt-auth
- jwt-authentication
- mongodb
- node.js
- openai-api
- postgresql
- prompt-engineering
- react
- rest-apis
- tailwind-css

Log in or sign up for Devpost to join the conversation.