# ninguem/prj architecture

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

- Interactive diagram: https://gitdiagram.com/ninguem/prj
- Repository: https://github.com/ninguem/prj

## Overview

##### Main Components

a. Core Components:
- Command Parser
- Project Manager
- File System Handler
- Version Control System (VCS) Integration
- Configuration Manager

b. Data Structure Components:
- Projects Directory Structure
- Categories Management
- Archive System
- Project Template Structure

##### Key Relationships

- Command flow from CLI to specific managers
- File system operations
- Project/Category relationships
- Archive operations
- Script execution paths

##### Special Elements

**Project/**
- .prj/
- Scripts (.sh)
- Dependencies
- README
- TODO
- .git/
- trash/

**Categories/**
- prefix.CategoryName1/
- prefix.CategoryName2/
- ...

##### Implementation Details to Highlight

- Relationship between the .prj directory and script execution
- Project state transitions (active → archived)
- Demonstrate category management flow
- Project dependency tracking

##### The archive system's organization

This design should clearly show how the script manages to organize projects while maintaining a simple and effective structure that's easy to understand and modify.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph CLI
        CMD[Command Line Interface]
        HELP[Help System]
        STAT[Status Display]
    end

    subgraph Business
        POM[Project Operations Manager]
        COM[Category Operations Manager]
        AM[Archive Manager]
        SR[Script Runner]
    end

    subgraph Storage
        DM[Directory Management]
        FT[File Templates]
        VCS[Version Control System]
        CM[Configuration Manager]
    end

    subgraph "Project Structure"
        PS["Project/"]
        PS_PRJ[".prj/"]
        PS_README["README"]
        PS_TODO["TODO"]
        PS_GIT[".git/"]
        PS_TRASH["trash/"]
        PS --> PS_PRJ
        PS --> PS_README
        PS --> PS_TODO
        PS --> PS_GIT
        PS --> PS_TRASH
    end

    subgraph "Category Structure"
        CS["Categories/"]
        CAT1["prefix.CategoryName1/"]
        CAT2["prefix.CategoryName2/"]
        CS --> CAT1
        CS --> CAT2
    end

    %% Relationships
    CMD --> POM
    CMD --> COM
    CMD --> AM
    CMD --> SR

    POM --> DM
    COM --> DM
    AM --> DM
    SR --> FT

    DM --> VCS
    DM --> CM

    %% Click Events
    click CMD "https://github.com/Ninguem/prj/tree/gh/prj"
    click CM "https://github.com/Ninguem/prj/blob/gh/.prj/install.sh"
    click VCS "https://github.com/Ninguem/prj/blob/gh/.gitignore"
    click PS_README "https://github.com/Ninguem/prj/tree/gh/README"
    click PS_TODO "https://github.com/Ninguem/prj/tree/gh/TODO"
    click CM "https://github.com/Ninguem/prj/blob/gh/.prj/install.sh"

    %% Styling
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef fs fill:#4CAF50,stroke:#388E3C,color:white
    classDef pm fill:#FF9800,stroke:#F57C00,color:white
    classDef vcs fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef util fill:#9E9E9E,stroke:#616161,color:white

    class CMD,HELP,STAT core
    class DM,FT fs
    class POM,COM,AM,SR pm
    class VCS vcs
    class CM util

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[File System]:::fs
        L3[Project Management]:::pm
        L4[Version Control]:::vcs
        L5[Utilities]:::util
    end
```
