# sukanth-original/what-did-you-get-done architecture

> Architecture diagram of the GitHub repository sukanth-original/what-did-you-get-done, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sukanth-original/what-did-you-get-done
- Repository: https://github.com/sukanth-original/what-did-you-get-done

## Overview

##### Project type and purpose
- This is a full-stack, multi-component personal assistant for smart glasses.
- Purpose: capture voice prompts every 15 minutes (or on demand), forward them to an LLM backend, maintain conversational memory, distill memories into structured nodes, and extract reminders.

##### File structure
Top-level:
- index.ts             → real-time UI/server for smart glasses (Node + Bun)
- package.json, bun.lock → JS dependency management
- tsconfig.json        → TypeScript configuration
- memory/              → Python micro-services and storage
– llm.py             → FastAPI LLM server
– distill.py         → memory distillation engine
– reminder.py        → reminder extraction utility
– processed_files/   → session tracking persistence
– summaries/, reminders/ → per-user JSONL and text files

##### README for additional insights
- Four main components are described (UI, LLM, distiller, reminder).
- Core flows: user speaks → index.ts → llm.py → response → display → background jobs (distill, reminder).
- External dependency: Google Gemini model.
- Storage: per-user JSONL files and simple text files.

##### Final advice
- How user session state flows through processed_files.
- Keep it readable: group related services and separate real-time vs. background.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client
    Client["Smart Glasses Client"]:::external

    %% Real-time Gateway
    index["index.ts Gateway API\n(15min cron, inactivity timers)"]:::realtime

    %% Project Configuration
    subgraph "Project Config"
        pkg["package.json"]:::config
        ts["tsconfig.json"]:::config
        lock["bun.lock"]:::config
    end

    %% Memory Services
    subgraph "Memory Services"
        llm["llm.py Service\n(FastAPI)"]:::realtime
        distill["distill.py\n(Memory Distiller)"]:::batch
        reminder["reminder.py\n(Reminder Extractor)"]:::batch
    end

    %% Storage
    processed["Processed Files\n(user_id_processed.txt)"]:::storage
    summaries["Conversation Summaries\n(user_id.jsonl)"]:::storage
    remindersStore["Reminders Storage\n(open_reminders.txt)"]:::storage

    %% External LLM
    ExternalLLM["Google Gemini API"]:::external

    %% Connections: Real-time flow
    Client -->|"hotword → onTranscription"| index
    index -->|"POST /prompt"| llm
    llm -->|"call LLM API"| ExternalLLM
    ExternalLLM -->|"response"| llm
    llm -->|"HTTP response"| index
    index -->|"render text"| Client

    %% Persistent storage flow
    llm -->|"append JSONL"| summaries
    llm -->|"append processed files"| processed

    %% Background batch jobs
    distill -->|"read new JSONL"| summaries
    distill -->|"write distilled nodes"| processed
    reminder -->|"read memory nodes"| processed
    reminder -->|"write reminders"| remindersStore

    %% LLM uses reminders in prompt context
    llm -->|"include reminders"| remindersStore

    %% Click Events
    click index "https://github.com/sukanth-original/what-did-you-get-done/blob/master/index.ts"
    click pkg "https://github.com/sukanth-original/what-did-you-get-done/blob/master/package.json"
    click ts "https://github.com/sukanth-original/what-did-you-get-done/blob/master/tsconfig.json"
    click lock "https://github.com/sukanth-original/what-did-you-get-done/blob/master/bun.lock"
    click llm "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/llm.py"
    click distill "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/distill.py"
    click reminder "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/reminder.py"
    click processed "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/processed_files/user_id_processed.txt"
    click summaries "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/summaries/user_id.jsonl"
    click remindersStore "https://github.com/sukanth-original/what-did-you-get-done/blob/master/memory/reminders/user_id/open_reminders.txt"
    click __pycache__ "https://github.com/sukanth-original/what-did-you-get-done/tree/master/memory/__pycache__/"

    %% Styles
    classDef realtime fill:#D0E8FF,stroke:#0366d6,color:#000
    classDef batch fill:#E0FFD0,stroke:#228B22,color:#000
    classDef storage fill:#FFE0B2,stroke:#FF8C00,color:#000,stroke-dasharray: 5 5
    classDef config fill:#F0F0F0,stroke:#666,color:#000
    classDef external fill:#F3E5F5,stroke:#800080,color:#000,stroke-width:2px
```
