src/lib/template-registry.ts— Template schema with rich metadata: categories, subcategories, tags, packages, accent colors, bibliography flag. 12 templates total (was 8). New: IEEE, ACM, Technical Report, Newsletter. Registry API:getAllTemplates(),getTemplateById(),searchTemplates(),getTemplatesByCategory().src/stores/template-store.ts— Zustand store for gallery state: search query, category filter, template selection, preview state.computeFiltered()handles combined search+category filtering.
src/components/template-gallery/— New component directory:template-gallery.tsx— Main gallery: search bar (⌘K), category sidebar + grid layout, grouped view when no filter active, empty statetemplate-card.tsx— Cards with CSS-based document thumbnail placeholders (9 distinct layouts: paper, slides, poster, CV, letter, book, report, newsletter, blank). Hover reveals "Preview" buttoncategory-sidebar.tsx— Category navigation with template countstemplate-preview.tsx— Dialog showing LaTeX source, package list, tags, metadata, "Use Template" CTAindex.ts— Barrel export
project-wizard.tsx— Now usesTemplateGalleryfor step 1 instead of old inlineTemplateGrid. Step 2 (project details) unchanged. All project creation logic preserved. Usestemplate.hasBibliographyinstead of hardcoded ID check.
- Keyboard navigation — Arrow keys to navigate grid, Enter to select, Tab between sections
- Animations — Consider adding
framer-motion(not currently installed) for card entrance animations and page transitions - Responsive grid — Test and tune grid breakpoints for various window sizes
- PDF thumbnail generation — Compile templates to PDF, render first page as image using pdfjs-dist (already a dependency). Store as cached images. Replace CSS placeholders with actual rendered thumbnails
- Live preview in modal — Show rendered PDF in the preview dialog instead of just source code
- Multi-page preview — For templates like presentations/books
- Side-by-side compare — Allow comparing two templates
- Package browser — Curated CTAN package list
- Package adding — Let users add packages before project creation
- Compatibility checker — Warn about conflicting packages
- Springer, APA, MLA, Chicago style templates
- User template library — Save customized templates
- Template import — From .tex files or Overleaf
- No
framer-motioninstalled — animations use Tailwind CSStw-animate-css. Install if needed for gallery transitions line-clamp-2used in template-card.tsx — may need@tailwindcss/line-clampif not natively supported (TW4 may include it)- Template IDs changed:
paper→paper-standard,cv→cv-modern, etc. Old IDs no longer exist react-pdfandpdfjs-distalready installed — ready for thumbnail generation work