# sampozo/deep-focus architecture

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

- Interactive diagram: https://gitdiagram.com/sampozo/deep-focus
- Repository: https://github.com/sampozo/deep-focus

## Overview

DeepFocus is a zero-backend mobile deep-work timer. The user runs a session of three 90-minute work blocks and two breaks; transition audio and haptics signal changes, while wake lock keeps the screen on during the session. The README identifies HTML/CSS/vanilla JS and Capacitor, but the app’s implementation in index.html was not excerpted, so the internal split and runtime calls cannot be verified. The graph preserves the documented capabilities and marks only documented relationships; MainActivity is a Capacitor bridge entry point.

Main entry points: [`index.html`](https://github.com/sampozo/deep-focus/blob/main/index.html) (DeepFocus app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_session["Session experience"]
  node_app["DeepFocus app<br/>[index.html]"]
  node_timer["Work-break timer<br/>[index.html]"]
  node_transitions["Session transitions<br/>[index.html]"]
  node_responsive["Responsive design<br/>[index.html]"]
end

subgraph group_signals["Session signals"]
  node_audio["Transition audio<br/>[index.html]"]
  node_haptics["Haptic alarms<br/>[index.html]"]
  node_wake["Wake lock<br/>[index.html]"]
end

subgraph group_mobile["Mobile shell"]
  node_capacitor["Capacitor bridge<br/>[MainActivity.java]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"runs"| node_timer
node_timer -->|"alternates blocks"| node_transitions
node_app -->|"presents"| node_responsive
node_transitions -->|"plays tones"| node_audio
node_transitions -->|"signals alarms"| node_haptics
node_timer -->|"keeps screen awake"| node_wake

click node_app "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_timer "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_transitions "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_responsive "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_audio "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_haptics "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_wake "https://github.com/sampozo/deep-focus/blob/main/index.html"
click node_capacitor "https://github.com/sampozo/deep-focus/blob/main/android/app/src/main/java/com/sping/deepfocus/MainActivity.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_app,node_timer,node_transitions,node_responsive,node_user toneBlue
class node_audio,node_haptics,node_wake toneAmber
class node_capacitor toneMint
```

## Components

### Session experience

- [DeepFocus app](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`
- [Work-break timer](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`
- [Session transitions](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`
- [Responsive design](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`

### Session signals

- [Transition audio](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`
- [Haptic alarms](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`
- [Wake lock](https://github.com/sampozo/deep-focus/blob/main/index.html): `index.html`

### Mobile shell

- [Capacitor bridge](https://github.com/sampozo/deep-focus/blob/main/android/app/src/main/java/com/sping/deepfocus/MainActivity.java): `android/app/src/main/java/com/sping/deepfocus/MainActivity.java`

### Other components

- **User**

## Connections

- User → DeepFocus app: uses (evidence: `README.md`)
- DeepFocus app → Work-break timer: runs (evidence: `README.md`)
- Work-break timer → Session transitions: alternates blocks (evidence: `README.md`)
- DeepFocus app → Responsive design: presents (evidence: `README.md`)
- Session transitions → Transition audio: plays tones (evidence: `README.md`)
- Session transitions → Haptic alarms: signals alarms (evidence: `README.md`)
- Work-break timer → Wake lock: keeps screen awake (evidence: `README.md`)
