DietBox Clinical Nutrition & Healthy Meal Catering — Saudi Arabia

DietBox Operations — Clinical Meal Subscriptions & Dynamic PDF Engine

Calculating calories and macros manually for 1,000+ active subscribers while designing daily kitchen box labels took 3+ hours daily with recurring meal mix-ups. Built an automated .NET 8 subscription engine with sub-100ms QuestPDF label generation.

.NET 8Clean ArchitectureSQL ServerEF CoreQuestPDFCQRSTailwind CSS
DietBox Operations — Clinical Meal Subscriptions & Dynamic PDF Engine

Operational Benchmarks

Measurable impact achieved in production.

1,000+

Active Subscribers

< 100ms

PDF Generation Time

0% أخطاء

Labeling Errors

3 ساعات

Daily Saved Kitchen Time

Operational Challenges

Critical bottlenecks prior to system deployment

  • Automated macro calculation customized to subscriber medical profiles.
  • Ultra-fast batch generation of thermal box labels and meal plan PDFs.
  • Managing recurring subscription renewals, payments, and daily branch delivery routes.
  • Strict Clean Architecture designed for seamless future mobile integrations.

Operational Transformation

Direct before vs after production benchmarks

Meal Label Preparation

Before3 hours daily of manual calculations
NowInstant automated batch generation in seconds

Dietary Accuracy

BeforeFrequent mix-ups in custom allergen meals
Now100% precision matching subscriber medical profile

Architectural Decisions & Trade-offs

Engineered design choices, technical rationale, and evaluated trade-offs

01

Adopted QuestPDF over HTML-to-PDF Wrappers

Architectural Rationale:

Generated vector PDFs via pure C# fluent API 10x faster with zero headless browser memory overhead.

Calculated Trade-off:Designed report layouts purely in C# fluent code rather than standard HTML templates.
02

Strict Clean Architecture Separation

Architectural Rationale:

Isolated nutritional domain rules from DB adapters for painless unit testing and scalability.

Calculated Trade-off:Higher file count and mapping complexity across Domain and Application layers.

Data Flow & Integration Pipeline

Live visual pipeline demonstrating real-time data exchange across services, AI engines, and databases.

B2C Web Portal
Global GDS APIs
WhatsApp Bot
Central Core API
Vector DB (RAG)
Background Tasks
Relational Database
Live Subsystems & Interfaces

Production Interfaces & Modules

Comprehensive architectural walkthrough of live dashboards, portals, and background engines.

React / Tailwind CSS
Landing Page - Hero Section & Value Proposition
Inspect Full Resolution

Landing Page - Hero Section & Value Proposition

Customer UI & Landing Page

Welcome hero section for DietBox displaying the brand value proposition, interactive meal cards with nutritional macros (calories, protein, keto), and CTA buttons.

React / Tailwind CSS
Landing Page - Core Features & Benefits
Inspect Full Resolution

Landing Page - Core Features & Benefits

Customer UI & Landing Page

Overview of DietBox core competitive advantages including 100% healthy meal quality, reliable scheduled delivery, and flexible customizable subscription plans.

React / Tailwind CSS
Landing Page - Monthly Menus & Plans Showcase
Inspect Full Resolution

Landing Page - Monthly Menus & Plans Showcase

Customer UI & Landing Page

Interactive showcase of monthly meal menus and subscription packages (Full, Seafood, Chicken, Meat) with click-to-zoom preview modal.

React / Modal UI
Detailed Menu Pricing Matrix & Macro Specs Modal
Inspect Full Resolution

Detailed Menu Pricing Matrix & Macro Specs Modal

Customer UI & Landing Page

High-resolution modal previewing the premium package pricing matrix across days and meal counts, standard meal macro composition (protein, carbs, veggies), add-ons, and branch QR codes.

React / Auth & Security
Staff & Management Authentication Portal
Inspect Full Resolution

Staff & Management Authentication Portal

Authentication & Security

Secure authentication portal for branch managers, supervisors, and kitchen operators with role-based access control.

React / Dashboard UI / Tailwind
Admin Dashboard - Comprehensive Reports & Analytics Hub
Inspect Full Resolution

Admin Dashboard - Comprehensive Reports & Analytics Hub

Dashboard & Analytics

Comprehensive analytical command center with branch/date filters and dedicated tabs for financial KPIs, subscriber growth, branch performance, and kitchen waste metrics.

React / CRUD Management
Admin Dashboard - Menu & Catalog Management
Inspect Full Resolution

Admin Dashboard - Menu & Catalog Management

Menu & Catalog Management

