# naveen64-64/life-audit-platform architecture

> Architecture diagram of the GitHub repository naveen64-64/life-audit-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/naveen64-64/life-audit-platform
- Repository: https://github.com/naveen64-64/life-audit-platform

## Overview

Life Audit Platform collects a six-step student questionnaire, computes time, energy, focus, and goal-alignment insights, and presents a visual report with positive habits, recommendations, and a daily action plan. The browser also includes a local-knowledge AuditBot. The README documents report retrieval and health checks; backend excerpts show audit processing but do not establish persistence, so no database is modeled. Some frontend and route behavior is represented from README or source-index references rather than full excerpts.

Main entry points: [`frontend/src/pages/ResultsPage.jsx`](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/ResultsPage.jsx) (Results dashboard), [`frontend/src/App.jsx`](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/App.jsx) (SPA routing), [`backend/app/routes/audit.py`](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/audit.py) (Audit endpoints), [`frontend/src/pages/AuditPage.jsx`](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/AuditPage.jsx) (Six-step audit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_app["SPA routing<br/>[App.jsx]"]
  node_landing["Landing page<br/>[LandingPage.jsx]"]
  node_questionnaire["Six-step audit<br/>[AuditPage.jsx]"]
  node_assistant["Local AuditBot<br/>[AuditBot.jsx]"]
  node_about["About page<br/>[AboutPage.jsx]"]
end

subgraph group_api["API and contracts"]
  node_api_client["API client<br/>[api.js]"]
  node_server["FastAPI app<br/>[main.py]"]
  node_audit_route["Audit endpoints<br/>[audit.py]"]
  node_chat_route["Chat endpoint<br/>[chat.py]"]
  node_health_route["Health endpoint<br/>[health.py]"]
  node_audit_schema["Audit contracts<br/>[audit.py]"]
end

subgraph group_analysis["Audit analysis"]
  node_audit_engine["Scoring and leaks<br/>[audit_engine.py]"]
  node_recommendation_engine["Recommendations and plan"]
end

subgraph group_presentation["Report presentation"]
  node_results["Results dashboard<br/>[ResultsPage.jsx]"]
  node_scores["Score cards<br/>[ScoreCard.jsx]"]
  node_leaks["Leak insights"]
  node_habits["Positive habits"]
  node_recommendations["Recommendations view"]
  node_action_plan["Action plan view"]
  node_time_chart["Time distribution chart"]
  node_leak_chart["Leak breakdown chart<br/>[TimeLeaksChart.jsx]"]
  node_energy_chart["Energy chart<br/>[EnergyChart.jsx]"]
  node_focus_chart["Focus chart<br/>[FocusChart.jsx]"]
end

node_student(("Student"))

node_student -->|"opens"| node_app
node_app -->|"routes to"| node_landing
node_app -->|"routes to"| node_questionnaire
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_about
node_app -->|"renders"| node_assistant
node_student -->|"submits answers"| node_questionnaire
node_questionnaire -->|"submits audit"| node_api_client
node_api_client -->|"HTTP requests"| node_audit_route
node_server -->|"registers router"| node_audit_route
node_server -->|"registers router"| node_health_route
node_audit_route -->|"validates and returns"| node_audit_schema
node_audit_route -->|"processes submission"| node_audit_engine
node_audit_route -->|"generates outputs"| node_recommendation_engine
node_audit_engine -->|"uses models"| node_audit_schema
node_recommendation_engine -->|"uses models"| node_audit_schema
node_results -->|"loads report"| node_api_client
node_results -->|"renders"| node_scores
node_results -->|"renders"| node_leaks
node_results -->|"renders"| node_habits
node_results -->|"renders"| node_recommendations
node_results -->|"renders"| node_action_plan
node_results -->|"renders"| node_time_chart
node_results -->|"renders"| node_leak_chart
node_results -->|"renders"| node_energy_chart
node_results -->|"renders"| node_focus_chart

click node_app "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/App.jsx"
click node_landing "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/LandingPage.jsx"
click node_questionnaire "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/AuditPage.jsx"
click node_assistant "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/AuditBot.jsx"
click node_api_client "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/services/api.js"
click node_server "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/main.py"
click node_audit_route "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/audit.py"
click node_chat_route "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/chat.py"
click node_health_route "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/health.py"
click node_audit_schema "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/schemas/audit.py"
click node_audit_engine "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/services/audit_engine.py"
click node_recommendation_engine "https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/services/recommendation_engine.py"
click node_results "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/ResultsPage.jsx"
click node_scores "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/ScoreCard.jsx"
click node_leaks "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/TimeLeaksSection.jsx"
click node_habits "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/PositiveHabitsSection.jsx"
click node_recommendations "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/RecommendationsSection.jsx"
click node_action_plan "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/ActionPlanSection.jsx"
click node_time_chart "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/TimeDistributionChart.jsx"
click node_leak_chart "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/TimeLeaksChart.jsx"
click node_energy_chart "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/EnergyChart.jsx"
click node_focus_chart "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/FocusChart.jsx"
click node_about "https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/AboutPage.jsx"

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_app,node_landing,node_questionnaire,node_assistant,node_about toneBlue
class node_api_client,node_server,node_audit_route,node_chat_route,node_health_route,node_audit_schema toneAmber
class node_audit_engine,node_recommendation_engine toneMint
class node_results,node_scores,node_leaks,node_habits,node_recommendations,node_action_plan,node_time_chart,node_leak_chart,node_energy_chart,node_focus_chart toneRose
class node_student toneIndigo
```

## Components

### Web experience

- [SPA routing](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Landing page](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/LandingPage.jsx): `frontend/src/pages/LandingPage.jsx`
- [Six-step audit](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/AuditPage.jsx): `frontend/src/pages/AuditPage.jsx`
- [Local AuditBot](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/AuditBot.jsx): `frontend/src/components/AuditBot.jsx`
- [About page](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/AboutPage.jsx): `frontend/src/pages/AboutPage.jsx`

### API and contracts

- [API client](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`
- [FastAPI app](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/main.py): `backend/app/main.py`
- [Audit endpoints](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/audit.py): `backend/app/routes/audit.py`
- [Chat endpoint](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/chat.py): `backend/app/routes/chat.py`
- [Health endpoint](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/routes/health.py): `backend/app/routes/health.py`
- [Audit contracts](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/schemas/audit.py): `backend/app/schemas/audit.py`

### Audit analysis

- [Scoring and leaks](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/services/audit_engine.py): `backend/app/services/audit_engine.py`
- [Recommendations and plan](https://github.com/naveen64-64/life-audit-platform/blob/main/backend/app/services/recommendation_engine.py): `backend/app/services/recommendation_engine.py`

### Report presentation

- [Results dashboard](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/pages/ResultsPage.jsx): `frontend/src/pages/ResultsPage.jsx`
- [Score cards](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/ScoreCard.jsx): `frontend/src/components/ScoreCard.jsx`
- [Leak insights](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/TimeLeaksSection.jsx): `frontend/src/components/TimeLeaksSection.jsx`
- [Positive habits](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/PositiveHabitsSection.jsx): `frontend/src/components/PositiveHabitsSection.jsx`
- [Recommendations view](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/RecommendationsSection.jsx): `frontend/src/components/RecommendationsSection.jsx`
- [Action plan view](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/ActionPlanSection.jsx): `frontend/src/components/ActionPlanSection.jsx`
- [Time distribution chart](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/TimeDistributionChart.jsx): `frontend/src/components/Charts/TimeDistributionChart.jsx`
- [Leak breakdown chart](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/TimeLeaksChart.jsx): `frontend/src/components/Charts/TimeLeaksChart.jsx`
- [Energy chart](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/EnergyChart.jsx): `frontend/src/components/Charts/EnergyChart.jsx`
- [Focus chart](https://github.com/naveen64-64/life-audit-platform/blob/main/frontend/src/components/Charts/FocusChart.jsx): `frontend/src/components/Charts/FocusChart.jsx`

### Other components

- **Student**

## Connections

- Student → SPA routing: opens
- SPA routing → Landing page: routes to (evidence: `frontend/src/App.jsx`)
- SPA routing → Six-step audit: routes to (evidence: `frontend/src/App.jsx`)
- SPA routing → Results dashboard: routes to (evidence: `frontend/src/App.jsx`)
- SPA routing → About page: routes to (evidence: `frontend/src/App.jsx`)
- SPA routing → Local AuditBot: renders (evidence: `frontend/src/App.jsx`)
- Student → Six-step audit: submits answers (evidence: `README.md`)
- Six-step audit → API client: submits audit (evidence: `frontend/src/pages/AuditPage.jsx`)
- API client → Audit endpoints: HTTP requests (evidence: `frontend/src/services/api.js`)
- FastAPI app → Audit endpoints: registers router (evidence: `backend/app/main.py`)
- FastAPI app → Health endpoint: registers router (evidence: `backend/app/main.py`)
- Audit endpoints → Audit contracts: validates and returns (evidence: `backend/app/routes/audit.py`)
- Audit endpoints → Scoring and leaks: processes submission (evidence: `backend/app/routes/audit.py`)
- Audit endpoints → Recommendations and plan: generates outputs (evidence: `backend/app/routes/audit.py`)
- Scoring and leaks → Audit contracts: uses models (evidence: `backend/app/services/audit_engine.py`)
- Recommendations and plan → Audit contracts: uses models (evidence: `backend/app/services/recommendation_engine.py`)
- Results dashboard → API client: loads report (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Score cards: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Leak insights: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Positive habits: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Recommendations view: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Action plan view: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Time distribution chart: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Leak breakdown chart: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Energy chart: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
- Results dashboard → Focus chart: renders (evidence: `frontend/src/pages/ResultsPage.jsx`)
