User Manual: Functional and Technical System Document

Document Version: 1.6 (UML / Mermaid Syntax Fix)

Objective: Comprehensively and highly-detailedly outline the functional requirements, non-functional requirements, business rules, calculation memories, and flows of the How2Burn ecosystem (iOS, WatchOS, Widgets, and Intelligence Engines), using native UML modeling (via flow, class, state, and sequence diagrams).

1. System Overview (Macro Features)

How2Burn is a cognitive weight-loss engine that orchestrates energy balance, metabolic quality, and behavioral aspects across multiple touchpoints.

  1. Dynamic Dashboard: Real-time view of Deficit, Macros, Health Indices (Fat Loss Score), Biological Alerts, and Temporal Groupings.
  2. Log (Multimodal Logger): Insertion via Text, Vision (Gemini), NLP (Llama), TACO (Food Database), User History, and Mass Logs.
  3. Dr. Chama (AI Coach): The virtual persona that crosses data to provide prescriptive insights.
  4. Journeys: Customized parameterization of time frames to align caloric theory with actual weight.
  5. Apple Ecosystem (Watch & Widgets): Quick mirroring of metabolism on iPhone home screens and Apple Watch.
  6. Settings & Profile: Endocrine predictive engine adjustments and permissions.

2. Non-Functional Requirements (NFRs)

3. Macro Feature 1: Dynamic Dashboard

(Visual Ref: Screens/1.6.4/Painel/Painel_01.png to Painel_19.png)

3.1. Grouping by Date Ranges (> 1 Day)

When selecting a wide period (e.g., 7 days):

3.2. Critical Substances Analysis (Sugar and Cholesterol)

3.3. Use Cases (UML Flowchart) and Calculation Memory

flowchart LR Actor([User]) --> UC1(Change Date Range >1) UC1 -.->|include| UC2(View Bar Aggregation) Actor --> UC3(Check Daily Burn Index) Actor --> UC4(View Offenders in Modal)

4. Macro Feature 2: Dr. Chama (Intelligence & Coaching)

4.1. Overview and Flow

Dr. Chama acts as the app's metabolic tutor with active health context.

  1. The user summons Dr. Chama in the app.
  2. The system injects the biological context into the Prompt (E.g., "HRV 30ms, poor sleep, high deficit").
  3. Dr. Chama returns a prescriptive feedback: "Your HRV dropped. Focus on hydration and avoid a high deficit today to protect lean mass."

5. Macro Feature 3: Logger and Search Engines

(Visual Ref: Screens/1.6.4/Registrar/Registrar_01.png to Registrar_09.png)

5.1. Fallbacks and AI Architecture

  1. Local History: Ultra-fast cache search. (Ref: Registrar_05.png)
  2. TACO Database: Audited National Food Table (Unicamp).
  3. Llama AI: Scours global portals (USDA, FatSecret) and returns formatted JSON.
  4. Gemini: Extraction by Photo or Audio. (Ref: Registrar_04.png)

5.2. Expanded Range Logs Screen (> 1 Day)

5.3. Activity Diagram (Search and Mass Logging)

stateDiagram-v2 [*] --> LogScreen LogScreen --> Range1Day : Range = Today LogScreen --> LongRange : Range > 1 Day LongRange --> ShowTop5 LongRange --> MassLogging MassLogging --> PropagateRange PropagateRange --> [*] Range1Day --> LocalSearch LocalSearch --> TACOSearch : Not found TACOSearch --> LlamaAI : Not found LlamaAI --> ReturnMacros ReturnMacros --> SaveLog SaveLog --> [*]

6. Macro Feature 4: Ecosystem Extensions (Watch & Widgets)

6.1. iOS Widgets (Home Screen and Lock Screen)

6.2. Apple Watch App (WatchOS)

7. Macro Feature 5: Journeys and Preventive Health

(Visual Ref: Screens/1.6.4/Jornadas/Jornadas_01.png to Jornadas_04.png)

7.1. Journey Creation Flow

The user defines a long-term interval (e.g., 90-day Project). (Ref: Jornadas_02.png)

classDiagram class User { +String uuid +List~CustomFood~ customFoods } class Journey { +UUID id +Date startDate +Date endDate +Double startWeight +Double goalWeight +getTheoreticalWeightLoss() +getActualWeightLoss() } class DailyAggregate { +Date date +Double tdee +Double ingestedCalories +Double vfcScore +Double weighIn } User "1" *-- "many" Journey Journey "1" *-- "many" DailyAggregate

8. Settings and Onboarding (Endocrine Conditions)

(Visual Ref: Screens/1.6.4/Onboarding/Onboarding_01.png to Onboarding_10.png and Screens/1.6.4/Configuracoes/Configuracoes_01.png to Configuracoes_16.png)

8.1. Metabolic Adaptation

sequenceDiagram participant U as User participant APP as Onboarding participant ENG as Predictive Engine U->>APP: Fills Basic Data APP->>U: Asks Hormonal History (PCOS/Thyroid) U->>APP: Answers "PCOS" APP->>U: Asks about Long Diets U->>APP: Confirms Goals APP->>ENG: Sends Biometric Data Note over ENG: BMR based on Mifflin.
15% reducer applied due to PCOS. ENG-->>APP: Returns Adjusted BMR (Lower) APP->>U: Finishes Setup

9. Glossary of Terms


Have any questions?

Contact the developer directly.