A modern, TypeScript-powered Chrome extension with React, Shadcn/UI, and full internationalization (i18n) support.
- β¨ Modern UI: Built with React, TypeScript, and Shadcn/UI components
- π¨ Dark/Light Mode: Automatic theme switching with system preference detection
- π Drag & Drop: Reorder prompts with smooth animations
- π·οΈ Tag System: Organize prompts with customizable tags
- π Search & Filter: Find prompts quickly with real-time search
- π₯ Import/Export: Backup and share your prompt collections
- π Internationalization: Full i18n support with Hebrew and English languages
βοΈ RTL Support: Right-to-left layout support for Hebrew- πΎ Chrome Storage: Persistent storage using Chrome extension APIs
- π― Type Safety: Full TypeScript coverage with strict type checking
- English (en) - Default language
- Χ’ΧΧ¨ΧΧͺ (he) - Hebrew with full RTL support
- Clone the repository:
git clone <repository-url>
cd prompt-templates-sidebar- Install dependencies:
npm install- Build the extension:
npm run build- Load the extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the
distfolder
- Open Chrome and navigate to
- Node.js 18+
- npm or yarn
- Chrome browser
- Install dependencies:
npm install- Start development server:
npm run dev- The extension will be built in
dist/folder. Load it as an unpacked extension in Chrome.
The project uses react-i18next for internationalization with full i18n Ally support.
src/
βββ locales/
β βββ en/
β β βββ common.json # English translations
β βββ he/
β β βββ common.json # Hebrew translations
β βββ index.ts # Locale exports
βββ i18n/
β βββ config.ts # i18next configuration
β βββ types.ts # TypeScript types
- Create a new folder in
src/locales/(e.g.,fr/) - Add
common.jsonwith translations - Update
src/locales/index.tsto include the new language - Add language to
supportedLanguagesarray - Update
LanguageSwitcher.tsxwith language name and flag
Use nested dot notation for translation keys:
// Usage in components
const { t } = useTranslation();
t("sidebar.title"); // "Prompt Helper"
t("buttons.newPrompt"); // "New Prompt"
t("messages.copied"); // "Copied to clipboard!"The project includes i18n-ally.config.json for VS Code integration:
- Automatic key extraction
- Translation management
- Real-time preview
- Missing translation detection
Hebrew language includes full RTL (Right-to-Left) support:
- Automatic direction switching (
dir="rtl") - CSS logical properties for layout
- Icon orientation adjustments
- Proper text alignment
npm run dev- Start development servernpm run build- Build for productionnpm run lint- Run ESLintnpm run preview- Preview built extensionnpm run clean- Clean build artifacts
src/
βββ components/ # React components
β βββ ui/ # Shadcn/UI components
β βββ PromptSidebar.tsx
β βββ PromptForm.tsx
β βββ PromptCard.tsx
β βββ LanguageSwitcher.tsx
β βββ DarkModeToggle.tsx
βββ hooks/ # Custom React hooks
βββ lib/ # Utility functions
βββ types/ # TypeScript type definitions
βββ locales/ # Translation files
βββ i18n/ # i18n configuration
βββ assets/ # Static assets
βββ App.tsx # Main app component
βββ main.tsx # Entry point
βββ index.css # Global styles with RTL support
The extension is configured as a Chrome Extension Manifest V3:
- Side Panel: Integrated with Chrome's side panel API
- Storage: Uses Chrome storage for persistence
- Permissions: Minimal required permissions
- Content Security Policy: Strict CSP for security
Users can switch languages using the globe icon in the header:
- Click the globe icon (π)
- Select desired language from dropdown
- Language preference is saved automatically
- Interface updates immediately with RTL support for Hebrew
- Fork the repository
- Create a feature branch
- Add translations for new features
- Test with both LTR and RTL languages
- Submit a pull request
- Keep translations concise and contextual
- Test UI layout with longer Hebrew text
- Ensure proper RTL behavior
- Use i18n Ally for translation management
- Follow existing key naming conventions
MIT License - see LICENSE file for details
- Frontend: React 18, TypeScript
- UI Components: Shadcn/UI, Radix UI
- Styling: Tailwind CSS with RTL support
- Animation: Framer Motion
- Drag & Drop: @hello-pangea/dnd
- i18n: react-i18next, i18next
- Build Tool: Vite
- Linting: ESLint
- Type Checking: TypeScript
- Chrome 88+ (Manifest V3 support)
- Chromium-based browsers (Edge, Brave, etc.)