# yadnyesh2906/lifeos architecture

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

- Interactive diagram: https://gitdiagram.com/yadnyesh2906/lifeos
- Repository: https://github.com/yadnyesh2906/lifeos

## Overview

LifeOS is a productivity app with a React Native frontend and a Spring backend. The visible task flow runs from the task screen through a hook to task services; sampled habit and authentication services persist data in platform storage. The backend exposes goal and reminder APIs, with the goal controller explicitly delegating to its service. The README calls the product AI-powered, but the supplied tree and excerpts do not show an AI subsystem. Backend implementation links and most frontend domain flows were not sampled, so those connections are omitted.

Main entry points: [`frontend/context/AuthContext.tsx`](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/context/AuthContext.tsx) (Auth Context), [`backend/src/main/java/com/lifeos/backend/serviceimpl`](https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/serviceimpl) (Domain Services), [`frontend/utils/storage.ts`](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/utils/storage.ts) (Platform Storage), [`frontend/app/(tabs)/tasks.tsx`](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(tabs)/tasks.tsx) (Task Screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile App"]
  node_task_screen["Task Screen<br/>[tasks.tsx]"]
  node_habit_screen["Habit Screen<br/>[habits.tsx]"]
  node_auth_ui["Auth Screens<br/>[login.tsx]"]
  node_auth_context["Auth Context<br/>[AuthContext.tsx]"]
  node_other_client_domains["Other App Features"]
end

subgraph group_client_data["Client Data"]
  node_task_hook["Task Hook<br/>[useTask.ts]"]
  node_habit_hook["Habit Hook<br/>[useHabit.ts]"]
  node_task_service["Task Service<br/>[taskService.ts]"]
  node_habit_service["Habit Service<br/>[habitService.ts]"]
  node_auth_service["Auth Service<br/>[authService.ts]"]
  node_secure_storage[("Platform Storage<br/>[storage.ts]")]
end

subgraph group_backend_api["Backend API"]
  node_goal_controller["Goal API"]
  node_reminder_controller["Reminder API"]
end

subgraph group_backend_core["Backend Core"]
  node_goal_service["Goal Service<br/>[GoalService.java]"]
  node_reminder_service["Reminder Service"]
  node_backend_domains["Domain Services"]
  node_backend_repositories[("Data Repositories")]
  node_backend_entities["Domain Entities"]
end

node_user(("App User"))

node_user -->|"uses"| node_task_screen
node_task_screen -->|"calls"| node_task_hook
node_task_hook -->|"uses"| node_task_service
node_user -.->|"uses"| node_habit_screen
node_habit_screen -.->|"uses"| node_habit_hook
node_habit_hook -->|"uses"| node_habit_service
node_habit_service -->|"reads and writes"| node_secure_storage
node_auth_ui -.->|"uses"| node_auth_context
node_auth_context -->|"calls"| node_auth_service
node_auth_context -->|"reads and writes"| node_secure_storage
node_auth_service -->|"reads and writes"| node_secure_storage
node_user -.->|"requests"| node_goal_controller
node_goal_controller -->|"delegates to"| node_goal_service
node_user -.->|"requests"| node_reminder_controller
node_goal_service -.->|"implemented in"| node_backend_domains
node_reminder_service -.->|"implemented in"| node_backend_domains
node_backend_domains -.->|"uses"| node_backend_repositories
node_backend_repositories -.->|"persists"| node_backend_entities

click node_task_screen "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(tabs)/tasks.tsx"
click node_habit_screen "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(tabs)/habits.tsx"
click node_auth_ui "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(auth)/login.tsx"
click node_auth_context "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/context/AuthContext.tsx"
click node_task_hook "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/hooks/useTask.ts"
click node_habit_hook "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/hooks/useHabit.ts"
click node_task_service "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/taskService.ts"
click node_habit_service "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/habitService.ts"
click node_auth_service "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/authService.ts"
click node_secure_storage "https://github.com/yadnyesh2906/lifeos/blob/main/frontend/utils/storage.ts"
click node_other_client_domains "https://github.com/yadnyesh2906/lifeos/tree/main/frontend/app/(tabs)"
click node_goal_controller "https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/controller/GoalController.java"
click node_reminder_controller "https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/controller/ReminderController.java"
click node_goal_service "https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/service/GoalService.java"
click node_reminder_service "https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/service/ReminderService.java"
click node_backend_domains "https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/serviceimpl"
click node_backend_repositories "https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/repository"
click node_backend_entities "https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/entity"

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_task_screen,node_habit_screen,node_auth_ui,node_auth_context,node_other_client_domains,node_user toneBlue
class node_task_hook,node_habit_hook,node_task_service,node_habit_service,node_auth_service,node_secure_storage toneAmber
class node_goal_controller,node_reminder_controller toneMint
class node_goal_service,node_reminder_service,node_backend_domains,node_backend_repositories,node_backend_entities toneRose
```

## Components

### Mobile App

- [Task Screen](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(tabs)/tasks.tsx): `frontend/app/(tabs)/tasks.tsx`
- [Habit Screen](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(tabs)/habits.tsx): `frontend/app/(tabs)/habits.tsx`
- [Auth Screens](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/app/(auth)/login.tsx): `frontend/app/(auth)/login.tsx`
- [Auth Context](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/context/AuthContext.tsx): `frontend/context/AuthContext.tsx`
- [Other App Features](https://github.com/yadnyesh2906/lifeos/tree/main/frontend/app/(tabs)): `frontend/app/(tabs)`

### Client Data

- [Task Hook](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/hooks/useTask.ts): `frontend/hooks/useTask.ts`
- [Habit Hook](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/hooks/useHabit.ts): `frontend/hooks/useHabit.ts`
- [Task Service](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/taskService.ts): `frontend/services/taskService.ts`
- [Habit Service](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/habitService.ts): `frontend/services/habitService.ts`
- [Auth Service](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/services/authService.ts): `frontend/services/authService.ts`
- [Platform Storage](https://github.com/yadnyesh2906/lifeos/blob/main/frontend/utils/storage.ts): `frontend/utils/storage.ts`

### Backend API

- [Goal API](https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/controller/GoalController.java): `backend/src/main/java/com/lifeos/backend/controller/GoalController.java`
- [Reminder API](https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/controller/ReminderController.java): `backend/src/main/java/com/lifeos/backend/controller/ReminderController.java`

### Backend Core

- [Goal Service](https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/service/GoalService.java): `backend/src/main/java/com/lifeos/backend/service/GoalService.java`
- [Reminder Service](https://github.com/yadnyesh2906/lifeos/blob/main/backend/src/main/java/com/lifeos/backend/service/ReminderService.java): `backend/src/main/java/com/lifeos/backend/service/ReminderService.java`
- [Domain Services](https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/serviceimpl): `backend/src/main/java/com/lifeos/backend/serviceimpl`
- [Data Repositories](https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/repository): `backend/src/main/java/com/lifeos/backend/repository`
- [Domain Entities](https://github.com/yadnyesh2906/lifeos/tree/main/backend/src/main/java/com/lifeos/backend/entity): `backend/src/main/java/com/lifeos/backend/entity`

### Other components

- **App User**

## Connections

- App User → Task Screen: uses (evidence: `frontend/app/(tabs)/tasks.tsx`)
- Task Screen → Task Hook: calls (evidence: `frontend/app/(tabs)/tasks.tsx`)
- Task Hook → Task Service: uses (evidence: `frontend/hooks/useTask.ts`)
- App User → Habit Screen: uses
- Habit Screen → Habit Hook: uses
- Habit Hook → Habit Service: uses (evidence: `frontend/hooks/useHabit.ts`)
- Habit Service → Platform Storage: reads and writes (evidence: `frontend/services/habitService.ts`)
- Auth Screens → Auth Context: uses
- Auth Context → Auth Service: calls (evidence: `frontend/context/AuthContext.tsx`)
- Auth Context → Platform Storage: reads and writes (evidence: `frontend/context/AuthContext.tsx`)
- Auth Service → Platform Storage: reads and writes (evidence: `frontend/services/authService.ts`)
- App User → Goal API: requests
- Goal API → Goal Service: delegates to (evidence: `backend/src/main/java/com/lifeos/backend/controller/GoalController.java`)
- App User → Reminder API: requests
- Goal Service → Domain Services: implemented in
- Reminder Service → Domain Services: implemented in
- Domain Services → Data Repositories: uses
- Data Repositories → Domain Entities: persists
