# nemoxus/notisme architecture

> Architecture diagram of the GitHub repository nemoxus/notisme, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nemoxus/notisme
- Repository: https://github.com/nemoxus/notisme

## Overview

##### Project type and purpose
- This is a terminal-based, Python-powered “second brain” that manages a vault of Markdown notes and provides automated text-processing tools (classification, generation, summarization, vault connectivity).
- Users never leave the terminal: they invoke CLI scripts that read, write, index, and augment Markdown files in a folder structure under version control.

##### File structure
- Top‐level files:
- text_classf.py – a CLI tool to classify or tag notes
- text_gen.py – a generator (e.g., AI-powered) to create or expand note content
- text_summr.py – a summarization tool to produce short overviews of notes
- vault_connc.py – a module that exposes a uniform API for reading/writing Markdown files in the vault
- README.md, .gitignore
- Implicit vault directory (notes/) containing subfolders (daily, ideas, etc.) as described in the README, plus Git for version control.
- No GUI, no frontend; everything is orchestrated through Python scripts and the filesystem.

##### README for additional insights
- Describes Markdown-only storage (“notes/”), structured as daily, ideas, projects, etc.
- Features: CLI note creation, parsing & linking, fuzzy search, auto-cleanup, Git tracking.
- Future plans hint at AI-powered summary and tagging, cron jobs, dashboards.

a. Main components
1. User (terminal)
2. CLI Entrypoints (scripts: text_classf.py, text_gen.py, text_summr.py, note_creator.py, search.py, indexer.py if present)
3. Vault Connector Module (vault_connc.py)
4. File System Vault (notes/ folder structure)
5. Git Version Control (repository around the vault)
6. External Services (optional AI/LLM APIs for generation and summarization)
b. Relationships and data flows
- User → CLI Entrypoint (e.g., `python text_summr.py`)
- CLI Entrypoint → Vault Connector API
- Vault Connector ←→ File System (read/write Markdown files)
- For AI tasks: CLI Entrypoint → External API → CLI Entrypoint → Vault Connector
- Git hooks or manual Git commands wrap around the vault for versioning
c. Architectural patterns & principles
- Modular scripts each handle one concern (separation of concerns)
- Vault Connector implements a single source of truth for all file I/O
d. Key technologies
- Python 3.x (modules & argparse or click for CLI)
- Markdown file storage in hierarchical folders
- Git for version control
- (Optional) HTTP client library for AI/LLM integrations

##### Key things to capture
- All Python scripts and their specific roles
- The vault connector as the sole interface to file I/O
- The folder structure of notes as the data store
- Version control layer around the vault

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User
    User(("CLI User")):::user

    %% Scripts Group
    subgraph "CLI Entrypoints"
        direction TB
        Classifier["Classifier Script\n(text_classf.py)"]:::script
        Generator["Generator Script\n(text_gen.py)"]:::script
        Summarizer["Summarizer Script\n(text_summr.py)"]:::script
    end

    %% Vault Connector
    VaultConn["Vault Connector\n(vault_connc.py)"]:::connector

    %% Data Store and Version Control
    subgraph "Data Store & VCS"
        direction TB
        Vault["notes/ (Vault)"]:::vault
        GitRepo["Git Repository"]:::git
    end

    %% External Service
    ExternalAI["AI/LLM Service"]:::external

    %% Project Files
    subgraph "Project Files"
        direction TB
        Readme["README.md"]:::docs
        GitIgnore[".gitignore"]:::docs
    end

    %% Connections
    User -->|"invoke script"| Classifier
    User -->|"invoke script"| Generator
    User -->|"invoke script"| Summarizer

    Classifier -->|"use vault API"| VaultConn
    Generator -->|"use vault API"| VaultConn
    Summarizer -->|"use vault API"| VaultConn

    VaultConn -->|"read/write notes"| Vault
    Vault -->|"commit/push changes"| GitRepo

    Generator -->|"call LLM"| ExternalAI
    Summarizer -->|"call LLM"| ExternalAI
    ExternalAI -->|"return result"| Generator
    ExternalAI -->|"return result"| Summarizer

    %% Click Events
    click Classifier "https://github.com/nemoxus/notisme/blob/main/text_classf.py"
    click Generator "https://github.com/nemoxus/notisme/blob/main/text_gen.py"
    click Summarizer "https://github.com/nemoxus/notisme/blob/main/text_summr.py"
    click VaultConn "https://github.com/nemoxus/notisme/blob/main/vault_connc.py"
    click Readme "https://github.com/nemoxus/notisme/blob/main/README.md"
    click GitIgnore "https://github.com/nemoxus/notisme/blob/main/.gitignore"
    click Vault "https://github.com/nemoxus/notisme/tree/main/notes/"

    %% Styles
    classDef user fill:#f9f,stroke:#333,stroke-width:2px;
    classDef script fill:#ccf,stroke:#333,stroke-width:1px;
    classDef connector fill:#cfc,stroke:#333,stroke-width:1px;
    classDef vault fill:#9f6,stroke:#333,stroke-width:1px;
    classDef git fill:#aaa,stroke:#333,stroke-width:1px;
    classDef external fill:#f96,stroke:#333,stroke-width:1px;
    classDef docs fill:#eee,stroke:#333,stroke-width:1px;
```
