$ show rockbenben/ChatGPT-Shortcut
This repository, named 'AI Short' (ChatGPT-Shortcut), is a production-grade Docusaurus-based web application that serves as a curated, multilingual library of over 5,000 AI prompts for ChatGPT, Gemini, Claude, and similar tools. The application provides a searchable, tag-filterable interface with prompt cards, copy-with-tracking, and detailed pages featuring FAQs and related prompts. It supports 18 languages via separate Docusaurus builds and includes a browser extension (Chrome/Firefox) for quick access. Beyond the static prompt data, it offers a community platform with user accounts (OAuth), favorites, custom prompt creation, voting, comments, and a level system. The frontend is a React 19 SPA with Ant Design 6, featuring client-side caching, optimistic UI updates, and lazy-loaded components. The backend (Strapi) is not open-sourced but the API contracts are fully defined. Deployment options include standard (shared backend), offline (localStorage), and full self-hosted setups. The code demonstrates strong engineering practices: clean component decomposition, custom hooks for data management, a two-tier cache system with ETag support, and thoughtful accessibility patterns. The prompt data itself is static JSON, generated from a master file via a Python pipeline, and includes rich metadata for SEO and cross-referencing.
The LLM identified 4 files worth highlighting for reuse:
A unified copy button component that tracks copy events via API. Supports three visual variants (iconOnly, outlined, primary) and provides feedback through icon swap and a pulse ring animation without using toasts. Forces accessible labels via aria-label derived from the same string used for tooltip, preventing accessibility drift. Self-contained with no internal app dependencies beyond a utility function for copying text and an API call.
A polymorphic prompt card component that dispatches to type-specific implementations (DataCard, FavoriteCard, CommunityCard, UserCard) based on a 'type' prop. Shares a common BasePromptCard with drag-and-drop support via @dnd-kit. Isolated enough to extract into another project with minimal adaptationβreplace the data source and type dispatch. Demonstrates clean separation of concerns and reusable card layout.
A single entry point for all icon-only action buttons. Forces developers to provide an aria-label from a shared string that is also used for the tooltip, ensuring accessibility attributes never drift from visible labels. Self-contained, no internal dependencies beyond React and Ant Design's Tooltip. Solves a common a11y pattern in a clean, opinionated way.
A reusable empty/error state component used across all pages and data views in the application. Supports two modes: compact (inline) and fullPage. Accepts optional action button, loading state, and custom icons. Encapsulates consistent styling and messaging for empty search results, loading failures, and missing data. Easily extractable for any React project.