# vadlamanoj/life-rpg architecture

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

- Interactive diagram: https://gitdiagram.com/vadlamanoj/life-rpg
- Repository: https://github.com/vadlamanoj/life-rpg

## Overview

LIFE RPG is a web app and Android companion that turns user goals into adaptive, game-like campaigns. The principal journey is goal entry and interpretation, campaign/quest progression, real-world action with evidence, evaluation, and rewards or adjusted difficulty; milestones and boss battles mark campaign progress. The README also documents player progression, social, analytics, journal, and integration capabilities. The sampled engines clarify goal parsing, evidence checks, grading, adaptation, and integrations; unsampled API wiring is represented only at the application boundary.

Main entry points: [`backend/app/main.py`](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py) (Backend API), [`frontend/src/main.jsx`](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx) (Web interface), [`backend/app/goal_engine.py`](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py) (Goal understanding), [`backend/app/quiz_engine.py`](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/quiz_engine.py) (Quizzes and boss tests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Player experience"]
  node_web["Web interface<br/>[main.jsx]"]
  node_api["Backend API<br/>[main.py]"]
  node_account["Accounts and settings<br/>[main.py]"]
  node_playerstate[("Player state<br/>[main.py]")]
end

subgraph group_campaign["Campaign creation"]
  node_goalinput["Goal understanding<br/>[goal_engine.py]"]
  node_nlp["Natural language parsing<br/>[nlp_engine.py]"]
  node_campaigns["Campaign and milestones<br/>[goal_engine.py]"]
  node_questplan["Quest planning<br/>[goal_engine.py]"]
end

subgraph group_progress["Quest and progression"]
  node_questboard["Quest experience<br/>[main.jsx]"]
  node_quiz["Quizzes and boss tests<br/>[quiz_engine.py]"]
  node_grading["Assessment grading"]
  node_evidence["Evidence review<br/>[evidence_engine.py]"]
  node_adapt["Adaptive progression<br/>[adaptive_engine.py]"]
  node_recommend["Quest recommendations"]
  node_rewards["Rewards and skills<br/>[main.py]"]
  node_insights["Analytics and journal<br/>[main.jsx]"]
  node_community["Community and achievements<br/>[main.jsx]"]
end

subgraph group_connections["External connections"]
  node_integrationui["Integration controls<br/>[main.jsx]"]
  node_integration["Provider sync"]
  node_health["Health Connect reader"]
  node_bridge["Android sync client"]
end

node_player(("Player"))
node_openai{{"OpenAI"}}
node_providers{{"External providers"}}

node_player -->|"uses"| node_web
node_web -->|"API requests"| node_api
node_api -->|"handles accounts"| node_account
node_account -->|"reads and writes"| node_playerstate
node_api -->|"interprets goals"| node_goalinput
node_api -->|"parses input"| node_nlp
node_api -->|"creates campaigns"| node_campaigns
node_api -->|"plans quests"| node_questplan
node_web -->|"presents quests"| node_questboard
node_api -->|"provides assessments"| node_quiz
node_api -->|"grades answers"| node_grading
node_api -->|"reviews submissions"| node_evidence
node_api -->|"adjusts progression"| node_adapt
node_api -->|"builds guidance"| node_recommend
node_api -->|"updates progression"| node_rewards
node_web -->|"presents insights"| node_insights
node_web -->|"presents features"| node_community
node_web -->|"manages connections"| node_integrationui
node_api -->|"handles sync"| node_integration
node_integrationui -->|"sends requests"| node_api
node_health -->|"provides activity"| node_bridge
node_bridge -->|"posts activity"| node_api
node_integration -.->|"syncs data"| node_providers
node_api -.->|"optional AI"| node_openai
node_goalinput -.->|"optional inference"| node_openai
node_quiz -.->|"optional generation"| node_openai

click node_web "https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx"
click node_api "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py"
click node_account "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py"
click node_playerstate "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py"
click node_goalinput "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py"
click node_nlp "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/nlp_engine.py"
click node_campaigns "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py"
click node_questplan "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py"
click node_questboard "https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx"
click node_quiz "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/quiz_engine.py"
click node_grading "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/evaluation_engine.py"
click node_evidence "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/evidence_engine.py"
click node_adapt "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/adaptive_engine.py"
click node_recommend "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/recommendation_engine.py"
click node_rewards "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py"
click node_insights "https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx"
click node_community "https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx"
click node_integrationui "https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx"
click node_integration "https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/integrations_engine.py"
click node_health "https://github.com/vadlamanoj/life-rpg/blob/main/android-bridge/app/src/main/java/com/liferpg/bridge/HealthConnectManager.kt"
click node_bridge "https://github.com/vadlamanoj/life-rpg/blob/main/android-bridge/app/src/main/java/com/liferpg/bridge/BridgeSyncClient.kt"

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_web,node_api,node_account,node_playerstate toneBlue
class node_goalinput,node_nlp,node_campaigns,node_questplan toneAmber
class node_questboard,node_quiz,node_grading,node_evidence,node_adapt,node_recommend,node_rewards,node_insights,node_community toneMint
class node_integrationui,node_integration,node_health,node_bridge toneRose
class node_player,node_openai,node_providers toneIndigo
```

## Components

### Player experience

- [Web interface](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Backend API](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py): `backend/app/main.py`
- [Accounts and settings](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py): `backend/app/main.py`
- [Player state](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py): `backend/app/main.py`

### Campaign creation

- [Goal understanding](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py): `backend/app/goal_engine.py`
- [Natural language parsing](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/nlp_engine.py): `backend/app/nlp_engine.py`
- [Campaign and milestones](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py): `backend/app/goal_engine.py`
- [Quest planning](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/goal_engine.py): `backend/app/goal_engine.py`

### Quest and progression

- [Quest experience](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Quizzes and boss tests](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/quiz_engine.py): `backend/app/quiz_engine.py`
- [Assessment grading](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/evaluation_engine.py): `backend/app/evaluation_engine.py`
- [Evidence review](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/evidence_engine.py): `backend/app/evidence_engine.py`
- [Adaptive progression](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/adaptive_engine.py): `backend/app/adaptive_engine.py`
- [Quest recommendations](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/recommendation_engine.py): `backend/app/recommendation_engine.py`
- [Rewards and skills](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/main.py): `backend/app/main.py`
- [Analytics and journal](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Community and achievements](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`

### External connections

- [Integration controls](https://github.com/vadlamanoj/life-rpg/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Provider sync](https://github.com/vadlamanoj/life-rpg/blob/main/backend/app/integrations_engine.py): `backend/app/integrations_engine.py`
- [Health Connect reader](https://github.com/vadlamanoj/life-rpg/blob/main/android-bridge/app/src/main/java/com/liferpg/bridge/HealthConnectManager.kt): `android-bridge/app/src/main/java/com/liferpg/bridge/HealthConnectManager.kt`
- [Android sync client](https://github.com/vadlamanoj/life-rpg/blob/main/android-bridge/app/src/main/java/com/liferpg/bridge/BridgeSyncClient.kt): `android-bridge/app/src/main/java/com/liferpg/bridge/BridgeSyncClient.kt`

### Other components

- **Player**
- **OpenAI**
- **External providers**

## Connections

- Player → Web interface: uses
- Web interface → Backend API: API requests
- Backend API → Accounts and settings: handles accounts
- Accounts and settings → Player state: reads and writes
- Backend API → Goal understanding: interprets goals
- Backend API → Natural language parsing: parses input
- Backend API → Campaign and milestones: creates campaigns
- Backend API → Quest planning: plans quests
- Web interface → Quest experience: presents quests
- Backend API → Quizzes and boss tests: provides assessments
- Backend API → Assessment grading: grades answers
- Backend API → Evidence review: reviews submissions
- Backend API → Adaptive progression: adjusts progression
- Backend API → Quest recommendations: builds guidance
- Backend API → Rewards and skills: updates progression
- Web interface → Analytics and journal: presents insights
- Web interface → Community and achievements: presents features
- Web interface → Integration controls: manages connections
- Backend API → Provider sync: handles sync
- Integration controls → Backend API: sends requests
- Health Connect reader → Android sync client: provides activity
- Android sync client → Backend API: posts activity
- Provider sync → External providers: syncs data
- Backend API → OpenAI: optional AI
- Goal understanding → OpenAI: optional inference
- Quizzes and boss tests → OpenAI: optional generation
