Find a file
delibae c5c3085626 feat: extract template gallery into dedicated components with expanded template library
Refactor the project wizard's inline template grid into a full-featured
template gallery system with search, category filtering, and rich previews.

Template data architecture (template-registry.ts):
- Define TemplateDefinition schema with categories, subcategories, tags,
  packages, accent colors, and bibliography flag
- Expand from 8 to 12 templates: add IEEE, ACM, Technical Report, Newsletter
- Provide registry API: getAllTemplates, getTemplateById, searchTemplates,
  getTemplatesByCategory

Template gallery UI (components/template-gallery/):
- template-gallery.tsx: main layout with search bar (Cmd+K), category
  sidebar, responsive grid, grouped-by-category default view, empty state
- template-card.tsx: cards with 9 CSS-based document thumbnail layouts
  (paper, slides, poster, CV, letter, book, report, newsletter, blank)
  and hover preview button
- category-sidebar.tsx: category navigation with per-category template counts
- template-preview.tsx: dialog showing LaTeX source, package list, tags,
  document class metadata, and "Use Template" CTA

State management (template-store.ts):
- Zustand store for gallery state: search query, category filter, template
  selection, and preview modal state with computed filtered results

Project wizard refactor (project-wizard.tsx):
- Replace inline TemplateGrid and hardcoded template array with the new
  TemplateGallery component
- Use template.hasBibliography flag instead of hardcoded ID check for
  references.bib generation
- Fix overflow handling for step 2 scrollable content
2026-02-22 06:15:12 +09:00
apps feat: extract template gallery into dedicated components with expanded template library 2026-02-22 06:15:12 +09:00
assets Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
docs feat: Rename project from Open-Prism to ClaudePrism and update related configurations 2026-02-21 04:07:08 +09:00
.env.example feat: integrate Zotero support with resizable sidebar panels 2026-02-22 01:21:35 +09:00
.gitignore Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
.npmrc Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
biome.json Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
CONTRIBUTING.md feat: Rename project from Open-Prism to ClaudePrism and update related configurations 2026-02-21 04:07:08 +09:00
LICENSE Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
package.json feat: add macOS app icon support and update project configuration 2026-02-22 03:24:34 +09:00
pnpm-lock.yaml feat: implement drag-and-drop functionality in sidebar with native file drop support 2026-02-22 03:09:02 +09:00
pnpm-workspace.yaml Initialize from https://github.com/assistant-ui/open-prism 2026-02-20 14:20:40 +09:00
README.md feat: Rename project from Open-Prism to ClaudePrism and update related configurations 2026-02-21 04:07:08 +09:00
SHARED_TASK_NOTES.md feat: extract template gallery into dedicated components with expanded template library 2026-02-22 06:15:12 +09:00
turbo.json Enhance desktop application setup with new components and configurations 2026-02-20 15:27:06 +09:00

ClaudePrism

Open-source AI-powered LaTeX writing workspace with live preview.

ClaudePrism Screenshot

Features

  • AI-Assisted Writing - Powered by assistant-ui for intelligent LaTeX assistance
  • Live PDF Preview - Real-time compilation and preview of your documents
  • CodeMirror Editor - Syntax highlighting and LaTeX language support
  • Local Storage - Documents saved in browser IndexedDB
  • Dark/Light Theme - Automatic theme switching support

Quick Start

# Clone the repository
git clone https://github.com/delibae/claude-prism.git
cd claude-prism

# Install dependencies
pnpm install

# Copy environment variables
cp apps/web/.env.example apps/web/.env.local

# Configure your environment variables in apps/web/.env.local
# - OPENAI_API_KEY: Your OpenAI API key
# - LATEX_API_URL: URL to the LaTeX compilation service
# - KV_REST_API_URL: KV REST API URL (for rate limiting)
# - KV_REST_API_TOKEN: KV REST API token

# Start development server
pnpm dev:web

Project Structure

claude-prism/
├── apps/
│   ├── web/          # Next.js frontend application
│   └── latex-api/    # LaTeX compilation API (Hono + TeX Live)
├── packages/         # Shared packages (if any)
├── biome.json        # Biome linter configuration
└── turbo.json        # Turborepo configuration

apps/web

Next.js 16 application with:

  • assistant-ui for AI chat interface
  • CodeMirror for LaTeX editing
  • react-pdf for PDF preview
  • Upstash Redis for rate limiting

apps/latex-api

Hono-based API for LaTeX compilation:

  • Accepts LaTeX source code
  • Compiles using TeX Live (pdflatex)
  • Returns compiled PDF

Deployment

Web App (Vercel)

  1. Import the repository to Vercel
  2. Set root directory to apps/web
  3. Configure environment variables:
    • OPENAI_API_KEY
    • LATEX_API_URL
    • KV_REST_API_URL
    • KV_REST_API_TOKEN

LaTeX API (Docker)

cd apps/latex-api
docker build -t claude-prism-latex-api .
docker run -p 3001:3001 claude-prism-latex-api

Contributing

See CONTRIBUTING.md for development setup and contribution guidelines.

License

MIT