# bacteroid/nfttool architecture

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

- Interactive diagram: https://gitdiagram.com/bacteroid/nfttool
- Repository: https://github.com/bacteroid/nfttool

## Overview

##### Project type and purpose
- This is a small CLI toolchain (an open-source utility) for preparing art assets (via PSD slicing) and packaging them into an NFT collection.
- The two main scripts are:
- PSDSlicer.py – slices a layered PSD into individual PNG parts
- NFTCreator.py – assembles those parts into full images and metadata for NFTs

##### File structure
- Top-level files only; no nested folders
- PSDSlicer.py
- NFTCreator.py
- ReadMe.md
- .gitattributes
- No backend/frontend split, no database – it’s a simple two-stage processing pipeline.
- No Dockerfile or CI config, so deployment is local/CLI.

##### Insights from the README
- Clear two-step workflow: slice raw PSD → create NFTs from slices
- Detailed usage is embedded in the scripts themselves.
- No external services or runtime server components.

##### Detailed capture of essential elements
- Don’t add extraneous components; focus on the two-stage pipeline
- Clearly distinguish between file artifacts and processing steps
- Call out extension points (e.g., “swap in a custom metadata template”)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Artifacts and modules
    RawPSD["Raw PSD File"]:::inputOutput
    PSDSlicer["PSDSlicer.py\nuses psd-tools, Pillow"]:::module
    PNGLayers["PNG Layers Folder"]:::inputOutput
    NFTCreator["NFTCreator.py\nuses JSON, argparse"]:::module
    Output["NFT Images + Metadata"]:::inputOutput

    %% Data flow
    RawPSD -->|"PSD file"| PSDSlicer
    PSDSlicer -->|"sliced PNGs"| PNGLayers
    PNGLayers -->|"PNG layers"| NFTCreator
    NFTCreator -->|"images + JSON"| Output

    %% Click events
    click PSDSlicer "https://github.com/bacteroid/nfttool/blob/main/PSDSlicer.py"
    click NFTCreator "https://github.com/bacteroid/nfttool/blob/main/NFTCreator.py"

    %% Styles
    classDef inputOutput fill:#89CFF0,stroke:#333,stroke-width:1px
    classDef module fill:#98FB98,stroke:#333,stroke-width:1px
```
