Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 36 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,72 +1,47 @@
# 🚀 Prompt Library
# PromptLibrary

A professional, local-first **AI Prompt Management System** built for speed, organization, and portability.
A browser-based prompt manager for storing, organizing, and reusing AI prompts. Built to replace scattered note files and markdown docs with something searchable and structured.

[![Deployment Status](https://github.com/NaviAndrei/PromptLibrary/actions/workflows/deploy.yml/badge.svg)](https://github.com/NaviAndrei/PromptLibrary/actions/workflows/deploy.yml)
[![Version](https://img.shields.io/badge/version-1.3.1-blue.svg)](package.json)
## Stack

## ✨ Features
React 19.2 · TypeScript 5.9 · Vite 8 · IndexedDB (native browser API) · FlexSearch 0.7 · Sonner 2.0 · Lucide React 1.7

- **📂 Smart Workspaces**: Virtual folder organization for grouping related prompts.
- **🎛️ Unified Control Bar**: Search, view toggles, model filters, and date range live together in one compact header.
- **⚡ Full-Text Search**: High-performance local search across title, body, and tags (powered by **FlexSearch**).
- **🧭 Sidebar Polish**: Helpful section notes, clearer dividers, and an inset scrollbar keep the left panel readable.
- **🏷️ Sidebar-Driven Tags**: The Add New Prompt form suggests tags from the sidebar cloud and supports comma-separated multi-tag entry.
- **🗂️ Prompt Templates**: Reusable templates can be edited in a modal and added as prompts with one click.
- **🌗 Dark Mode**: Premium dark/light themes that persist across sessions.
- **🧩 Variable Injection**: Use `{{variable}}` syntax with dynamic UI inputs.
- **💄 Advanced Filtering**: Specific Model and Date-Range (inclusive) filters.
- **📝 Plain-Text Prompt View**: Expanded prompt content stays selectable for easier copy and reuse.
- **🕐 Version History**: Automatic snapshots of your prompts with visual diffing.
- **🏛️ IndexedDB**: Massive local capacity (hundreds of MBs) replacing the 5MB browser limit.
- **📱 PWA v2 Native**: Full offline access with background asset caching and connectivity monitoring.
- **🧼 Cleanup Assistant**: Identify and remove large, stale, or duplicate prompts.
## Features

## 🛠️ Tech Stack
- Create, edit, and delete prompts with title, body, tags, and model target
- Workspaces with custom color and icon for grouping related prompts
- Tag filtering via the sidebar tag cloud; the prompt form suggests existing tags and accepts comma-separated input
- Full-text search across title, body, and tags, powered by FlexSearch (in-memory index)
- Export individual prompts as `.md` or `.json` via a format picker modal
- Batch export all prompts with workspace and tag filters applied
- Import prompts from a JSON file with a choice of merge or replace strategy
- Version history per prompt with visual line-level diff
- Variable injector: write `{{VARIABLE}}` in a prompt body and get live input fields rendered per variable
- Template manager for storing and converting reusable prompt skeletons into full prompts
- Dark/light mode toggle, persisted to localStorage
- Cleanup assistant to surface large, stale, or duplicate prompts
- Storage usage indicator showing current IndexedDB consumption

- **Core**: React 19 + TypeScript 5.9 + Vite 8
- **Storage**: IndexedDB (Primary) + LocalStorage (Settings)
- **Search**: FlexSearch (In-Memory Engine)
- **Styling**: Vanilla CSS (Global Variables + responsive shells)
- **Icons**: Lucide React
- **Security**: CodeQL Workflow Analysis
## Getting Started

## 🚀 Getting Started
```bash
npm install
npm run dev # dev server at localhost:5173
npm run build # type-check + bundle to dist/
npm run preview # serve the built dist/ locally
```

1. **Clone the repository**:
## Project Structure

```bash
git clone https://github.com/NaviAndrei/PromptLibrary.git
cd PromptLibrary
```
```
src/components/ — UI components, modals, and workspace views
src/hooks/ — custom hooks for filters, storage, drawer state
src/services/ — FlexSearch index setup and search logic
src/utils/ — IndexedDB read/write helpers
src/types/ — feature-specific TypeScript declarations
```

2. **Install dependencies**:
## Notes

```bash
npm install
```

3. **Run in development mode**:

```bash
npm run dev
```

4. **Build for production**:
```bash
npm run build
```

## 🌐 Deployment

The project is automatically deployed to **GitHub Pages** via GitHub Actions on every push to the `main` branch.

**Live Demo**: [https://naviandrei.github.io/PromptLibrary/](https://naviandrei.github.io/PromptLibrary/)

## 📝 License

Distributed under the MIT License. See `LICENSE` for more information.

---

Built with ❤️ by **NaviAndrei**
- All data lives in the browser: localStorage for settings and preferences, IndexedDB for prompts and workspaces. There is no backend or sync.
- Concurrent writes from two open tabs can race in IndexedDB — documented in `docs/TEST_STRATEGY.md`, deferred pending a larger refactor.
Loading