imajin/docs/README.md

4.9 KiB

@image Documentation

AI-powered image generation platform with diffusion models, LLM prompt engineering, and post-processing capabilities.

Architecture Overview

graph TB
    subgraph "Consumer Applications"
        DESKTOP[desktop-chat-app]
        PLATFORM[lilith-platform]
        ERRPAGES[@ui/error-pages]
        SKELETON[@ui/skeleton-anime-girls]
    end

    subgraph "@image Libraries"
        ELECTRON[electron/<br/>@lilith/imajin-electron]
        REACTLIB[react/<br/>@lilith/imajin-react]
        CORE[imajin-app/<br/>@lilith/imajin-app]
    end

    subgraph "Backend Services"
        ASSIST[imajin-prompt :8003]
        GEN[imajin-diffusion :8002]
        PROC[imajin-processing :8004]
    end

    subgraph "Infrastructure"
        REDIS[(Redis/GPUBoss)]
        GPU[GPU/CUDA]
    end

    DESKTOP --> ELECTRON
    PLATFORM --> REACTLIB
    ERRPAGES & SKELETON --> CORE
    ELECTRON & REACTLIB --> CORE
    CORE --> ASSIST & GEN & PROC
    ASSIST & GEN --> REDIS --> GPU

Key consumers:

  • desktop-chat-app - End-user image generation in chat conversations
  • lilith-platform - Image generation features + platform-admin for orchestration oversight
  • @packages/@ui - Shared UI packages (error-pages, skeleton-anime-girls)

Quick Navigation

Section Description
Architecture System design, service topology, data flow
Services Individual service documentation
Development Getting started, client libraries, testing
Operations Configuration, GPU coordination, ports

Components at a Glance

Component Type Technology Purpose
imajin-app Library TypeScript Core orchestration entry point
react/ Library React UI components for web consumers
electron/ Library Electron Components for desktop consumers
imajin-prompt Service Python/FastAPI LLM prompt generation
imajin-diffusion Service Python/FastAPI Diffusion model image generation
imajin-processing Service NestJS/Sharp Image post-processing

Existing Documentation

Detailed documentation exists in each service directory:

Repository Structure

@image/
├── imajin-app/            # Core orchestration entry point
│   └── src/               # @lilith/imajin-app (pipelines, types, clients)
├── react/                 # React components for web consumers
│   └── src/               # @lilith/imajin-react (UI components, hooks)
├── electron/              # Electron components for desktop consumers
│   └── src/               # @lilith/imajin-electron (IPC, service management)
├── imajin-diffusion/      # Diffusion model image generation service
│   ├── service/           # Python FastAPI backend
│   ├── types/             # @lilith/imajin-diffusion-types
│   └── client/            # @lilith/imajin-diffusion-client
├── imajin-processing/      # Image post-processing service
│   ├── service/           # NestJS backend
│   ├── types/             # @lilith/imajin-processing-types
│   └── client/            # @lilith/imajin-processing-client
├── imajin-prompt/    # LLM prompt generation service
│   ├── service/           # Python FastAPI backend
│   ├── types/             # TypeScript types
│   └── client/            # @lilith/imajin-prompt-client
├── utils/                 # Shared Python utilities
└── docs/                  # This documentation

Consumer Integration

imajin-app is a library, not a standalone app. Consumers:

Consumer Uses imajin-app for
desktop-chat-app Image generation in chat conversations
lilith-platform Image generation features (SEO pages, content, etc.)
lilith-platform (platform-admin) Pipeline monitoring & orchestration management
@packages/@ui/error-pages Generated error page images
@packages/@ui/skeleton-anime-girls Skeleton loading state images

Getting Started

  1. New to the project? Start with Getting Started
  2. Integrating imajin-app? See Client Libraries
  3. Deploying services? Check Configuration