Skip to content

FaberOs/PromptArchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Prompt Archive Hero Image

πŸ—‚οΈ Prompt Archive

A local-first desktop application for managing, organizing, and archiving AI image generation prompts.

Python Next.js React FastAPI SQLite Tailwind CSS License


πŸ“– About

Prompt Archive is a fully offline, privacy-focused desktop tool designed for AI artists and creators who work with image generation models like Nano Banana, Stable Diffusion, ComfyUI, InvokeAI, and others.

It lets you save, organize, search, and revisit your prompts alongside reference images β€” all stored locally on your machine with zero cloud dependencies.

✨ Key Features

  • Structured & JSON prompts β€” Store classic positive/negative prompts or full ComfyUI/InvokeAI JSON workflows
  • Multi-slot positive prompts β€” Split prompts into up to 3 logical sections
  • Prompt variants β€” Branch off existing prompts to track iterations
  • Image attachments β€” Attach up to 4 reference/result images per prompt
  • Folder organization β€” Group prompts into folders for project-based workflows
  • Categories & tags β€” High-level categories and fine-grained keyword tags
  • NSFW library β€” PIN-protected separate library for sensitive content
  • Full-text search β€” Quickly find prompts by title, content, or tags
  • Dark mode β€” Full dark theme with smooth transitions
  • Responsive UI β€” Works on desktop and mobile browsers
  • One-click launch β€” Start both servers with a single .bat script

πŸ—οΈ Architecture

Prompt Archive uses a decoupled client-server architecture running entirely on localhost:

Layer Technology Port
Frontend Next.js 16.1 + React 19 + Tailwind CSS 4 3000
Backend FastAPI + SQLAlchemy + SQLite 8000
Database SQLite (file-based, in data/) β€”
Images Local filesystem (data/images/) β€”

πŸ“ Project Structure

PromptArchive/
β”œβ”€β”€ assets/                  # Project assets (cover image, etc.)
β”œβ”€β”€ backend/                 # FastAPI REST API server
β”‚   β”œβ”€β”€ routers/             # API route handlers
β”‚   β”‚   β”œβ”€β”€ prompts.py       # CRUD for prompts, images, variants
β”‚   β”‚   β”œβ”€β”€ folders.py       # Folder management
β”‚   β”‚   β”œβ”€β”€ categories.py    # Category operations
β”‚   β”‚   └── settings.py      # App settings (PIN, etc.)
β”‚   β”œβ”€β”€ main.py              # App entry point, middleware, mounts
β”‚   β”œβ”€β”€ models.py            # SQLAlchemy ORM models
β”‚   β”œβ”€β”€ schemas.py           # Pydantic request/response schemas
β”‚   β”œβ”€β”€ crud.py              # Database query functions
β”‚   β”œβ”€β”€ database.py          # Engine & session configuration
β”‚   β”œβ”€β”€ migrations.py        # Auto-migration logic
β”‚   β”œβ”€β”€ seed.py              # Default category seeding
β”‚   └── deps.py              # Shared dependencies & paths
β”œβ”€β”€ frontend/                # Next.js web client
β”‚   β”œβ”€β”€ app/                 # App Router pages
β”‚   β”œβ”€β”€ components/          # React components (30+)
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ lib/                 # API client, types, utilities
β”‚   └── public/              # Static assets
β”œβ”€β”€ data/                    # Runtime data (auto-created)
β”‚   β”œβ”€β”€ database.sqlite      # SQLite database file
β”‚   └── images/              # Uploaded images by prompt ID
β”œβ”€β”€ start_app.bat            # One-click launcher (Windows)
└── test_backend.py          # Backend integration tests

πŸš€ Quick Start

Prerequisites

  • Python 3.10+ with pip
  • Node.js 18+ with npm

1. Clone & Setup

git clone https://github.com/your-username/PromptArchive.git
cd PromptArchive

2. Backend Setup

# Create virtual environment
python -m venv venv

# Activate (Windows)
venv\Scripts\activate

# Install dependencies
pip install -r backend/requirements.txt

