Session 12: Book Size Preview & Selection
Date: March 4, 2026 Focus: Multi-size book preview, vendor size catalogs, pricing research
Work Completed
Book Size Preview Feature (Full Implementation)
- Size configuration (
src/lib/book-sizes.ts): Complete Lulu (16 sizes) + Blurb (6 sizes) catalogs with 6 curated "featured" sizes based on photo book industry data (Q2-Q3 of popular sizes) - Database migration: Added
book_sizecolumn tobookstable (defaults tolulu_us_letter) - Dynamic PDF sizing (
TributeBookPDF.tsx): Replaced hardcodedLETTERwith dynamicpageSizeprop. All styles (padding, fonts, photos) scale proportionally using geometric mean of width/height ratios - PDFDownloadButton: Accepts
bookSizeKeyprop, looks up dimensions from config - Dashboard size selector: Dropdown in book header with "Compare Sizes" link
- Size preview page (
/dashboard/{bookId}/sizes): Proportional visual mockups for all 6 featured sizes, on-demand PDF generation per size, select & save
Print Vendor Research
- Confirmed all Lulu trim sizes from lulu.com/products
- Confirmed all Blurb photo book sizes
- Discovered Lulu has real-time pricing API:
POST /print-job-cost-calculations/ - Blurb has no pricing API (dashboard only)
- Neither vendor supports direct customer payment passthrough — always wholesale model (us → vendor)
Documentation
- Created
docs/planning/book-sizes-and-printing.mdfor Signal dashboard - Created notes.ath.how page for Sheri: sayitnow-book-sizes-dc5d5097
Decisions Made
- 6 featured sizes (curated from industry data): US Trade 6x9, Small Square 7x7, Standard Portrait 8x10, Square 8.5x8.5, Standard Landscape 10x8, US Letter 8.5x11
- No 5x7: Neither Lulu nor Blurb offers exact 5x7. Closest: 5x8 (Novella), 5.5x8.5 (Digest)
- Lulu for pricing integration: Only vendor with real-time pricing API
- Payment model: Customer → Stripe → Vendor (wholesale). No way to avoid being payment custodian, which is fine for margin control
Next Steps
- Push
book_sizemigration to production (npm run db:push) - Integrate Lulu
print-job-cost-calculationsAPI for real-time pricing - Build print order checkout flow (Stripe for customer payment, Lulu API for fulfillment)
- Add bleed/margin specs per vendor for print-ready PDFs
- Consider Blurb static price table or custom API access
Files Modified
New Files
src/lib/book-sizes.tssupabase/migrations/20260304000000_add_book_size.sqlsrc/pages/dashboard/[bookId]/sizes.astrodocs/planning/book-sizes-and-printing.md
Modified Files
src/components/TributeBookPDF.tsx— Dynamic page sizingsrc/components/PDFDownloadButton.tsx— Accept bookSizeKey propsrc/pages/dashboard/[bookId].astro— Size dropdown + compare linksrc/pages/preview/[code].astro— Pass book_size to PDF download