# marvelous616/you architecture

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

- Interactive diagram: https://gitdiagram.com/marvelous616/you
- Repository: https://github.com/marvelous616/you

## Overview

Life Logger is a self-hosted, offline-first personal timeline and journaling app. The main web workflow runs from day capture and review through the API to domain rules and SQLite-backed repositories, then returns timeline data to the interface. Separate capabilities include search, calendar suggestions, configurable tags/people/templates, diagnostics, and synchronization. The README documents Android and sync capabilities, but Android source is absent from the supplied tree; server internals beyond the excerpts are represented only where README or indexed references support them.

Main entry points: [`apps/server/src/app.ts`](https://github.com/marvelous616/you/blob/main/apps/server/src/app.ts) (HTTP API), [`apps/web/src/pages/DayView.tsx`](https://github.com/marvelous616/you/blob/main/apps/web/src/pages/DayView.tsx) (Day workspace), [`apps/web/src/api.ts`](https://github.com/marvelous616/you/blob/main/apps/web/src/api.ts) (Web API client), [`apps/web/src/pages/Settings.tsx`](https://github.com/marvelous616/you/blob/main/apps/web/src/pages/Settings.tsx) (Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_dayview["Day workspace<br/>[DayView.tsx]"]
  node_timeline["Timeline view<br/>[Timeline.tsx]"]
  node_quick["Quick entry<br/>[QuickEntry.tsx]"]
  node_review["Day review<br/>[ReviewModal.tsx]"]
  node_searchbox["Search interface<br/>[SearchBox.tsx]"]
  node_suggestionsui["Suggestion inbox<br/>[SuggestionCard.tsx]"]
  node_settings["Settings<br/>[Settings.tsx]"]
  node_webapi["Web API client<br/>[api.ts]"]
end

subgraph group_service["API service"]
  node_fastify["HTTP API<br/>[app.ts]"]
end

subgraph group_domain["Domain logic"]
  node_domainrules["Domain rules<br/>[types.ts]"]
  node_quickparse["Quick-entry parsing<br/>[quick-entry.ts]"]
  node_timelinecalc["Timeline and gaps<br/>[timeline.ts]"]
  node_calendar["Calendar import<br/>[calendar.ts]"]
  node_suggestionrules["Suggestion lifecycle<br/>[suggestions.ts]"]
  node_people["People resolution<br/>[people.ts]"]
  node_tagrules["Tag resolution<br/>[tags.ts]"]
end

subgraph group_data["Persistence and sync"]
  node_interfaces["Repository contracts<br/>[interfaces.ts]"]
  node_sqlite[("SQLite repositories")]
  node_sync["Sync protocol and outbox<br/>[outbox.ts]"]
  node_searchrepo["Search repository"]
end

node_person(("User"))

node_person -->|"uses"| node_dayview
node_dayview -->|"renders"| node_timeline
node_dayview -->|"renders"| node_quick
node_dayview -->|"renders"| node_review
node_dayview -->|"renders"| node_searchbox
node_dayview -->|"renders"| node_suggestionsui
node_dayview -->|"requests data"| node_webapi
node_settings -->|"requests updates"| node_webapi
node_webapi -->|"HTTP requests"| node_fastify
node_fastify -->|"uses repositories"| node_interfaces
node_fastify -->|"applies rules"| node_domainrules
node_fastify -->|"resolves people"| node_people
node_fastify -->|"resolves tags"| node_tagrules
node_fastify -->|"persists records"| node_sqlite
node_interfaces -->|"implemented by"| node_sqlite
node_sqlite -->|"searches records"| node_searchrepo
node_webapi -.->|"search request"| node_searchrepo
node_quick -->|"parses capture"| node_quickparse
node_timeline -->|"displays timeline"| node_timelinecalc
node_review -->|"reviews gaps"| node_timelinecalc
node_fastify -->|"imports calendar"| node_calendar
node_calendar -->|"proposes items"| node_suggestionrules
node_fastify -->|"accepts suggestions"| node_suggestionrules
node_fastify -->|"handles sync"| node_sync
node_sync -->|"exchanges entities"| node_interfaces
node_settings -->|"manages people"| node_people
node_settings -->|"manages tags"| node_tagrules

click node_dayview "https://github.com/marvelous616/you/blob/main/apps/web/src/pages/DayView.tsx"
click node_timeline "https://github.com/marvelous616/you/blob/main/apps/web/src/components/Timeline.tsx"
click node_quick "https://github.com/marvelous616/you/blob/main/apps/web/src/components/QuickEntry.tsx"
click node_review "https://github.com/marvelous616/you/blob/main/apps/web/src/components/ReviewModal.tsx"
click node_searchbox "https://github.com/marvelous616/you/blob/main/apps/web/src/components/SearchBox.tsx"
click node_suggestionsui "https://github.com/marvelous616/you/blob/main/apps/web/src/components/SuggestionCard.tsx"
click node_settings "https://github.com/marvelous616/you/blob/main/apps/web/src/pages/Settings.tsx"
click node_webapi "https://github.com/marvelous616/you/blob/main/apps/web/src/api.ts"
click node_fastify "https://github.com/marvelous616/you/blob/main/apps/server/src/app.ts"
click node_domainrules "https://github.com/marvelous616/you/blob/main/packages/domain/src/types.ts"
click node_quickparse "https://github.com/marvelous616/you/blob/main/packages/domain/src/quick-entry.ts"
click node_timelinecalc "https://github.com/marvelous616/you/blob/main/packages/domain/src/timeline.ts"
click node_calendar "https://github.com/marvelous616/you/blob/main/packages/domain/src/calendar.ts"
click node_suggestionrules "https://github.com/marvelous616/you/blob/main/packages/domain/src/suggestions.ts"
click node_people "https://github.com/marvelous616/you/blob/main/packages/domain/src/people.ts"
click node_tagrules "https://github.com/marvelous616/you/blob/main/packages/domain/src/tags.ts"
click node_interfaces "https://github.com/marvelous616/you/blob/main/packages/persistence/src/interfaces.ts"
click node_sqlite "https://github.com/marvelous616/you/tree/main/packages/persistence/src/sqlite"
click node_sync "https://github.com/marvelous616/you/blob/main/packages/sync/src/outbox.ts"
click node_searchrepo "https://github.com/marvelous616/you/blob/main/packages/persistence/src/sqlite/search-repository.ts"

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_dayview,node_timeline,node_quick,node_review,node_searchbox,node_suggestionsui,node_settings,node_webapi,node_person toneBlue
class node_fastify toneAmber
class node_domainrules,node_quickparse,node_timelinecalc,node_calendar,node_suggestionrules,node_people,node_tagrules toneMint
class node_interfaces,node_sqlite,node_sync,node_searchrepo toneRose
```

## Components

### Web experience

- [Day workspace](https://github.com/marvelous616/you/blob/main/apps/web/src/pages/DayView.tsx): `apps/web/src/pages/DayView.tsx`
- [Timeline view](https://github.com/marvelous616/you/blob/main/apps/web/src/components/Timeline.tsx): `apps/web/src/components/Timeline.tsx`
- [Quick entry](https://github.com/marvelous616/you/blob/main/apps/web/src/components/QuickEntry.tsx): `apps/web/src/components/QuickEntry.tsx`
- [Day review](https://github.com/marvelous616/you/blob/main/apps/web/src/components/ReviewModal.tsx): `apps/web/src/components/ReviewModal.tsx`
- [Search interface](https://github.com/marvelous616/you/blob/main/apps/web/src/components/SearchBox.tsx): `apps/web/src/components/SearchBox.tsx`
- [Suggestion inbox](https://github.com/marvelous616/you/blob/main/apps/web/src/components/SuggestionCard.tsx): `apps/web/src/components/SuggestionCard.tsx`
- [Settings](https://github.com/marvelous616/you/blob/main/apps/web/src/pages/Settings.tsx): `apps/web/src/pages/Settings.tsx`
- [Web API client](https://github.com/marvelous616/you/blob/main/apps/web/src/api.ts): `apps/web/src/api.ts`

### API service

- [HTTP API](https://github.com/marvelous616/you/blob/main/apps/server/src/app.ts): `apps/server/src/app.ts`

### Domain logic

- [Domain rules](https://github.com/marvelous616/you/blob/main/packages/domain/src/types.ts): `packages/domain/src/types.ts`
- [Quick-entry parsing](https://github.com/marvelous616/you/blob/main/packages/domain/src/quick-entry.ts): `packages/domain/src/quick-entry.ts`
- [Timeline and gaps](https://github.com/marvelous616/you/blob/main/packages/domain/src/timeline.ts): `packages/domain/src/timeline.ts`
- [Calendar import](https://github.com/marvelous616/you/blob/main/packages/domain/src/calendar.ts): `packages/domain/src/calendar.ts`
- [Suggestion lifecycle](https://github.com/marvelous616/you/blob/main/packages/domain/src/suggestions.ts): `packages/domain/src/suggestions.ts`
- [People resolution](https://github.com/marvelous616/you/blob/main/packages/domain/src/people.ts): `packages/domain/src/people.ts`
- [Tag resolution](https://github.com/marvelous616/you/blob/main/packages/domain/src/tags.ts): `packages/domain/src/tags.ts`

### Persistence and sync

- [Repository contracts](https://github.com/marvelous616/you/blob/main/packages/persistence/src/interfaces.ts): `packages/persistence/src/interfaces.ts`
- [SQLite repositories](https://github.com/marvelous616/you/tree/main/packages/persistence/src/sqlite): `packages/persistence/src/sqlite`
- [Sync protocol and outbox](https://github.com/marvelous616/you/blob/main/packages/sync/src/outbox.ts): `packages/sync/src/outbox.ts`
- [Search repository](https://github.com/marvelous616/you/blob/main/packages/persistence/src/sqlite/search-repository.ts): `packages/persistence/src/sqlite/search-repository.ts`

### Other components

- **User**

## Connections

- User → Day workspace: uses (evidence: `README.md`)
- Day workspace → Timeline view: renders (evidence: `apps/web/src/pages/DayView.tsx`)
- Day workspace → Quick entry: renders (evidence: `apps/web/src/pages/DayView.tsx`)
- Day workspace → Day review: renders (evidence: `apps/web/src/pages/DayView.tsx`)
- Day workspace → Search interface: renders (evidence: `apps/web/src/pages/DayView.tsx`)
- Day workspace → Suggestion inbox: renders (evidence: `apps/web/src/pages/DayView.tsx`)
- Day workspace → Web API client: requests data (evidence: `apps/web/src/pages/DayView.tsx`)
- Settings → Web API client: requests updates (evidence: `apps/web/src/pages/Settings.tsx`)
- Web API client → HTTP API: HTTP requests (evidence: `apps/web/src/api.ts`)
- HTTP API → Repository contracts: uses repositories (evidence: `apps/server/src/app.ts`)
- HTTP API → Domain rules: applies rules (evidence: `apps/server/src/app.ts`)
- HTTP API → People resolution: resolves people (evidence: `apps/server/src/app.ts`)
- HTTP API → Tag resolution: resolves tags (evidence: `apps/server/src/app.ts`)
- HTTP API → SQLite repositories: persists records (evidence: `README.md`)
- Repository contracts → SQLite repositories: implemented by (evidence: `packages/persistence/src/sqlite/event-repository.ts`)
- SQLite repositories → Search repository: searches records (evidence: `packages/persistence/src/sqlite/search-repository.ts`)
- Web API client → Search repository: search request (evidence: `README.md`)
- Quick entry → Quick-entry parsing: parses capture (evidence: `README.md`)
- Timeline view → Timeline and gaps: displays timeline (evidence: `README.md`)
- Day review → Timeline and gaps: reviews gaps (evidence: `README.md`)
- HTTP API → Calendar import: imports calendar (evidence: `README.md`)
- Calendar import → Suggestion lifecycle: proposes items (evidence: `packages/domain/src/calendar.ts`)
- HTTP API → Suggestion lifecycle: accepts suggestions (evidence: `apps/server/src/app.ts`)
- HTTP API → Sync protocol and outbox: handles sync (evidence: `apps/server/src/app.ts`)
- Sync protocol and outbox → Repository contracts: exchanges entities (evidence: `README.md`)
- Settings → People resolution: manages people (evidence: `README.md`)
- Settings → Tag resolution: manages tags (evidence: `README.md`)