Catalog management interface allowing admins to create, update, and remove digital menu cards and monthly meal plans.

React / Financial Reporting / Excel Export
Admin Dashboard - Daily Branch Closing & Channel Settlement
Inspect Full Resolution

Admin Dashboard - Daily Branch Closing & Channel Settlement

Financials & POS Reconciliation

Daily branch cash & POS reconciliation module tracking cash, Mada, and delivery platforms (Jahez, Hungerstation, Ninja, Noon, Keeta) with Excel export.

React / Financial Analytics / VAT Accounting
Admin Dashboard - Detailed Expenses & Tax Analysis
Inspect Full Resolution

Admin Dashboard - Detailed Expenses & Tax Analysis

Financials & Tax Accounting

Detailed expense tracking dashboard breaking down VAT-taxable vs exempt expenses, total spending KPIs, category filters, and bulk Excel export.

React / Form UI / Financials
Admin Dashboard - General & Operational Expense Entry
Inspect Full Resolution

Admin Dashboard - General & Operational Expense Entry

Financials & Bookkeeping

Entry form for operational expenses and administrative overhead with VAT taxation status, branch allocation, and payment method selection.

React / Budgeting & Allocations
Admin Dashboard - Financial Allocations & Provisions Sinking Fund
Inspect Full Resolution

Admin Dashboard - Financial Allocations & Provisions Sinking Fund

Financials & Sinking Funds

Financial sinking fund module to set aside recurring liabilities (payroll, rent) with target progression bars and scheduled funding transfers.

React / Inventory Analytics
Admin Dashboard - Snacks Inventory & Consumption Report
Inspect Full Resolution

Admin Dashboard - Snacks Inventory & Consumption Report

Inventory & Operations

Comprehensive snack inventory tracker reporting inbound supplies, subscription withdrawals, spoiled units, and direct retail sales.

React / Form UI / Internal Operations
Admin Dashboard - Staff Meal Custody & Allowance Entry
Inspect Full Resolution

Admin Dashboard - Staff Meal Custody & Allowance Entry

Operations & Staff Management

Internal staff meal consumption logger to record worker meal allowances, dish types, and reconcile against employee limits.

React / CRUD Table / HR
Admin Dashboard - Staff & Branch Workers Management
Inspect Full Resolution

Admin Dashboard - Staff & Branch Workers Management

Staff & HR Management

Branch staff roster allowing administrators to manage chef/worker profiles, base compensation, daily complimentary meal limits, and active status.

React / Operations & QA
Admin Dashboard - Kitchen Food Waste & Spoilage Logging
Inspect Full Resolution

Admin Dashboard - Kitchen Food Waste & Spoilage Logging

Kitchen Operations & Waste Control

Kitchen food spoilage logging interface tracking wasted ingredients in grams with root cause reasons to minimize inventory loss.

React / Payroll Engine
Admin Dashboard - Payroll & Staff Account Overview
Inspect Full Resolution

Admin Dashboard - Payroll & Staff Account Overview

Payroll & HR Management

Employee payroll profile module with automated meal deduction calculations and instant payroll slip generation.

React / HR & Payroll
Admin Dashboard - Monthly Payroll Slips, Loans & Incentives
Inspect Full Resolution

Admin Dashboard - Monthly Payroll Slips, Loans & Incentives

Payroll & HR Management

Complete branch monthly payroll ledger featuring salary advances (loans), bonuses, penalties, and net compensation slips.

React / Multi-step Form
New Subscription Wizard - Step 1: Customer Information
Inspect Full Resolution

New Subscription Wizard - Step 1: Customer Information

Subscription Wizard & CRM

Step 1 of the subscription registration wizard capturing customer contact details, phone verification, and schedule start date.

React / Multi-step Form
New Subscription Wizard - Step 2: Package Selection Dropdown
Inspect Full Resolution

New Subscription Wizard - Step 2: Package Selection Dropdown

Subscription Wizard & Plans

Plan selection step displaying standard meal subscription tiers alongside the fully custom plan option.

React / Interactive Plan Builder
New Subscription Wizard - Custom Plan Builder & Meal Quantities
Inspect Full Resolution

New Subscription Wizard - Custom Plan Builder & Meal Quantities

Subscription Wizard & Customizer

Interactive custom meal builder enabling users/agents to adjust meal quotas by protein type and select subscription duration.

React / Multi-step Form
New Subscription Wizard - Fixed Package Duration & Meal Count
Inspect Full Resolution

New Subscription Wizard - Fixed Package Duration & Meal Count

Subscription Wizard & Plans

Fixed plan configuration step to choose daily meal frequencies and subscription duration with automated macro/price recalculation.

