# yassine-jemi01/forgefm architecture

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

- Interactive diagram: https://gitdiagram.com/yassine-jemi01/forgefm
- Repository: https://github.com/yassine-jemi01/forgefm

## Overview

ForgeFM is a GTK4/GIO file-manager prototype. Its user workflow is to navigate or search a directory, inspect and select entries, then open or manage them using file operations. The implementation is concentrated in src/app.c; src/main.c owns GTK application startup and shutdown. The README documents several capabilities whose implementation details are outside the excerpts, so those are represented as responsibilities of the app rather than as inferred internal call chains.

Main entry points: [`src/main.c`](https://github.com/yassine-jemi01/forgefm/blob/main/src/main.c) (Lifecycle entry), [`src/app.c`](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c) (Open and terminal)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_lifecycle["Application lifecycle"]
  node_gtk["GTK application"]
  node_entry["Lifecycle entry<br/>[main.c]"]
  node_forge["Forge app<br/>[app.c]"]
end

subgraph group_browser["File browsing"]
  node_browser_ui["Browser interface<br/>[app.c]"]
  node_navigation["Directory navigation<br/>[app.c]"]
  node_listing["File listing<br/>[app.c]"]
  node_search["Directory search<br/>[app.c]"]
  node_selection["Multi-selection<br/>[app.c]"]
end

subgraph group_actions["File actions"]
  node_file_actions["File actions<br/>[app.c]"]
  node_clipboard["Copy and move<br/>[app.c]"]
  node_launch["Open and terminal<br/>[app.c]"]
  node_gio["GIO filesystem"]
end

node_user(("User"))
node_filesystem[("Local filesystem")]
node_desktop_apps["Desktop applications"]
node_terminal["Terminal launcher"]

node_user -->|"uses"| node_gtk
node_gtk -->|"activates"| node_entry
node_entry -->|"creates and activates"| node_forge
node_entry -->|"frees on shutdown"| node_forge
node_user -->|"interacts with"| node_browser_ui
node_browser_ui -->|"navigates"| node_navigation
node_navigation -->|"refreshes"| node_listing
node_user -->|"searches"| node_search
node_user -->|"selects"| node_selection
node_user -->|"requests actions"| node_file_actions
node_file_actions -->|"uses"| node_gio
node_clipboard -->|"copies or moves"| node_gio
node_gio -->|"reads and writes"| node_filesystem
node_launch -->|"opens files with"| node_desktop_apps
node_launch -->|"looks up launcher"| node_terminal

click node_entry "https://github.com/yassine-jemi01/forgefm/blob/main/src/main.c"
click node_forge "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_browser_ui "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_navigation "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_listing "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_search "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_selection "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_file_actions "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_clipboard "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"
click node_launch "https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c"

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_gtk,node_entry,node_forge,node_user toneBlue
class node_browser_ui,node_navigation,node_listing,node_search,node_selection,node_filesystem toneAmber
class node_file_actions,node_clipboard,node_launch,node_gio toneMint
class node_desktop_apps,node_terminal toneIndigo
```

## Components

### Application lifecycle

- **GTK application**
- [Lifecycle entry](https://github.com/yassine-jemi01/forgefm/blob/main/src/main.c): `src/main.c`
- [Forge app](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`

### File browsing

- [Browser interface](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [Directory navigation](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [File listing](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [Directory search](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [Multi-selection](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`

### File actions

- [File actions](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [Copy and move](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- [Open and terminal](https://github.com/yassine-jemi01/forgefm/blob/main/src/app.c): `src/app.c`
- **GIO filesystem**

### Other components

- **User**
- **Local filesystem**
- **Desktop applications**
- **Terminal launcher**

## Connections

- User → GTK application: uses (evidence: `README.md`)
- GTK application → Lifecycle entry: activates (evidence: `src/main.c`)
- Lifecycle entry → Forge app: creates and activates (evidence: `src/main.c`)
- Lifecycle entry → Forge app: frees on shutdown (evidence: `src/main.c`)
- User → Browser interface: interacts with (evidence: `README.md`)
- Browser interface → Directory navigation: navigates (evidence: `src/app.c`)
- Directory navigation → File listing: refreshes (evidence: `src/app.c`)
- User → Directory search: searches (evidence: `README.md`)
- User → Multi-selection: selects (evidence: `README.md`)
- User → File actions: requests actions (evidence: `README.md`)
- File actions → GIO filesystem: uses (evidence: `src/app.c`)
- Copy and move → GIO filesystem: copies or moves (evidence: `src/app.c`)
- GIO filesystem → Local filesystem: reads and writes
- Open and terminal → Desktop applications: opens files with (evidence: `src/app.c`)
- Open and terminal → Terminal launcher: looks up launcher (evidence: `src/app.c`)
