# lenseps/silica architecture

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

- Interactive diagram: https://gitdiagram.com/lenseps/silica
- Repository: https://github.com/lenseps/silica

## Overview

Silica is a work-in-progress desktop planner whose stated goal is a scalable timeline for tasks and events. The README describes creating, editing, removing, navigating, and scaling timeline entries, but the sampled UI is still the default Tauri/React greeting demo; those planning capabilities are not demonstrated as implemented. The Rust backend defines task/event request-response types and record models, plus a generic JSON-file CRUD store. The sampled sources do not show the schemas wired to commands or the UI. Edges below reflect visible imports and calls; unsampled wiring is omitted.

Main entry points: [`src-tauri/src/models/records/record.rs`](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/record.rs) (Shared record model), [`src-tauri/src/service/crud.rs`](https://github.com/lenseps/silica/blob/master/src-tauri/src/service/crud.rs) (Generic CRUD store), [`src-tauri/src/models/records/task.rs`](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/task.rs) (Task records), [`src-tauri/src/models/records/event.rs`](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/event.rs) (Event records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Desktop frontend"]
  node_app["React app<br/>[App.tsx]"]
end

subgraph group_runtime["Tauri runtime"]
  node_tauri["Tauri host<br/>[lib.rs]"]
  node_commands["Command modules<br/>[task.rs]"]
end

subgraph group_domain["Planning domain"]
  node_task_api["Task API types<br/>[tasks.rs]"]
  node_event_api["Event API types<br/>[events.rs]"]
  node_style_api["Style API types<br/>[styles.rs]"]
  node_tag_api["Tag API types<br/>[tags.rs]"]
  node_task["Task records<br/>[task.rs]"]
  node_event["Event records<br/>[event.rs]"]
  node_record["Shared record model<br/>[record.rs]"]
  node_style["Task styles<br/>[styles.rs]"]
  node_tag["Tags<br/>[tags.rs]"]
end

subgraph group_persistence["Persistence"]
  node_crud[("Generic CRUD store<br/>[crud.rs]")]
end

node_user(("Desktop user"))

node_user -->|"uses"| node_app
node_app -->|"invokes greet"| node_tauri
node_task_api -->|"serializes"| node_task
node_task_api -->|"uses ID"| node_record
node_event_api -->|"serializes"| node_event
node_event_api -->|"uses ID"| node_record
node_style_api -->|"uses model"| node_style
node_tag_api -->|"uses model"| node_tag
node_task -->|"embeds"| node_record
node_event -->|"embeds"| node_record
node_record -->|"references ID"| node_style
node_record -->|"references IDs"| node_tag
node_task -->|"implements persistence"| node_crud
node_event -->|"implements persistence"| node_crud
node_style -->|"implements persistence"| node_crud
node_tag -->|"implements persistence"| node_crud

click node_app "https://github.com/lenseps/silica/blob/master/src/App.tsx"
click node_tauri "https://github.com/lenseps/silica/blob/master/src-tauri/src/lib.rs"
click node_commands "https://github.com/lenseps/silica/blob/master/src-tauri/src/commands/task.rs"
click node_task_api "https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/tasks.rs"
click node_event_api "https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/events.rs"
click node_style_api "https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/styles.rs"
click node_tag_api "https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/tags.rs"
click node_task "https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/task.rs"
click node_event "https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/event.rs"
click node_record "https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/record.rs"
click node_style "https://github.com/lenseps/silica/blob/master/src-tauri/src/models/styles.rs"
click node_tag "https://github.com/lenseps/silica/blob/master/src-tauri/src/models/tags.rs"
click node_crud "https://github.com/lenseps/silica/blob/master/src-tauri/src/service/crud.rs"

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_user toneBlue
class node_tauri,node_commands toneAmber
class node_task_api,node_event_api,node_style_api,node_tag_api,node_task,node_event,node_record,node_style,node_tag toneMint
class node_crud toneRose
```

## Components

### Desktop frontend

- [React app](https://github.com/lenseps/silica/blob/master/src/App.tsx): `src/App.tsx`

### Tauri runtime

- [Tauri host](https://github.com/lenseps/silica/blob/master/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`
- [Command modules](https://github.com/lenseps/silica/blob/master/src-tauri/src/commands/task.rs): `src-tauri/src/commands/task.rs`

### Planning domain

- [Task API types](https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/tasks.rs): `src-tauri/src/schemas/api_v1/tasks.rs`
- [Event API types](https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/events.rs): `src-tauri/src/schemas/api_v1/events.rs`
- [Style API types](https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/styles.rs): `src-tauri/src/schemas/api_v1/styles.rs`
- [Tag API types](https://github.com/lenseps/silica/blob/master/src-tauri/src/schemas/api_v1/tags.rs): `src-tauri/src/schemas/api_v1/tags.rs`
- [Task records](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/task.rs): `src-tauri/src/models/records/task.rs`
- [Event records](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/event.rs): `src-tauri/src/models/records/event.rs`
- [Shared record model](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/records/record.rs): `src-tauri/src/models/records/record.rs`
- [Task styles](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/styles.rs): `src-tauri/src/models/styles.rs`
- [Tags](https://github.com/lenseps/silica/blob/master/src-tauri/src/models/tags.rs): `src-tauri/src/models/tags.rs`

### Persistence

- [Generic CRUD store](https://github.com/lenseps/silica/blob/master/src-tauri/src/service/crud.rs): `src-tauri/src/service/crud.rs`

### Other components

- **Desktop user**

## Connections

- Desktop user → React app: uses (evidence: `src/App.tsx`)
- React app → Tauri host: invokes greet (evidence: `src/App.tsx`)
- Task API types → Task records: serializes (evidence: `src-tauri/src/schemas/api_v1/tasks.rs`)
- Task API types → Shared record model: uses ID (evidence: `src-tauri/src/schemas/api_v1/tasks.rs`)
- Event API types → Event records: serializes (evidence: `src-tauri/src/schemas/api_v1/events.rs`)
- Event API types → Shared record model: uses ID (evidence: `src-tauri/src/schemas/api_v1/events.rs`)
- Style API types → Task styles: uses model (evidence: `src-tauri/src/schemas/api_v1/styles.rs`)
- Tag API types → Tags: uses model (evidence: `src-tauri/src/schemas/api_v1/tags.rs`)
- Task records → Shared record model: embeds (evidence: `src-tauri/src/models/records/task.rs`)
- Event records → Shared record model: embeds (evidence: `src-tauri/src/models/records/event.rs`)
- Shared record model → Task styles: references ID (evidence: `src-tauri/src/models/records/record.rs`)
- Shared record model → Tags: references IDs (evidence: `src-tauri/src/models/records/record.rs`)
- Task records → Generic CRUD store: implements persistence (evidence: `src-tauri/src/models/records/task.rs`)
- Event records → Generic CRUD store: implements persistence (evidence: `src-tauri/src/models/records/event.rs`)
- Task styles → Generic CRUD store: implements persistence (evidence: `src-tauri/src/models/styles.rs`)
- Tags → Generic CRUD store: implements persistence (evidence: `src-tauri/src/models/tags.rs`)
