# sidarkincal/vitacoreai architecture

> Architecture diagram of the GitHub repository sidarkincal/vitacoreai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sidarkincal/vitacoreai
- Repository: https://github.com/sidarkincal/vitacoreai

## Overview

1. **Repository shape**
   - This repo is a very small, front-end-only MVP with two independent HTML entry points: `index.html` for marketing/landing and `app.html` for the interactive demo.
   - There is no backend, build pipeline, or source tree beyond these static pages.

2. **Top-level architecture**
   - The product is split into two user experiences:
     - a **public landing site** that explains the concept and captures leads
     - a **single-page interactive cockpit demo** that simulates the health platform
   - Both are delivered as static assets and depend on browser-side JavaScript plus CDN-hosted libraries.

3. **`index.html`: marketing and acquisition surface**
   - This page is the narrative and conversion layer: hero section, personas, feature cards, user journey, and “smart system rules.”
   - It also includes a **contact form** that sends submissions through **Formspree**, making it the only explicit external data handoff in the repo.
   - It supports scroll animations, a mobile menu, and a persisted **day/night theme toggle** stored in `localStorage`.

4. **`app.html`: interactive MVP cockpit**
   - This is the core product simulation, built as a **React 18 single-page app** rendered in the browser.
   - It uses **Babel Standalone** for in-browser JSX transformation and **Tailwind CSS** for styling, all loaded from CDNs.
   - The page is state-driven: modules react to user input and update shared UI state without a server round trip.

5. **Runtime and library boundaries**
   - The interactive demo runs entirely in the client using **React UMD** bundles; `window.react = window.React` is an intentional compatibility shim for `lucide-react`.
   - Icons come from **lucide / lucide-react**, and typography uses **Inter**.
   - Because everything is CDN-backed, the app assumes network access unless served locally.

6. **Consent and access control boundary**
   - The first meaningful boundary in `app.html` is the **legal consent wall**.
   - The cockpit remains blurred/locked until the disclaimer is accepted, so the app has an explicit “gated access” state before the health modules become available.

7. **User profile and health-state inputs**
   - The demo collects basic profile data such as **height, weight, and age**, then computes **BMI** live in the UI.
   - These inputs feed the rest of the dashboard state and act as the baseline for the simulated health cockpit.

8. **Behavioral tracking modules**
   - Several modules update a shared “streak”/progress concept:
     - **Water tracking** increments via `+250ml` actions and awards streak points when the target is met.
     - **Medication checklist** marks adherence and visually strengthens the streak flame.
     - **Pain map** captures a 1–10 pain rating on a body silhouette.
   - These modules are independent inputs, but they converge into the same health-status feedback loop.

9. **Rules-based coach logic**
   - The **exercise coach** is not generative AI; it is a **prescription player** that executes the user’s uploaded `RECETE` sequence in order.
   - It uses per-move duration/reps, set rest, move rest, sequence rail, voice guidance, and a completion card.
   - The pain map can influence this module: **lower back pain ≥ 7** triggers a caution state in the workout coach.

10. **Document and analytics pipeline**
   - The **AI document reader** simulates drag-and-drop ingestion, a scan animation, and sample lab-result output.
   - The **analytics** section aggregates trends such as weight, medication adherence, and pain, then surfaces an AI-style weekly summary report.
   - In the current MVP, these are presentation-side simulations rather than real OCR or ML services.

11. **Voice and accessibility features**
   - The roadmap and feature set indicate a **Web Speech API voice coach** (`speechSynthesis`, TR-TR) that delivers spoken guidance inside the browser.
   - This is a client-side capability, not an external service, and it reinforces the “coach” role of the interactive module.

12. **Persistence and state scope**
   - The only persistence explicitly mentioned is **theme preference in `localStorage`** on the landing page.
   - Most of the interactive demo state appears ephemeral and session-bound, which keeps the architecture simple and fully client-rendered.

13. **External integrations and future boundaries**
   - Current external touchpoints are limited to:
     - **CDN libraries** for React/Tailwind/icons
     - **Formspree** for lead capture
   - Planned but not yet implemented boundaries include OCR, user accounts, real data persistence, camera/pose estimation, and file upload parsing.

14. **Diagramming takeaway**
   - An accurate architecture diagram should show **two static browser applications**:
     - `index.html` as the public marketing/contact surface
     - `app.html` as the interactive client-side simulation
   - Both run entirely in the browser, with only light external dependencies and no server-side application tier in this repository.

