# sreenathkallada/spoofhub-time-logger architecture

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

- Interactive diagram: https://gitdiagram.com/sreenathkallada/spoofhub-time-logger
- Repository: https://github.com/sreenathkallada/spoofhub-time-logger

## Overview

ProofHub Time Logger is a browser-based client for logging time and managing tasks through a user’s ProofHub API key. The main workflow is sign-in and identity verification, load tasks and time data, compose edits in persisted drafts or the week grid, then save changes through a queued API client. The graph also retains task creation and editing, task assignment and workflow stages, settings, and description handling. Relationships are limited to those supported by README statements or the supplied source index and excerpts; unsampled implementations are represented only where the tree and documentation establish them.

Main entry points: [`src/hooks/useApi.js`](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/useApi.js) (API binding), [`src/components/MainScreen.jsx`](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/MainScreen.jsx) (Main screen), [`src/store/drafts.js`](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/store/drafts.js) (Draft state), [`src/components/TaskExpanded.jsx`](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskExpanded.jsx) (Task entries)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_screens["Screens and task work"]
  node_app["App shell<br/>[App.jsx]"]
  node_setup["Sign-in setup<br/>[SetupScreen.jsx]"]
  node_main["Main screen<br/>[MainScreen.jsx]"]
  node_tasklist["Task list<br/>[TaskList.jsx]"]
  node_taskrow["Task actions<br/>[TaskRow.jsx]"]
  node_expanded["Task entries<br/>[TaskExpanded.jsx]"]
  node_week["Week grid<br/>[WeekView.jsx]"]
  node_entryrow["Entry editor<br/>[EntryRow.jsx]"]
  node_existingentry["Existing entry<br/>[ExistingEntry.jsx]"]
  node_taskform["Task editor<br/>[TaskFormModal.jsx]"]
  node_newtask["Task creation<br/>[NewTaskModal.jsx]"]
end

subgraph group_drafts["Drafts and preferences"]
  node_settings[("Settings state<br/>[settings.js]")]
  node_draftstore[("Draft state<br/>[drafts.js]")]
  node_saveall["Save all engine<br/>[useSaveAll.js]"]
  node_html["Description HTML<br/>[html.js]"]
end

subgraph group_data["Queries and API"]
  node_queries["Data queries<br/>[queries.js]"]
  node_useapi["API binding<br/>[useApi.js]"]
  node_endpoints["API endpoints<br/>[endpoints.js]"]
  node_client["Request client<br/>[client.js]"]
  node_queue["Request queue<br/>[queue.js]"]
  node_errors["Error handling<br/>[errors.js]"]
end

node_user(("User"))
node_proofhub{{"ProofHub API"}}

node_user -->|"opens"| node_app
node_app -->|"shows signed-out"| node_setup
node_app -->|"shows signed-in"| node_main
node_user -->|"enters credentials"| node_setup
node_setup -->|"stores session"| node_settings
node_setup -->|"verifies identity"| node_endpoints
node_main -->|"loads data"| node_queries
node_main -->|"renders tasks"| node_tasklist
node_main -->|"renders grid"| node_week
node_main -->|"starts saving"| node_saveall
node_tasklist -->|"renders rows"| node_taskrow
node_taskrow -->|"opens entries"| node_expanded
node_expanded -->|"renders new entries"| node_entryrow
node_expanded -->|"renders saved entries"| node_existingentry
node_week -->|"edits entries"| node_entryrow
node_week -->|"edits saved entries"| node_existingentry
node_taskrow -->|"stages task changes"| node_draftstore
node_expanded -->|"stages entry changes"| node_draftstore
node_week -->|"stages grid edits"| node_draftstore
node_saveall -->|"reads and updates"| node_draftstore
node_saveall -->|"sends queued changes"| node_useapi
node_taskform -->|"saves task edits"| node_useapi
node_newtask -->|"creates tasks"| node_useapi
node_taskform -->|"handles descriptions"| node_html
node_queries -->|"fetches through"| node_useapi
node_useapi -->|"reads credentials"| node_settings
node_useapi -->|"binds API methods"| node_endpoints
node_endpoints -->|"makes requests"| node_client
node_client -->|"enqueues requests"| node_queue
node_client -->|"normalizes errors"| node_errors
node_client -->|"calls API"| node_proofhub
node_settings -->|"persists preferences"| node_user
node_draftstore -->|"persists drafts"| node_user

