# deepanshi-code/orbit architecture

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

- Interactive diagram: https://gitdiagram.com/deepanshi-code/orbit
- Repository: https://github.com/deepanshi-code/orbit

## Overview

Orbit is a browser-only study timer, stopwatch, and task manager. The main workflow is: a user runs a clock, selects a focused task, and elapsed study time is recorded in daily stats and the task’s progress; deadline checks can then alert the user. The interface, clocks, planning, profiles, and alerts are documented as parts of the single application script, while the page markup and themes live in separate files. Relationships below follow README statements; the supplied source excerpt is partial, so internal call details are not inferred.

Main entry points: [`script.js`](https://github.com/deepanshi-code/orbit/blob/main/script.js) (Task Planning), [`index.html`](https://github.com/deepanshi-code/orbit/blob/main/index.html) (Page Layout), [`style.css`](https://github.com/deepanshi-code/orbit/blob/main/style.css) (Themes and Views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Interface"]
  node_layout["Page Layout<br/>[index.html]"]
  node_app["App Interactions<br/>[script.js]"]
  node_themes["Themes and Views<br/>[style.css]"]
end

subgraph group_clocks["Clocks"]
  node_timer["Countdown Timer<br/>[script.js]"]
  node_stopwatch["Stopwatch<br/>[script.js]"]
  node_session["Session Accounting<br/>[script.js]"]
  node_feedback["Clock Feedback<br/>[script.js]"]
end

subgraph group_planning["Task Planning"]
  node_tasks["Task Planning<br/>[script.js]"]
  node_summary["Daily Summary<br/>[script.js]"]
end

subgraph group_profiles["Profiles and Alerts"]
  node_profiles["Local Profiles<br/>[script.js]"]
  node_alerts["Deadline Alerts<br/>[script.js]"]
  node_storage[("Browser Storage")]
end

node_user(("User"))
node_webcrypto["WebCrypto"]
node_notifications["Desktop Notifications"]
node_audio["Web Audio"]

node_user -->|"uses"| node_layout
node_layout -->|"receives actions"| node_app
node_app -->|"switches views"| node_themes
node_user -->|"starts"| node_timer
node_user -->|"starts"| node_stopwatch
node_timer -->|"records elapsed time"| node_session
node_stopwatch -->|"records elapsed time"| node_session
node_session -->|"updates focus minutes"| node_summary
node_session -->|"adds focused time"| node_tasks
node_user -->|"plans tasks"| node_tasks
node_tasks -->|"feeds"| node_summary
node_user -->|"creates profile"| node_profiles
node_profiles -->|"hashes passwords"| node_webcrypto
node_profiles -->|"stores profiles"| node_storage
node_tasks -->|"stores tasks and stats"| node_storage
node_alerts -->|"checks saved tasks"| node_storage
node_tasks -->|"checks deadlines"| node_alerts
node_alerts -.->|"sends alerts"| node_notifications
node_timer -->|"finishes session"| node_feedback
node_feedback -->|"plays beep"| node_audio
node_timer -.->|"notifies completion"| node_notifications

click node_layout "https://github.com/deepanshi-code/orbit/blob/main/index.html"
click node_app "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_themes "https://github.com/deepanshi-code/orbit/blob/main/style.css"
click node_timer "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_stopwatch "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_session "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_feedback "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_tasks "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_summary "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_profiles "https://github.com/deepanshi-code/orbit/blob/main/script.js"
click node_alerts "https://github.com/deepanshi-code/orbit/blob/main/script.js"

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_layout,node_app,node_themes,node_user toneBlue
class node_timer,node_stopwatch,node_session,node_feedback toneAmber
class node_tasks,node_summary toneMint
class node_profiles,node_alerts,node_storage toneRose
class node_webcrypto,node_notifications,node_audio toneIndigo
```

## Components

### Interface

- [Page Layout](https://github.com/deepanshi-code/orbit/blob/main/index.html): `index.html`
- [App Interactions](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Themes and Views](https://github.com/deepanshi-code/orbit/blob/main/style.css): `style.css`

### Clocks

- [Countdown Timer](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Stopwatch](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Session Accounting](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Clock Feedback](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`

### Task Planning

- [Task Planning](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Daily Summary](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`

### Profiles and Alerts

- [Local Profiles](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- [Deadline Alerts](https://github.com/deepanshi-code/orbit/blob/main/script.js): `script.js`
- **Browser Storage**

### Other components

- **User**
- **WebCrypto**
- **Desktop Notifications**
- **Web Audio**

## Connections

- User → Page Layout: uses (evidence: `README.md`)
- Page Layout → App Interactions: receives actions (evidence: `README.md`)
- App Interactions → Themes and Views: switches views (evidence: `README.md`)
- User → Countdown Timer: starts (evidence: `README.md`)
- User → Stopwatch: starts (evidence: `README.md`)
- Countdown Timer → Session Accounting: records elapsed time (evidence: `README.md`)
- Stopwatch → Session Accounting: records elapsed time (evidence: `README.md`)
- Session Accounting → Daily Summary: updates focus minutes (evidence: `README.md`)
- Session Accounting → Task Planning: adds focused time (evidence: `README.md`)
- User → Task Planning: plans tasks (evidence: `README.md`)
- Task Planning → Daily Summary: feeds (evidence: `README.md`)
- User → Local Profiles: creates profile (evidence: `README.md`)
- Local Profiles → WebCrypto: hashes passwords (evidence: `README.md`)
- Local Profiles → Browser Storage: stores profiles (evidence: `README.md`)
- Task Planning → Browser Storage: stores tasks and stats (evidence: `README.md`)
- Deadline Alerts → Browser Storage: checks saved tasks (evidence: `README.md`)
- Task Planning → Deadline Alerts: checks deadlines (evidence: `README.md`)
- Deadline Alerts → Desktop Notifications: sends alerts (evidence: `README.md`)
- Countdown Timer → Clock Feedback: finishes session (evidence: `README.md`)
- Clock Feedback → Web Audio: plays beep (evidence: `README.md`)
- Countdown Timer → Desktop Notifications: notifies completion (evidence: `README.md`)
