# lingaiahdanda/lifeos-backend architecture

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

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

## Overview

LifeOS is a Spring REST backend for personal notes, tasks, reminders, events, goals, expenses, and interpreted captures. The main flow is an API request, domain validation and persistence, with capture confirmation creating selected domain records and reminder scheduling feeding notification delivery. Local account authentication and account-data deletion are separate concerns. The graph follows the supplied tree, README, and source index; links for unsampled implementations are limited to explicit source-index references or documented capabilities.

Main entry points: [`src/main/java/com/lifeos/capture/CaptureService.java`](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/CaptureService.java) (Capture workflow), [`src/main/java/com/lifeos/account/AccountService.java`](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/account/AccountService.java) (Account data), [`src/main/java/com/lifeos/reminder/ReminderService.java`](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/reminder/ReminderService.java) (Reminders), [`src/main/java/com/lifeos/note/NoteService.java`](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/note/NoteService.java) (Notes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Identity and accounts"]
  node_local_auth["Local authentication"]
  node_auth_controller["Auth endpoints"]
  node_account["Account data"]
  node_account_controller["Account endpoints"]
end

subgraph group_capture["Capture and interpretation"]
  node_capture_api["Capture endpoints"]
  node_capture_service["Capture workflow"]
  node_interpreter["Capture interpreter<br/>[Interpreter.java]"]
  node_transcription["Transcription endpoint"]
  node_ai_interpreter["AI interpretation"]
end

subgraph group_personal["Personal records"]
  node_notes["Notes<br/>[NoteService.java]"]
  node_tasks["Tasks<br/>[TaskService.java]"]
  node_expenses["Expenses"]
  node_goals["Goals<br/>[GoalService.java]"]
  node_events["Events<br/>[EventService.java]"]
end

subgraph group_notify["Reminders and delivery"]
  node_reminders["Reminders"]
  node_notification_service["Notification scheduling"]
  node_notification_worker["Notification worker"]
  node_push_gateway["Push gateway<br/>[PushGateway.java]"]
end

subgraph group_platform["API foundation"]
  node_api_config["API contracts and errors<br/>[ActionPayload.java]"]
end

node_user(("API client"))
node_expo{{"Expo push service"}}
node_postgres[("PostgreSQL")]

node_user -->|"authenticates"| node_auth_controller
node_auth_controller -->|"delegates to"| node_local_auth
node_user -->|"submits capture"| node_capture_api
node_capture_api -->|"delegates to"| node_capture_service
node_capture_service -->|"interprets text"| node_interpreter
node_user -->|"requests transcription"| node_transcription
node_interpreter -.->|"implemented optionally by"| node_ai_interpreter
node_capture_service -->|"creates selected actions"| node_notes
node_capture_service -->|"creates selected actions"| node_tasks
node_capture_service -->|"creates selected actions"| node_expenses
node_capture_service -->|"creates selected actions"| node_reminders
node_capture_service -->|"creates selected actions"| node_goals
node_capture_service -->|"creates selected actions"| node_events
node_user -->|"manages account"| node_account_controller
node_account_controller -->|"delegates to"| node_account
node_account -->|"deletes owner data"| node_capture_service
node_account -->|"deletes owner data"| node_notes
node_account -->|"deletes owner data"| node_tasks
node_account -->|"deletes owner data"| node_expenses
node_account -->|"deletes owner data"| node_reminders
node_account -->|"deletes owner data"| node_goals
node_account -->|"deletes owner data"| node_events
node_account -->|"deletes owner data"| node_notification_service
node_reminders -->|"schedules and cancels"| node_notification_service
node_notification_worker -->|"dispatches push"| node_push_gateway
node_push_gateway -.->|"sends notifications"| node_expo
node_api_config -->|"defines action payloads"| node_capture_service
node_notes -.->|"persists records"| node_postgres
node_tasks -.->|"persists records"| node_postgres
node_expenses -.->|"persists records"| node_postgres
node_goals -.->|"persists records"| node_postgres
node_events -.->|"persists records"| node_postgres
node_reminders -.->|"persists records"| node_postgres
node_local_auth -.->|"stores account sessions"| node_postgres

click node_local_auth "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/auth/LocalAuthService.java"
click node_auth_controller "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/auth/LocalAuthController.java"
click node_account "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/account/AccountService.java"
click node_account_controller "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/account/AccountController.java"
click node_capture_api "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/CaptureController.java"
click node_capture_service "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/CaptureService.java"
click node_interpreter "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/Interpreter.java"
click node_transcription "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/TranscriptionController.java"
click node_ai_interpreter "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/ai/OpenAiInterpreter.java"
click node_notes "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/note/NoteService.java"
click node_tasks "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/task/TaskService.java"
click node_expenses "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/expense/ExpenseService.java"
click node_goals "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/goal/GoalService.java"
click node_events "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/event/EventService.java"
click node_reminders "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/reminder/ReminderService.java"
click node_notification_service "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/NotificationService.java"
click node_notification_worker "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/NotificationWorker.java"
click node_push_gateway "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/PushGateway.java"
click node_api_config "https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/config/ActionPayload.java"

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_local_auth,node_auth_controller,node_account,node_account_controller,node_user toneBlue
class node_capture_api,node_capture_service,node_interpreter,node_transcription,node_ai_interpreter,node_postgres toneAmber
class node_notes,node_tasks,node_expenses,node_goals,node_events toneMint
class node_reminders,node_notification_service,node_notification_worker,node_push_gateway toneRose
class node_api_config,node_expo toneIndigo
```

## Components

### Identity and accounts

- [Local authentication](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/auth/LocalAuthService.java): `src/main/java/com/lifeos/auth/LocalAuthService.java`
- [Auth endpoints](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/auth/LocalAuthController.java): `src/main/java/com/lifeos/auth/LocalAuthController.java`
- [Account data](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/account/AccountService.java): `src/main/java/com/lifeos/account/AccountService.java`
- [Account endpoints](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/account/AccountController.java): `src/main/java/com/lifeos/account/AccountController.java`

### Capture and interpretation

- [Capture endpoints](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/CaptureController.java): `src/main/java/com/lifeos/capture/CaptureController.java`
- [Capture workflow](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/CaptureService.java): `src/main/java/com/lifeos/capture/CaptureService.java`
- [Capture interpreter](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/Interpreter.java): `src/main/java/com/lifeos/capture/Interpreter.java`
- [Transcription endpoint](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/TranscriptionController.java): `src/main/java/com/lifeos/capture/TranscriptionController.java`
- [AI interpretation](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/capture/ai/OpenAiInterpreter.java): `src/main/java/com/lifeos/capture/ai/OpenAiInterpreter.java`

### Personal records

- [Notes](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/note/NoteService.java): `src/main/java/com/lifeos/note/NoteService.java`
- [Tasks](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/task/TaskService.java): `src/main/java/com/lifeos/task/TaskService.java`
- [Expenses](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/expense/ExpenseService.java): `src/main/java/com/lifeos/expense/ExpenseService.java`
- [Goals](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/goal/GoalService.java): `src/main/java/com/lifeos/goal/GoalService.java`
- [Events](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/event/EventService.java): `src/main/java/com/lifeos/event/EventService.java`

### Reminders and delivery

- [Reminders](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/reminder/ReminderService.java): `src/main/java/com/lifeos/reminder/ReminderService.java`
- [Notification scheduling](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/NotificationService.java): `src/main/java/com/lifeos/notification/NotificationService.java`
- [Notification worker](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/NotificationWorker.java): `src/main/java/com/lifeos/notification/NotificationWorker.java`
- [Push gateway](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/notification/PushGateway.java): `src/main/java/com/lifeos/notification/PushGateway.java`

### API foundation

- [API contracts and errors](https://github.com/lingaiahdanda/lifeos-backend/blob/main/src/main/java/com/lifeos/config/ActionPayload.java): `src/main/java/com/lifeos/config/ActionPayload.java`

### Other components

- **API client**
- **Expo push service**
- **PostgreSQL**

## Connections

- API client → Auth endpoints: authenticates (evidence: `src/main/java/com/lifeos/auth/LocalAuthController.java`)
- Auth endpoints → Local authentication: delegates to (evidence: `src/main/java/com/lifeos/auth/LocalAuthController.java`)
- API client → Capture endpoints: submits capture (evidence: `src/main/java/com/lifeos/capture/CaptureController.java`)
- Capture endpoints → Capture workflow: delegates to (evidence: `src/main/java/com/lifeos/capture/CaptureController.java`)
- Capture workflow → Capture interpreter: interprets text (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- API client → Transcription endpoint: requests transcription (evidence: `src/main/java/com/lifeos/capture/TranscriptionController.java`)
- Capture interpreter → AI interpretation: implemented optionally by
- Capture workflow → Notes: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Capture workflow → Tasks: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Capture workflow → Expenses: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Capture workflow → Reminders: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Capture workflow → Goals: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Capture workflow → Events: creates selected actions (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- API client → Account endpoints: manages account (evidence: `src/main/java/com/lifeos/account/AccountController.java`)
- Account endpoints → Account data: delegates to (evidence: `src/main/java/com/lifeos/account/AccountController.java`)
- Account data → Capture workflow: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Notes: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Tasks: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Expenses: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Reminders: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Goals: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Events: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Account data → Notification scheduling: deletes owner data (evidence: `src/main/java/com/lifeos/account/AccountService.java`)
- Reminders → Notification scheduling: schedules and cancels (evidence: `src/main/java/com/lifeos/reminder/ReminderService.java`)
- Notification worker → Push gateway: dispatches push (evidence: `src/main/java/com/lifeos/notification/NotificationWorker.java`)
- Push gateway → Expo push service: sends notifications
- API contracts and errors → Capture workflow: defines action payloads (evidence: `src/main/java/com/lifeos/capture/CaptureService.java`)
- Notes → PostgreSQL: persists records
- Tasks → PostgreSQL: persists records
- Expenses → PostgreSQL: persists records
- Goals → PostgreSQL: persists records
- Events → PostgreSQL: persists records
- Reminders → PostgreSQL: persists records
- Local authentication → PostgreSQL: stores account sessions