React / Dynamic Pricing Engine
New Subscription Wizard - Add-ons & Dynamic Price Calculation
Inspect Full Resolution

New Subscription Wizard - Add-ons & Dynamic Price Calculation

Subscription Wizard & Pricing

Meal add-on selector (healthy burgers, sandwiches) with dynamic price calculation engine and authorized price override.

React / Canvas Signature / Contract Engine
New Subscription Wizard - Step 3: Branch, Payment & E-Signature
Inspect Full Resolution

New Subscription Wizard - Step 3: Branch, Payment & E-Signature

Subscription Wizard & Contract Signing

Final step of subscription wizard capturing branch fulfillment, payment method, policy acceptance, and digital canvas signature.

QuestPDF / C# .NET / Automated PDF Generation
QuestPDF Subscription Contract - Plan Specs & Macro Box
Inspect Full Resolution

QuestPDF Subscription Contract - Plan Specs & Macro Box

PDF Documents & Printables (QuestPDF)

Officially generated QuestPDF contract detailing customer subscription specifics, QR code tracking, and standard meal nutritional macros.

QuestPDF / ZATCA QR / POS Thermal Printing
Thermal POS Simplified Tax Invoice with ZATCA QR Code
Inspect Full Resolution

Thermal POS Simplified Tax Invoice with ZATCA QR Code

POS Invoicing & ZATCA Compliance

80mm thermal POS receipt layout generating ZATCA-compliant Base64 TLV QR codes for simplified tax invoices.

QuestPDF / C# .NET / Vector PDF
Full QuestPDF Subscription Contract with Embedded E-Signature
Inspect Full Resolution

Full QuestPDF Subscription Contract with Embedded E-Signature

PDF Documents & Legal Contracts

Complete legal contract document generated via QuestPDF embedding live customer e-signature, terms of suspension, and ZATCA compliance.

React / WhatsApp API Integration
Subscription Quick Actions - Extend Days, Adjust Balance & WhatsApp
Inspect Full Resolution

Subscription Quick Actions - Extend Days, Adjust Balance & WhatsApp

Subscription Management & Actions

Quick management console for extending subscription duration, manually modifying remaining meal balances, and sending WhatsApp invoices.

React / Audit Logging / Soft Delete
Customer Deletion & Soft-Delete Reason Audit Modal
Inspect Full Resolution

Customer Deletion & Soft-Delete Reason Audit Modal

Customer Management & Audit

Safe soft-deletion confirmation dialog requiring a detailed justification for audit trails and manager oversight.

React / Autocomplete Search / POS
POS Daily Meal Pickup - Real-time Customer Search
Inspect Full Resolution

POS Daily Meal Pickup - Real-time Customer Search

POS Daily Pickup & Operations

Counter POS lookup interface with fast phone number autocomplete for processing daily meal pickups and checking active status.

React / Data Table / CSV Export
Admin Dashboard - Meal Pickup History & Audit Log
Inspect Full Resolution

Admin Dashboard - Meal Pickup History & Audit Log

Operations & Audit Logging

Detailed audit log recording every meal handed over across branches with timestamps, meal types, and CSV export capabilities.

React / CRM / WhatsApp Automation
Customer Retention CRM - Automated Milestone Follow-ups
Inspect Full Resolution

Customer Retention CRM - Automated Milestone Follow-ups

CRM & Retention Automation

Retention CRM system prompting staff to contact subscribers at key journey milestones (Day 3 check-in, renewal reminders) via WhatsApp.

React / CRUD Table / Master Data
Admin Dashboard - Meal Items & Recipe Catalog
Inspect Full Resolution

Admin Dashboard - Meal Items & Recipe Catalog

Catalog & Master Data

Master data table for configuring meal items, individual pricing, food categories, and meal building blocks.

React / CRUD Table / Plan Management
Admin Dashboard - Subscription Packages Catalog
Inspect Full Resolution

Admin Dashboard - Subscription Packages Catalog

Plans & Catalog Management

Central package management catalog for creating and updating subscription tiers, meal rules, and plan pricing.

React / Audit Logging / Security
Admin Dashboard - System Audit Trail & Activity Log
Inspect Full Resolution

Admin Dashboard - System Audit Trail & Activity Log

Security & Audit Trails

Immutable audit trail logging all staff actions (subscription creation, deletions, balance overrides, soft deletes) for accountability.

Architectural Lessons Learned
"If rebuilt, I would integrate directly with InBody smart scales via Webhooks to adjust subscriber meal plans automatically based on weekly biometric scans."

— Mahmoud Talaat, Founder & Lead Systems Architect