Replit Prompt — Presentation Templates (Regular $29.99 & Premium+ $49.99)
0) Summary

Replicate the Cover & Divider Templates flow and Infographic Templates flow for Presentation Templates, with these key differences:

Regular Presentation Templates ($29.99): gallery of prebuilt decks; each deck shows all 24 slides in a zoom/lightbox viewer (not just 4). Single click → Stripe checkout → instant download of the 24-slide deck.

Premium+ Presentation Templates ($49.99): builder/cart that automatically pulls in the user’s chosen Cover & Divider (if any) and up to 4 selected Infographic slides (from the new Infographics flow), and combines them with the same 24-slide core deck → checkout → download a single ZIP (or PPTX) containing the full, personalized deck.

We are not changing Stripe plumbing; reuse the exact checkout + webhook + ownership + auto-download pattern already used for Cover/Divider and Infographics.

1) Pricing & Products

Regular Presentation Template: $29.99 USD

Product ID (fixed by code): ibrandbiz_presentation_regular

Price lookup_key: ibrandbiz_presentation_regular_price_v1

Premium+ Presentation Template: $49.99 USD

Product ID: ibrandbiz_presentation_premium_plus

Price lookup_key: ibrandbiz_presentation_premium_plus_price_v1

ENV (server):

PRESENTATION_REGULAR_PRICE_CENTS=2999
PRESENTATION_PREMIUM_PLUS_PRICE_CENTS=4999
PRESENTATION_PRICE_CURRENCY=usd


We will let the code auto-create these Stripe products/prices on first checkout (like Infographics).

2) Pages & Navigation
2.1 Presentation Templates (Gallery)

Route: /business-assets/templates/presentations

Hero: “Professional 24-slide decks (FIG / TMT / Healthcare / General)”

Filters: search, top-tier (FIG, TMT, Healthcare/Pharma, General), sector subcategories (same list we used), category (business/professional/creative/modern).

Cards: thumbnail, title, top-tier badge, 1–2 sector chips, “24 slides” chip, formats text (“PPTX / Keynote / Slides”), price ($29.99).

Click card: open lightbox showing all 24 slide thumbnails on the side and a large preview stage (same zoom/lightbox animations as stock photos).

Buttons in lightbox:

Buy Now – $29.99 (Regular)

Add to Your Presentation Template (adds this deck as the base for Premium+)

2.2 Premium+ Builder (Cart)

Route: /business-assets/templates/presentations/builder

Left column:

Base deck (required): the deck chosen via “Add to Your Presentation Template.”

Custom Cover & Dividers: auto-pull from user selections made on the Cover & Divider page (if none, show “Add a cover/divider” button linking back).

Infographics (up to 4): auto-pull from Infographic Templates selections; show selected (0–4) with a “Manage” button linking back.

Right column (summary):

“Premium+ Presentation Template”

Includes: 24-slide deck + chosen Cover & Dividers + up to 4 Infographics

Price: $49.99

Checkout button

Behavior:

If user attempts Premium+ checkout without a base deck, block with toast: “Choose a base deck from Presentation Templates first.”

If they selected >4 infographics (should be impossible due to upstream cap), show error and force correction.

3) Data Model
3.1 presentation_templates (new)

id (PK)

creator_id (nullable)

title (text)

top_tier (FIG | TMT | Healthcare/Pharma | General)

subcategories (text[])

category (business | professional | creative | modern)

preview_image_url (card image)

Slide previews: slide_previews (text[]) — array of 24 URLs (required)

Downloads: at least one of

pptx_url

keynote_url

gslides_url

download_bundle_url (zip including all formats)

is_active (bool)

approval_status (pending | approved | rejected)

created_at (timestamp)

3.2 presentation_purchases (new)

id, user_id, status (pending|paid|delivered|failed)

type (regular | premium_plus)

base_template_id (FK to presentation_templates)

selected_cover_id (nullable, from covers table)

selected_infographic_ids (text[]; up to 4)

amount_cents, currency

stripe_session_id, stripe_payment_intent

download_url (zip or pptx)

created_at

If you prefer not to create new tables, you can reuse existing purchases table with a product_type discriminator and fields as JSON — but keep the fields above available.

4) API Contracts
4.1 List & Details

GET /api/presentations
Query: q, toptier, category, subcat, min, max
Return: cards with id, title, top_tier, subcategories, preview_image_url, slide_previews (first 6 urls for quick load), formats, price=2999.

GET /api/presentations/:id
Return full slide_previews (all 24) + download fields.

4.2 Builder State (“Add to Your Presentation Template”)

Persist user selections server-side (session or DB) to avoid loss on refresh.

Base deck

POST /api/presentations/builder/base body: { templateId } → sets base deck

GET /api/presentations/builder → returns { baseTemplateId, selectedCoverId, selectedInfographicIds: [] }

Cover/Dividers (already saved in the Cover page flow):