click node_app "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/App.jsx"
click node_setup "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/SetupScreen.jsx"
click node_main "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/MainScreen.jsx"
click node_tasklist "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskList.jsx"
click node_taskrow "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskRow.jsx"
click node_expanded "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskExpanded.jsx"
click node_week "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/WeekView.jsx"
click node_entryrow "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/EntryRow.jsx"
click node_existingentry "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/ExistingEntry.jsx"
click node_taskform "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskFormModal.jsx"
click node_newtask "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/NewTaskModal.jsx"
click node_settings "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/store/settings.js"
click node_draftstore "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/store/drafts.js"
click node_saveall "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/useSaveAll.js"
click node_queries "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/queries.js"
click node_useapi "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/useApi.js"
click node_endpoints "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/endpoints.js"
click node_client "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/client.js"
click node_queue "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/queue.js"
click node_errors "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/errors.js"
click node_html "https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/utils/html.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_app,node_setup,node_main,node_tasklist,node_taskrow,node_expanded,node_week,node_entryrow,node_existingentry,node_taskform,node_newtask,node_user toneBlue
class node_settings,node_draftstore,node_saveall,node_html toneAmber
class node_queries,node_useapi,node_endpoints,node_client,node_queue,node_errors,node_proofhub toneMint
```

## Components

### Screens and task work

- [App shell](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in setup](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/SetupScreen.jsx): `src/components/SetupScreen.jsx`
- [Main screen](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/MainScreen.jsx): `src/components/MainScreen.jsx`
- [Task list](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskList.jsx): `src/components/TaskList.jsx`
- [Task actions](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskRow.jsx): `src/components/TaskRow.jsx`
- [Task entries](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskExpanded.jsx): `src/components/TaskExpanded.jsx`
- [Week grid](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/WeekView.jsx): `src/components/WeekView.jsx`
- [Entry editor](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/EntryRow.jsx): `src/components/EntryRow.jsx`
- [Existing entry](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/ExistingEntry.jsx): `src/components/ExistingEntry.jsx`
- [Task editor](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/TaskFormModal.jsx): `src/components/TaskFormModal.jsx`
- [Task creation](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/components/NewTaskModal.jsx): `src/components/NewTaskModal.jsx`

### Drafts and preferences

- [Settings state](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/store/settings.js): `src/store/settings.js`
- [Draft state](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/store/drafts.js): `src/store/drafts.js`
- [Save all engine](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/useSaveAll.js): `src/hooks/useSaveAll.js`
- [Description HTML](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/utils/html.js): `src/utils/html.js`

### Queries and API

- [Data queries](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/queries.js): `src/hooks/queries.js`
- [API binding](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/hooks/useApi.js): `src/hooks/useApi.js`
- [API endpoints](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/endpoints.js): `src/api/endpoints.js`
- [Request client](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/client.js): `src/api/client.js`
- [Request queue](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/queue.js): `src/api/queue.js`
- [Error handling](https://github.com/sreenathkallada/spoofhub-time-logger/blob/main/src/api/errors.js): `src/api/errors.js`

### Other components

- **User**
- **ProofHub API**

## Connections

- User → App shell: opens (evidence: `README.md`)
- App shell → Sign-in setup: shows signed-out (evidence: `src/App.jsx`)
- App shell → Main screen: shows signed-in (evidence: `src/App.jsx`)
- User → Sign-in setup: enters credentials (evidence: `README.md`)
- Sign-in setup → Settings state: stores session (evidence: `src/components/SetupScreen.jsx`)
- Sign-in setup → API endpoints: verifies identity (evidence: `src/components/SetupScreen.jsx`)
- Main screen → Data queries: loads data (evidence: `src/components/MainScreen.jsx`)
- Main screen → Task list: renders tasks (evidence: `src/components/MainScreen.jsx`)
- Main screen → Week grid: renders grid (evidence: `src/components/MainScreen.jsx`)
- Main screen → Save all engine: starts saving (evidence: `src/components/MainScreen.jsx`)
- Task list → Task actions: renders rows (evidence: `src/components/TaskList.jsx`)
- Task actions → Task entries: opens entries (evidence: `src/components/TaskRow.jsx`)
- Task entries → Entry editor: renders new entries (evidence: `src/components/TaskExpanded.jsx`)
- Task entries → Existing entry: renders saved entries (evidence: `src/components/TaskExpanded.jsx`)
- Week grid → Entry editor: edits entries (evidence: `src/components/WeekView.jsx`)
- Week grid → Existing entry: edits saved entries (evidence: `src/components/WeekView.jsx`)
- Task actions → Draft state: stages task changes (evidence: `src/components/TaskRow.jsx`)
- Task entries → Draft state: stages entry changes (evidence: `src/components/TaskExpanded.jsx`)
- Week grid → Draft state: stages grid edits (evidence: `src/components/WeekView.jsx`)
- Save all engine → Draft state: reads and updates (evidence: `src/hooks/useSaveAll.js`)
- Save all engine → API binding: sends queued changes (evidence: `src/hooks/useSaveAll.js`)
- Task editor → API binding: saves task edits (evidence: `src/components/TaskFormModal.jsx`)
- Task creation → API binding: creates tasks (evidence: `src/components/NewTaskModal.jsx`)
- Task editor → Description HTML: handles descriptions (evidence: `src/components/TaskFormModal.jsx`)
- Data queries → API binding: fetches through (evidence: `src/hooks/queries.js`)
- API binding → Settings state: reads credentials (evidence: `src/hooks/useApi.js`)
- API binding → API endpoints: binds API methods (evidence: `src/hooks/useApi.js`)
- API endpoints → Request client: makes requests (evidence: `src/api/endpoints.js`)
- Request client → Request queue: enqueues requests (evidence: `src/api/client.js`)
- Request client → Error handling: normalizes errors (evidence: `src/api/client.js`)
- Request client → ProofHub API: calls API (evidence: `README.md`)
- Settings state → User: persists preferences (evidence: `README.md`)
- Draft state → User: persists drafts (evidence: `README.md`)
