From 4f635b6b6ab1126049c86005c524b6fe6bb6d275 Mon Sep 17 00:00:00 2001 From: NaviAndrei Date: Thu, 2 Jul 2026 18:03:59 +0300 Subject: [PATCH] Rewrite README to reflect current app state - Accurate stack (native IndexedDB, confirmed versions) - Features derived from actual src/components/ contents - Dropped stale version badge - Added known limitation note for putBatch() race --- README.md | 97 +++++++++++++++++++++---------------------------------- 1 file changed, 36 insertions(+), 61 deletions(-) diff --git a/README.md b/README.md index 13d2fde..da5c716 100644 --- a/README.md +++ b/README.md @@ -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.