Chrome extension for advanced X.com search with templates, query builder, and favorites.
/Users/jarodise/Documents/GitHub/XQuery/
├── package.json ✅ Dependencies configured
├── tsconfig.json ✅ TypeScript config
├── tsconfig.node.json ✅ Node TypeScript config
├── vite.config.ts ✅ Vite + CRXJS plugin
├── tailwind.config.js ✅ Tailwind with X theme colors
├── postcss.config.js ✅ PostCSS config
├── IMPLEMENTATION_PLAN.md ✅ Detailed plan
│
├── src/
│ ├── manifest.ts ✅ Chrome MV3 manifest
│ ├── types/index.ts ✅ All TypeScript types
│ ├── stores/useStore.ts ✅ Zustand store with favorites
│ ├── data/templates.ts ✅ All region templates (zh/ja/es/en/global)
│ │
│ ├── utils/
│ │ ├── queryBuilder.ts ✅ Query string builder
│ │ ├── queryBuilder.test.ts ✅ Tests for query builder
│ │ ├── xSearch.ts ✅ X.com URL builder
│ │ └── xSearch.test.ts ✅ Tests for xSearch
│ │
│ ├── background/index.ts ✅ Service worker
│ │
│ ├── content/
│ │ ├── index.tsx ✅ Content script entry
│ │ └── Sidebar.tsx ✅ Main sidebar component
│ │
│ ├── components/
│ │ ├── Header.tsx ✅ Header with close button
│ │ ├── TabNav.tsx ✅ Tab navigation
│ │ ├── TemplateList.tsx ✅ Template list with region selector
│ │ └── TemplateCard.tsx ✅ Individual template card
│ │
│ ├── styles/sidebar.css ✅ CSS styles
│ └── test/setup.ts ✅ Vitest setup
│
└── public/icons/ ❌ MISSING - need icon files
- src/components/QueryBuilder.tsx - Custom query form
- src/components/QueryPreview.tsx - Live query preview
- src/components/FavoritesList.tsx - Saved queries UI
- public/icons/icon16.png, icon48.png, icon128.png - Extension icons
// Location: src/components/QueryBuilder.tsx
// Features needed:
// - Keywords input (multiple keywords as tags)
// - Language dropdown (zh-cn/ja/es/en/all)
// - Time range dropdown (1h/4h/12h/24h/7d/all)
// - Min likes selector (100/500/1000/5000/10000)
// - Collapsible advanced section:
// - Media type checkboxes (images/videos)
// - Exclude checkboxes (retweets/replies/links)
// - Live query preview
// - Search & Save buttons// Location: src/components/QueryPreview.tsx
// Display generated query with copy button// Location: src/components/FavoritesList.tsx
// Features:
// - Empty state
// - List of favorites with name, query, date
// - Edit/Delete actions
// - Click to searchCreate 3 PNG files in public/icons/:
- icon16.png (16x16)
- icon48.png (48x48)
- icon128.png (128x128)
Simple X logo with search icon overlay.
cd /Users/jarodise/Documents/GitHub/XQuery
pnpm install
pnpm dev
# Load dist/ folder in Chrome as unpacked extension
# Test on x.com--background: #000000;
--elevated: #16181c;
--surface: #202327;
--border: #2f3336;
--text: #e7e9ea;
--secondary: #71767b;
--accent: #1d9bf0; /* X Blue */
--font: 'JetBrains Mono', sans-serif;// In components, use these imports:
import { useStore } from '@/stores/useStore'
import { buildQueryString } from '@/utils/queryBuilder'
import { executeSearch } from '@/utils/xSearch'
import type { QueryParams, Language, TimeRange, MediaType, ExcludeType } from '@/types'const {
queryParams, // Current query params
setQueryParams, // Update params (partial)
resetQueryParams, // Reset to defaults
favorites, // Array of FavoriteQuery
addFavorite, // (name, query) => void
removeFavorite, // (id) => void
updateFavorite, // (id, name, query) => void
loadFavorites, // () => Promise<void>
} = useStore(){
keywords: [],
language: 'all',
timeRange: 'all',
minFaves: 0,
mediaType: [],
exclude: [],
}Already exists in project root with full details.
Created: 2025-02-07 Status: 75% complete, 3 components + icons remaining