# fleen-5177/mini-indexeddb-fs architecture

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

- Interactive diagram: https://gitdiagram.com/fleen-5177/mini-indexeddb-fs
- Repository: https://github.com/fleen-5177/mini-indexeddb-fs

## Overview

minifs is a small browser-side virtual filesystem: callers use its `createFs()` instance to manage directories and text or binary files, with records persisted in IndexedDB. The README documents file and directory listing, metadata, copy, move, rename and recursive removal. The single source file implements these capabilities; the graph groups related runtime responsibilities rather than treating each API method as a separate subsystem.

Main entry points: [`minifs.js`](https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js) (Filesystem API)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Application"))
node_api["Filesystem API<br/>[minifs.js]"]
node_paths["Path resolution<br/>[minifs.js]"]
node_codec["Data codec<br/>[minifs.js]"]
node_dbops["Database operations<br/>[minifs.js]"]
node_store[("IndexedDB store")]
node_browser["Browser IndexedDB"]

node_caller -->|"calls"| node_api
node_api -->|"normalizes paths"| node_paths
node_api -->|"encodes and decodes"| node_codec
node_api -->|"reads and writes"| node_dbops
node_dbops -->|"opens database"| node_browser
node_browser -->|"provides object store"| node_store

click node_api "https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js"
click node_paths "https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js"
click node_codec "https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js"
click node_dbops "https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.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_caller toneIndigo
class node_api toneMint
class node_paths,node_codec toneTeal
class node_dbops,node_store toneAmber
class node_browser toneBlue
```

## Components

### Other components

- **Application**
- [Filesystem API](https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js): `minifs.js`
- [Path resolution](https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js): `minifs.js`
- [Data codec](https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js): `minifs.js`
- [Database operations](https://github.com/fleen-5177/mini-indexeddb-fs/blob/main/minifs.js): `minifs.js`
- **IndexedDB store**
- **Browser IndexedDB**

## Connections

- Application → Filesystem API: calls
- Filesystem API → Path resolution: normalizes paths
- Filesystem API → Data codec: encodes and decodes
- Filesystem API → Database operations: reads and writes
- Database operations → Browser IndexedDB: opens database
- Browser IndexedDB → IndexedDB store: provides object store