Main entry points: [`app.html`](https://github.com/sidarkincal/vitacoreai/blob/main/app.html) (Cockpit app), [`index.html`](https://github.com/sidarkincal/vitacoreai/blob/main/index.html) (Landing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_index["Landing page<br/>static HTML<br/>[index.html]"]
  node_landing_content["Story sections<br/>marketing content"]
  node_contact_form["Contact form<br/>lead capture"]
  node_theme_toggle(("Theme toggle<br/>ui preference"))
end

subgraph group_demo["Interactive demo"]
  node_app["Cockpit app<br/>static SPA<br/>[app.html]"]
  node_consent_wall["Consent wall<br/>access gate"]
  node_profile_bmi["Profile & BMI<br/>health input"]
  node_health_state(("Health state<br/>shared state"))
  node_trackers["Behavior trackers<br/>adherence modules"]
  node_coach_logic["Exercise coach<br/>rules engine"]
  node_document_reader["Doc reader<br/>presentation pipeline"]
  node_analytics_report["Analytics report<br/>summary view"]
  node_voice_coach(("Voice coach<br/>speech synthesis"))
end

subgraph group_external["External services"]
  node_client_libs["CDN libs<br/>runtime deps"]
  node_formspree["Formspree<br/>external handoff"]
  node_local_storage[("Local storage<br/>browser persistence")]
end

node_index -->|"renders"| node_landing_content
node_index -->|"contains"| node_contact_form
node_index -->|"uses"| node_theme_toggle
node_theme_toggle -->|"persists"| node_local_storage
node_contact_form -->|"submits to"| node_formspree
node_app -->|"loads"| node_client_libs
node_app -->|"starts with"| node_consent_wall
node_consent_wall -->|"unlocks"| node_profile_bmi
node_profile_bmi -->|"updates"| node_health_state
node_trackers -->|"updates"| node_health_state
node_coach_logic -->|"reads"| node_health_state
node_document_reader -->|"adds"| node_health_state
node_analytics_report -->|"summarizes"| node_health_state
node_voice_coach -->|"guides"| node_coach_logic
node_app -->|"drives"| node_health_state
node_app -->|"enables"| node_voice_coach

click node_index "https://github.com/sidarkincal/vitacoreai/blob/main/index.html"
click node_app "https://github.com/sidarkincal/vitacoreai/blob/main/app.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_index,node_landing_content,node_contact_form,node_theme_toggle toneBlue
class node_app,node_consent_wall,node_profile_bmi,node_health_state,node_trackers,node_coach_logic,node_document_reader,node_analytics_report,node_voice_coach toneAmber
class node_client_libs,node_formspree,node_local_storage toneMint
```

## Components

### Public site

Marketing and lead-capture surface

- [Landing page](https://github.com/sidarkincal/vitacoreai/blob/main/index.html): static HTML · Public marketing entrypoint · `index.html`
- **Story sections**: marketing content · Hero, personas, features, journey, and rules
- **Contact form**: lead capture · Submits inquiry data to Formspree
- **Theme toggle**: ui preference · Day/night switch persisted in localStorage

### Interactive demo

Client-side cockpit simulation

- [Cockpit app](https://github.com/sidarkincal/vitacoreai/blob/main/app.html): static SPA · Interactive browser demo entrypoint · `app.html`
- **Consent wall**: access gate · Locks the cockpit until disclaimer acceptance
- **Profile & BMI**: health input · Collects height, weight, age, and computes BMI
- **Health state**: shared state · Session-scoped dashboard state for the cockpit
- **Behavior trackers**: adherence modules · Water, medication, and pain inputs feeding streak/progress
- **Exercise coach**: rules engine · Plays the uploaded RECETE sequence with rest and cautions
- **Doc reader**: presentation pipeline · Simulated drag-drop scan and lab-result output
- **Analytics report**: summary view · Trend aggregation and weekly AI-style summary
- **Voice coach**: speech synthesis · Browser speech guidance in TR-TR

### External services

CDNs and third-party handoffs

- **CDN libs**: runtime deps · React UMD, Babel Standalone, Tailwind, Lucide, Inter
- **Formspree**: external handoff · Receives landing page submissions
- **Local storage**: browser persistence · Stores landing page theme preference

## Connections

- Landing page → Story sections: renders · Displays the narrative landing sections
- Landing page → Contact form: contains · Provides lead capture on the public site
- Landing page → Theme toggle: uses · Allows day/night switching
- Theme toggle → Local storage: persists · Stores the selected theme in the browser
- Contact form → Formspree: submits to · Sends contact submissions externally
- Cockpit app → CDN libs: loads · Uses CDN-hosted client libraries
- Cockpit app → Consent wall: starts with · Requires disclaimer acceptance before use
- Consent wall → Profile & BMI: unlocks · Allows access to the main cockpit inputs
- Profile & BMI → Health state: updates · Seeds shared health state from user profile
- Behavior trackers → Health state: updates · Feeds streak and progress feedback
- Exercise coach → Health state: reads · Uses current state and pain level for cautions
- Doc reader → Health state: adds · Contributes simulated document findings
- Analytics report → Health state: summarizes · Aggregates trends into a weekly report
- Voice coach → Exercise coach: guides · Provides spoken workout guidance
- Cockpit app → Health state: drives · Renders the session-bound cockpit from shared state
- Cockpit app → Voice coach: enables · Binds browser speech support into the demo