3. Frontend Setup

cd frontend
npm install
cd ..

4. Launch

Option A β€” One-click (Windows):

start_app.bat

Option B β€” Manual:

# Terminal 1: Backend
venv\Scripts\activate
uvicorn backend.main:app --reload --port 8000

# Terminal 2: Frontend
cd frontend
npm run dev

5. Open

Navigate to http://localhost:3000 in your browser.


πŸ–₯️ Usage

Action How
Browse prompts Home page (/) shows all standard prompts
Create a prompt Click + New Prompt in the sidebar or navigate to /create
Create a variant From any prompt detail page, click New Variant
NSFW library Sidebar β†’ NSFW (requires PIN setup in Settings)
Organize Create folders, assign categories, add comma-separated tags
Search Use the search bar on any library page
Manage categories Navigate to /categories

πŸ“š Use Cases

Prompt Archive is a versatile tool designed to cater to the needs of AI artists, creators, and enthusiasts working with image generation models. Here are some of the key use cases where Prompt Archive proves invaluable:

1. Organizing Prompts and Associated Images

AI image generation often involves experimenting with multiple prompts and their variations. Prompt Archive allows users to:

  • Store prompts alongside their generated images for easy reference.
  • Attach up to 4 reference or result images per prompt, ensuring that every iteration is documented.
  • Group prompts into folders for project-based workflows, making it easier to manage large-scale projects.

2. Iterative Prompt Development

Creating the perfect AI-generated image often requires multiple iterations. With Prompt Archive, users can:

  • Create prompt variants to track changes and improvements over time.
  • Split prompts into logical sections (e.g., positive/negative prompts) for better control.
  • Save JSON workflows for advanced models like ComfyUI and InvokeAI.

3. Efficient Search and Retrieval

Finding the right prompt or image quickly is crucial for productivity. Prompt Archive offers:

  • Full-text search capabilities to locate prompts by title, content, or tags.
  • High-level categories and fine-grained keyword tags for better organization.
  • A responsive and intuitive UI that works seamlessly on both desktop and mobile browsers.

4. Privacy-Focused Content Management

For creators working with sensitive or NSFW content, Prompt Archive provides:

  • A PIN-protected NSFW library to keep sensitive prompts and images secure.
  • Local-first architecture with zero cloud dependencies, ensuring complete privacy.

5. Project-Based Workflows

Whether you’re working on a single artwork or a large-scale project, Prompt Archive supports:

  • Folder-based organization to group related prompts and images.
  • Category management to classify prompts by themes or styles.
  • Tagging for quick filtering and retrieval.

6. Offline Accessibility

Prompt Archive is designed to work entirely offline, making it ideal for:

  • Artists who prefer not to rely on cloud services.
  • Environments with limited or no internet connectivity.
  • Ensuring data security by keeping everything local.

7. Enhanced User Experience

With features like dark mode, smooth transitions, and one-click launch, Prompt Archive ensures:

  • A comfortable and visually appealing workspace.
  • Quick setup and easy access to both frontend and backend servers.
  • A streamlined workflow for managing AI-generated content.

Whether you’re an AI artist looking to organize your creative process, a researcher experimenting with image generation models, or a hobbyist exploring the possibilities of AI art, Prompt Archive is the perfect tool to enhance your workflow and keep your prompts and images organized.


️ Tech Stack

Frontend

Package Purpose
Next.js 16.1 React framework with App Router
React 19 UI library
Tailwind CSS 4 Utility-first styling
TanStack React Query 5 Server state & caching
React Hook Form 7 Form state management
Axios HTTP client
Lucide React Icon library
Sonner Toast notifications

Backend

Package Purpose
FastAPI Async REST framework
Uvicorn ASGI server
SQLAlchemy ORM & database toolkit
Pydantic Data validation & schemas
Pillow Image processing
python-multipart File upload handling

πŸ“„ License

This project is licensed under the MIT License. See LICENSE for details.


Made with ❀️ for the AI art community by FaberOs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors